-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
google_cloud_run_domain_mapping resources keeps recreating with every apply action #8053
Comments
I can repro it https://paste.googleplex.com/5619834659274752 |
Can both of you please share the version of the provider you're using? There have been several changes to this resource recently as a result of an annotation that was suddenly enforced, and it's hard to tell whether this has already been fixed or not. Additionally: @edwardmedia: Did part of your plan output get clipped? The plan indicates that the resource is getting recreated, but there's no @sherifkozman: Can you post plan output as well? Which field is causing the resource to get recreated? |
@rileykarson my version is |
@edwardmedia can you post a full plan output if your original one was clipped? |
Here is the plan @rileykarson |
@edwardmedia: Did your original
|
@rileykarson here is another fresh run log |
…mple to use valid consumer_accept_list (hashicorp#8053) Signed-off-by: Modular Magician <magic-modules@google.com>
This is still a thing...I imported the If I add the following lifecycle then I get no changes but I'm getting 10s of annoying terraform warnings
The warning:
Which is obviously NOT redundant as you can see below. If I don't add the lifecycle I'm getting the force replacement.
|
@zli82016 fyi |
@Dragotic , can you share the Terraform configuration for the resource |
@zli82016 of course, here you go: resource "google_cloud_run_domain_mapping" "this" {
location = google_cloud_run_v2_service.this.location
project = google_cloud_run_v2_service.this.project
name = "example.com"
metadata {
namespace = local.project_id
}
spec {
route_name = google_cloud_run_v2_service.this.name
}
lifecycle {
ignore_changes = [
metadata[0].effective_labels,
metadata[0].terraform_labels
]
}
} And the response: -/+ resource "google_cloud_run_domain_mapping" "this" {
~ id = "redacted" -> (known after apply)
name = "example.com"
~ status = [
- {
- conditions = [
- {
- message = ""
- reason = ""
- status = "True"
- type = "Ready"
},
- {
- message = ""
- reason = ""
- status = "True"
- type = "CertificateProvisioned"
},
- {
- message = ""
- reason = ""
- status = "True"
- type = "DomainRoutable"
},
]
- mapped_route_name = "service-name"
- observed_generation = 1
- resource_records = [
- {
- name = "sapi"
- rrdata = "ghs.googlehosted.com."
- type = "CNAME"
},
]
},
] -> (known after apply)
# (2 unchanged attributes hidden)
~ metadata {
- annotations = {} -> null
~ effective_annotations = {
- "run.googleapis.com/operation-id" = "redacted"
- "serving.knative.dev/creator" = "redacted"
- "serving.knative.dev/lastModifier" = "redacted"
} -> (known after apply)
~ effective_labels = { # forces replacement
- "cloud.googleapis.com/location" = "us-central1" -> null
+ "environment" = "staging"
+ "goog-terraform-provisioned" = "true"
- "run.googleapis.com/overrideAt" = "2024-04-24T10:01:55.727Z" -> null
+ "terraform" = "true"
}
~ generation = 1 -> 0
- labels = {} -> null
~ resource_version = "redacted" -> (known after apply)
~ self_link = "redacted" -> (known after apply)
~ terraform_labels = { # forces replacement
+ "environment" = "staging"
+ "goog-terraform-provisioned" = "true"
+ "terraform" = "true"
}
~ uid = "<redacted>" -> (known after apply)
# (1 unchanged attribute hidden)
}
~ spec {
- force_override = false -> null
# (2 unchanged attributes hidden)
}
} |
@Dragotic,
The values of terraform_labels are determined by its value in Terraform state, which is empty during terraform import. This is an known issue and not resolvable for now. You can ignore the warning about |
Community Note
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.Terraform Version
v0.13.5
Affected Resource(s)
*google_cloud_run_domain_mapping
Terraform Configuration Files
Expected Behavior
If the mapping resource exists, nothing should happen.
Actual Behavior
Even though resource exists, it gets deleted and re-created causing command to fail as this resources instructs Google API to destroy an SSL certificate and re-created with which new mapping entry
Steps to Reproduce
terraform apply
References
b/271914033
The text was updated successfully, but these errors were encountered: