Unable to add custom_headers to webhook using gitlab terraform provider

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

Got following error when trying to create gitlab_project_hook resource:

Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?

  Terraform will perform the actions described above.

  Only 'yes' will be accepted to approve.

  Enter a value: yes

gitlab_project_hook.webhook_sdlc_events: Creating...

Error: Provider produced inconsistent result after apply

│ When applying changes to gitlab_project_hook.webhook_sdlc_events, provider "provider[\"registry.terraform.io/gitlabhq/gitlab\"]" produced an unexpected new value:

│ .custom_headers: inconsistent values for sensitive attribute.

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

Steps to reproduce

terraform code with additional terraform var files:

terraform {
  required_providers {
    gitlab = {
      source  = "gitlabhq/gitlab"
      version = "~> 18.3"
    }
  }
}
provider "gitlab" {
  base_url = var.gitlab_url
  token    = var.gitlab_token
}

resource "gitlab_project_hook" "webhook_sdlc_events" {
  project               = var.project 
  url                   = var.dt_gitlab_sdlc_ingest_url
  merge_requests_events = true
  job_events            = true
  pipeline_events       = true
  releases_events       = true
  deployment_events     = true

  custom_headers = [
    {
      key   = "Authorization"
      value = var.dt_token
    }
  ]
}

Did terraform plan and terraform apply and got error in summary. Check gitlab UI and found the webhook is created but without custom_headers. The error message shows I should report it

Edited by 🤖 GitLab Bot 🤖