Apply action destroys and recreates Pull Mirrors
Bug Report
Described in gitlab#386616 (closed) , A customer is using terraform to manage pull mirrors, and is experiencing an issue with the terraform provider destroying and recreating the resource on each apply, as the masked password returned by GitLab doesn't match what's in the config.
Relevant Terraform Configuration
resource "gitlab_project" "test" {
name = "issue-1366"
default_branch = "main"
import_url = "https://__token__:__some_password__@gitlab.comexample.com"
}
Relevant Log Output
n/a
The returned import_url
from GitLab has a redacted password instead of __some_password__
, which always causes the resource so change. This however has no effect though since the import_url
only matters during create.
Additional Details
- GitLab Terraform Provider Version:
v15.7.0
- GitLab Version:
any
- Terraform Version:
any
Implementation Guide
We should be able to use a DiffSuppressFunc
, similar to the one used in the Push Mirror.
Edited by Timo Furrer