The gitlab_project_variables
data source allows to retrieve all project-level CI/CD variables.
Upstream API: GitLab REST API docs
data "gitlab_project_variables" "vars" {
project = "my/example/project"
}
# Using an environment scope
data "gitlab_project_variables" "staging_vars" {
project = "my/example/project"
environment_scope = "staging/*"
}
project
(String) The name or id of the project.environment_scope
(String) The environment scope of the variable. Defaults to all environment (*
).id
(String) The ID of this resource.variables
(List of Object) The list of variables returned by the search (see below for nested schema)variables
Read-Only:
description
(String)environment_scope
(String)key
(String)masked
(Boolean)project
(String)protected
(Boolean)raw
(Boolean)value
(String)variable_type
(String)