Open bamartos opened 3 years ago
version.target_size.percent
will be set in the tf state only if its value greater than 0. Please use the percent value > 0 or not use in the config to avoid permadiff.
Hey, if I will not use it, it will result an error since when you define multiple versions you need to provide at least one target size.
Using target size > 0 it will not create permadiff but it doesn't help on my use case.
Setting target_size = 0 it works and solves my usecase but it results in a permadiff thus the reason of this bug report.
Thank you
@megan07 should we consider >= 0 here https://github.com/hashicorp/terraform-provider-google/blob/f4cc59ec3ab2859f424aa1d604f8b29af8f4c36b/google/resource_compute_instance_group_manager.go#L426?
What are your thoughts ?
I'm taking a look at this. It's a bit more complicated since the API returns 0
for both percent
and fixed
when the entire block is unset, so adding >= 0
there will break any configs (in an undesirable way) that have target_size
unset. We will need to fix this to allow for 0
, I'm thinking we might need a diff suppress function with it, but haven't decided if that's the best approach yet or not.
@megan07 Our team is also running into this and it is tedious when investigating drift to find that it is a false alarm. Has there been any update on this?
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 v0.15.0
Affected Resource(s)
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
Terraform applies normal the configuration the first time (1 instance group manager + 2 instance template versions), but when try to re-apply it shouldn't have any diff to apply.
Actual Behavior
Perma-diff the target_size
Steps to Reproduce
terraform apply
Important Factoids
References
0000