gitlab_project_mirror is recreated due to credentials masking
GitLab Provider version
3.12.0
GitLab version
GitLab Enterprise Edition 15.1.0-pre 80f9517bf8e
Terraform version
Terraform v1.0.10
Relevant Terraform Configuration
resource "gitlab_project_mirror" "this" {
keep_divergent_refs = true
only_protected_branches = true
project = "some id"
url = "https://user:login@some.hosting.com/repo"
}
Relevant log output
-/+ resource "gitlab_project_mirror" "this" {
~ id = "id:id" -> (known after apply)
~ mirror_id = id -> (known after apply)
~ url = (sensitive value) # forces replacement
# (4 unchanged attributes hidden)
}
Description
Project mirror gets recreated because in the plan (terraform show -json plan), url gets masked user/password:
...
"before": {
...
"url": "https://*****:*****@some.hosting.com/repo"
},
"after": {
...
"url": "https://user:login@some.hosting.com/repo"
},
...
It should be fixed in v3.9.0 (MR with fix) But looks it was not.
Edited by Timo Furrer