gitlab_pipeline_schedule_variable (Resource)

The gitlab_pipeline_schedule_variable resource allows to manage the lifecycle of a variable for a pipeline schedule.

Upstream API: GitLab REST API docs

Example Usage

resource "gitlab_pipeline_schedule" "example" {
  project     = "12345"
  description = "Used to schedule builds"
  ref         = "master"
  cron        = "0 1 * * *"
}

resource "gitlab_pipeline_schedule_variable" "example" {
  project              = gitlab_pipeline_schedule.example.project
  pipeline_schedule_id = gitlab_pipeline_schedule.example.pipeline_schedule_id
  key                  = "EXAMPLE_KEY"
  value                = "example"
}

Schema

Required

Read-Only

Import

Import is supported using the following syntax:

# Pipeline schedule variables can be imported using an id made up of `project_id:pipeline_schedule_id:key`, e.g.
terraform import gitlab_pipeline_schedule_variable.example 123456789:13:mykey