The gitlab_group_variables
data source allows to retrieve all group-level CI/CD variables.
Upstream API: GitLab REST API docs
data "gitlab_group_variables" "vars" {
group = "my/example/group"
}
# Using an environment scope
data "gitlab_group_variables" "staging_vars" {
group = "my/example/group"
environment_scope = "staging/*"
}
group
(String) The name or id of the group.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)group
(String)key
(String)masked
(Boolean)protected
(Boolean)raw
(Boolean)value
(String)variable_type
(String)