Open steven-edgar opened 11 months ago
Update support is an enhancement, not a bug.
I don't think this issue is about update behaviour.
The bug is that when you tf apply
a PSC forwarding rule with a description twice - with no changes - the second tf apply
forces replacement because TF thinks the description field is changing.
Ah, yep, https://github.com/hashicorp/terraform-provider-google/issues/16258 was more clear (although this issue's body stated the same if read correctly). Edited the issue body.
@roaks3 any idea why the robot didn't label this one?
Ah yea, there is a manual step where a member of our team needs to update the team enrollment in mmv1 (the canonical source is internal) and then re-run the labeler. This is part of our team's rotation so it should happen weekly until we build automation around that.
I'm not 100% sure how the PSC specific thing it's related to the description. In the meantime I tried to make the description argument updatable in place. I think this step is anyway needed and possibly it might also fix the bug.
It seems tests are failing as we are not (yet) able to patch the description argument. I'll dig into it with product before abandoning the PR.
I had to abandon the PR as description patching is currently not supported.
The same issue is present in the compute_global_forwarding_rule as well.
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
Terraform v1.4.0 Google terraform provider v4.84.0
Affected Resource(s)
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
On first apply the forwarding rule is created, on second run the resource is left unchanged.
Actual Behavior
That can be applied once, causing the resource to be created. But a second tf apply (with no changes to the tf file) causes a plan that includes deletion/recreation, because of description:
Plan: 1 to add, 0 to change, 1 to destroy.
Steps to Reproduce
Set the "description" field in the resource. If this field is unset and the configuration is applied, subsequent applies make no changes.
Important Factoids
This is with a PSC enabled forwarding rule, I've not tried with non-PSC forwarding rules.
References
0000
b/308569872