URL masking not available in `gitlab_project_hook`
<!-- 🚧 Please make sure to add a meaningful issue title above --> ## Bug Report <!-- 🚧 Describe your bug report. --> When adding a project webhook via Terraform resource, URLs are unable to be masked. In the event a webhook URL contains a sensitive value (see configuration below), it cannot be masked. Please add a URL masking parameter to this resource. ## Relevant Terraform Configuration <!-- 🚧 Please provide the relevant Terraform configuration below. --> ```hcl variable "pipeline_trigger_token" { description = "Pipeline trigger token for project 5678" type = string sensitive = true } resource "gitlab_project_hook" "release_notification" { project = "1234" url = "https://gitlab.com/api/v4/projects/5678/ref/main/trigger/pipeline?token=${var.pipeline_trigger_token}" } ``` ## Relevant Terraform Command <!-- 🚧 Please provide the exact Terraform command that's causing the issue. --> ```sh terraform apply ``` ## Relevant Log Output <!-- 🚧 Please provide the relevant log output below. If by any means possible, please provide the Terraform debug logs in JSON format. A log file can be produced by running Terraform like this: ```sh TF_LOG_PATH=$(pwd)/log.jsonl TF_LOG=JSON terraform ... ``` A `log.jsonl` file will be produced which you can paste in code block below. 🚨 ATTENTION: please redact ANY sensitive information from the log output. If you're using provider version 15.8 or higher, the provider already redacts the GitLab Token from the logs, but make sure to not leak anything else. --> <details> <summary>These are the debug logs of the `terraform` command output:</summary> ```plaintext gitlab_project_hook.release_notification: Creating... gitlab_project_hook.release_notification: Creation complete after 1s [id=1234:9012] Apply complete! Resources: 1 added, 0 changed, 0 destroyed. ``` </details> ## Additional Details <!-- 🚧 Please fill in the used versions below between the backticks. --> - GitLab Terraform Provider Version: `18.9.0` - GitLab Instance Version: `18.9` - Terraform Version: `OpenTofu v1.11.0` - License Tier: `Premium` ## Implementation Guide - Follow the `CONTRIBUTING.md` guide for setting up your local development environment. - Clone the community fork of this project. - In `internal/provider/resource_gitlab_project_hook`, add a new list type optional attribute to the schema called `url_variables`. - In the `Create` and `Update` functions, add logic to all the Set/Delete URL Variable endpoints where appropriate. You will likely need to do a diff on the previous and current list in the `Update` function to work out which ones are being removed/updated/created. - Add logic to `Create`, `Update` and `Read` functions for saving the URL variables in the state model. - Add an integration test to ensure the new variables can be added on creation and updates to the resource.
issue