Skip to content

Missing resource ID for datasource gitlab_pipeline_schedules

Bug Report

There is no id filled when using the datasource gitlab_pipeline_schedules: https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/blob/main/internal/provider/datasource_gitlab_pipeline_schedules.go?ref_type=heads#L183 This makes importing resources automatically a bit harder, since we must use the pipeline_schedule_id to identify them.

Also, the id is described as "Required", maybe "Read-only" would be a better fit, since this is a data-source.

PS: the resource id is also missing from the datasource gitlab_project_protected_tags, but this one is not required for import.

Relevant Terraform Configuration

data "gitlab_pipeline_schedules" "main" {
  project = 123
}

output "debug" {
  value = data.gitlab_pipeline_schedules.main.pipeline_schedules[*].id
}

Relevant Terraform Command

terraform plan

Relevant Log Output

These are the debug logs of the `terraform` command output:

Changes to Outputs:
  + debug                        = [
      + null,
      + null,
      + null,
    ]

Additional Details

  • GitLab Terraform Provider Version: v17.4.0
  • GitLab Version: GitLab Enterprise Edition 17.5.0-pre 364fcf7719d
  • Terraform Version: 1.9.6