The gitlab_pipeline_schedule
resource allows to manage the lifecycle of a scheduled pipeline.
Upstream API: GitLab REST API docs
resource "gitlab_pipeline_schedule" "example" {
project = "12345"
description = "Used to schedule builds"
ref = "master"
cron = "0 1 * * *"
}
cron
(String) The cron (e.g. 0 1 * * *
).description
(String) The description of the pipeline schedule.project
(String) The name or id of the project to add the schedule to.ref
(String) The branch/tag name to be triggered.active
(Boolean) The activation of pipeline schedule. If false is set, the pipeline schedule will deactivated initially.cron_timezone
(String) The timezone.take_ownership
(Boolean) When set to true
, the user represented by the token running Terraform will take ownership of the scheduled pipeline prior to editing it. This can help when managing scheduled pipeline drift when other users are making changes outside Terraform.id
(String) The ID of this Terraform resource. In the format of <project-id>:<pipeline-schedule-id>
.owner
(Number) The ID of the user that owns the pipeline schedule.pipeline_schedule_id
(Number) The pipeline schedule id.Import is supported using the following syntax:
# GitLab pipeline schedules can be imported using an id made up of `{project_id}:{pipeline_schedule_id}`, e.g.
terraform import gitlab_pipeline_schedule.test 1:3