The gitlab_pipeline_schedule_variable
resource allows to manage the lifecycle of a variable for a pipeline schedule.
Upstream API: GitLab REST API docs
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"
}
key
(String) Name of the variable.pipeline_schedule_id
(Number) The id of the pipeline schedule.project
(String) The id of the project to add the schedule to.value
(String) Value of the variable.id
(String) The ID of this resource.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