-
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_storage_bucket
resource shows spurious diff on labels
for goog-terraform-provisioned
on second terraform apply
#19323
Comments
Confirmed issue! Possible permadiff issue after creating the resources, when the 2nd terraform apply is executed to check if everything is ok it returns a message saying |
@zli82016 FYI another labels-related issue |
@guineveresaenger and @ggtisc , I cannot reproduce the issue locally. Do I miss something? The configuration I used:
|
I can reproduce the issue after chatting with @ggtisc offline. |
@zli82016 what was missing? |
The two output blocks were missing originally to reproduce the issue.
|
This is not a new issue introduced by Terraform provider 6.0. It also happens on provider 5.x (I tested with 5.42). After the second |
I don't think this is a bug in the Terraform provider. Other fields with To mitigate the issue, you can give a default value to
|
@guineveresaenger or other people adding the thumb, did you see this issue with Terraform google provider 5.x? |
@zli82016 - this occurs on Google v5.x as well. I noticed for v6 because of the new I'm not sure I understand why this is not a bug in the provider, do you have some more context here? Is this something that will only affect Labels? Given that there's a default label on everything now, it seems like a lot of noise regardless. Thank you for finding additional resources with this issue, and for providing a mitigation. 💟 |
@guineveresaenger, thanks for the confirmation. Based on my testing, the issue doesn't happen without the output block. It doesn't only affect labels. Instead, it also affects other fields with type |
Opened an upstream bug hashicorp/terraform-plugin-sdk#1371 |
This is a bug on the upstream SDKV2 and cannot be easily fixed in SDKV2. Migrating the resource to terraform-plugin-framework could fix the issue. More info is hashicorp/terraform-plugin-sdk#1371 (comment) I am going to close this issue for now. Feel free to reopen it if there any questions. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Terraform Version & Provider Version(s)
Terraform on arm64 (Apple M1)
Affected Resource(s)
google_storage_bucket
Terraform Configuration
Debug Output
https://gist.github.com/guineveresaenger/2529dd33212923de29fc0c900fafaa50
Expected Behavior
terraform apply
should show no diffActual Behavior
terraform apply
shows diff on labels:Notably,
terraform_labels
andeffective_labels
do not show a diff.Furthermore, thos label isn't actually removed from the cloud resource itself- it is only removed when
add_terraform_attribution_label = false
is set in the provider configuration.Steps to reproduce
terraform apply
to create the resourceterraform apply
a second time - observe a diffImportant Factoids
No response
References
No response
b/364358577
The text was updated successfully, but these errors were encountered: