Skip to content

GitLab API error | gitlab_project_label terraform resource

Bug Report

When running terraform plan/apply we see that all gitlab_project_label resources planning to be updated because of color_hex argument is changing. But if we going to check this in gitlab UI we can see that everything in the same state as configured in terraform.

Relevant Terraform Configuration

resource "gitlab_project_label" "test" {
  color   = "#69D100"
  name    = "test"
  project = gitlab_project.test.id
}

Relevant Terraform Command

terraform apply

Relevant Log Output

Error: Provider produced inconsistent result after apply

When applying changes to
 gitlab_project_label.test, provider
 "provider[\"registry.terraform.io/gitlabhq/gitlab\"]" produced an
 unexpected new value: .description: was null, but now cty.StringVal("").

This is a bug in the provider, which should be reported in the provider's
 own issue tracker.

Additional Details

  • GitLab Terraform Provider Version: 18.0
  • GitLab Instance Version: 18.1.1
  • Terraform Version: 1.12.2
  • License Tier: Premium
Edited by Sergey Rudenko