-
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
permadiff caused by "added support for keepalive_interval to google_compute_router.bgp" #11268
Comments
Same issue, we even defined |
Hi @red8888 and @koalalorenzo, I'm sorry you are running into this. Unfortunately I haven't been able to reproduce this with my current configurations, would one of you mind sharing your configuration please? Thanks! |
We're also hitting this. Sharing our full configuration is tough. But here's the defn for the resource in question, very simple
And heres what we're seeing in terraorm
Just based on your understand of the code base, do you have any idea why this would be getting set? Seems bizarre. Note, it does not help to override this value by setting it to 0, 20, 21 or etc. One thing to note: when i set the keepalive property manually in gcp console, it seems to accept it, but then when I returned, it was not set. Maybe some gcp bug? |
@leighst-anchorage thank you for sharing your config! I was able to reproduce this. The issue is that After doing some testing, I noticed this wouldn't show a diff in older versions of Terraform, but as I reached out to others, with the new diffing in Terraform 1.0, this is expected. It should be safe to To further clarify why overriding it doesn't help is that Terraform 1.0 will show 2 diffs, first, the changes made "outside Terraform" (the changes made outside your configuration - which is this change) and the second is the changes your configuration is proposing. You'll notice the first diff shows the change to 20 and the second diff will show 20 changing to whatever override is in your config. Let me know if you have further questions or if you're still encountering the issue after apply. Thanks! |
Having the same issue. The apply doesnt do anything and on the next run, permadiff again. |
I was able to work around the issue by applying a different |
I'm having the same issue as well, even after applying in terraform v1.0.11. I've tried removing it from the state and importing it, applying with -refresh-only, and setting keepalive_interval to 20, but for some reason terraform keeps thinking the keepalive_interval is 0. I haven't tried @dave-pollock's workaround yet as I'm trying to find less disruptive solutions, but it might be the only fix. Update: got impatient and tried the above workaround and it's working fine now |
same for me. For anyone using this via the cloud-nat module, the setting is i set it first to 21, then back to 20, not sure if that was required. |
It looks like it's caused by terraform not applying "default' values. Yeah the bump to 21 and revert back to 20 works as if it's not a default value, terraform applies it properly and most importantly it writes it to the statefile. |
You can even set it to 21 through the UI and let Terraform set it back to 20 to resolve the permadiff. |
Setting it to 21 worked for me. |
I working on this particular issue .
As keepalive_interval support is added in TF 4.13.0v. It is expected to give the diff whenever we upgrade the state.
As per my investigation all things are working as expected. We can close this issue. |
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.14.4
Affected Resource(s)
google_compute_router
From the last release:
https://github.com/hashicorp/terraform-provider-google-beta/releases/tag/v4.13.0
hashicorp/terraform-provider-google-beta#4089
Terraform Configuration Files
If I create a google_compute_router and don't include a keepalive_interval property I see a permadiff for:
keepalive_interval = 0 -> 20
b/305197736
The text was updated successfully, but these errors were encountered: