gitlab_group_variable (Resource)

The gitlab_group_variable resource allows to manage the lifecycle of a CI/CD variable for a group.

Upstream API: GitLab REST API docs

Example Usage

resource "gitlab_group_variable" "example" {
  group             = "12345"
  key               = "group_variable_key"
  value             = "group_variable_value"
  protected         = false
  masked            = false
  environment_scope = "*"
}

Schema

Required

Optional

Read-Only

Import

Import is supported using the following syntax:

# GitLab group variables can be imported using an id made up of `groupid:variablename:scope`, e.g.
terraform import gitlab_group_variable.example 12345:group_variable_key:*