gitlab_project_variable (Data Source)

The gitlab_project_variable data source allows to retrieve details about a project-level CI/CD variable.

Upstream API: GitLab REST API docs

Example Usage

data "gitlab_project_variable" "foo" {
  project = "my/example/project"
  key     = "foo"
}

# Using an environment scope
data "gitlab_project_variable" "bar" {
  project           = "my/example/project"
  key               = "bar"
  environment_scope = "staging/*"
}

Schema

Required

Optional

Read-Only