gitlab_project_variable (Resource)

The gitlab_project_variable resource allows to manage the lifecycle of a CI/CD variable for a project.

Upstream API: GitLab REST API docs

Example Usage

resource "gitlab_project_variable" "example" {
  project   = "12345"
  key       = "project_variable_key"
  value     = "project_variable_value"
  protected = false
}

Schema

Required

Optional

Read-Only

Import

Import is supported using the following syntax:

# GitLab project variables can be imported using an id made up of `project:key:environment_scope`, e.g.
terraform import gitlab_project_variable.example '12345:project_variable_key:*'