-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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 compute network forces new resource with no changes #5233
Comments
@sl1pm4t following up with a bit more detail. This is an existing legacy network. The terraform code that created it is as follows: resource "google_compute_network" "internal" { } What appears to happening is that the optional "auto_create_subnetworks" is being added, even though this should be detected as a legacy network. It is setting it to the default value of "false" but in this case, it should definitely not be adding it. This will effectively break all existing GCE infrastructure if indeed this forces a new resource (It will attempt to destroy the existing network which every server relies on) . I believe the code reflects that element being added unconditionally but only forces it if it's a custom subnet network. I hope this helps. It might be practical to require "auto_create_subnetworks" in the network resource whenever a subnet network is created and if it's absent AND " ipv4_range" is defined it is defined as a legacy network. |
I should mention it is version 0.6.12 and the commit that added GH-5130 is causing this issue. A great new feature by the way. |
Thanks for the info @kendawg2 - I didn't notice this issue until you tagged me, but I'll have a look. |
I submitted a fix |
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. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
With the addition of subnets (awesome btw) it has created an undesired backwards incompatibility with existing networks. This should be either ignored or updated in existing networks. The following was received from a terraform plan
Although this new auto_create_subnetworks is a new field, and it is in fact missing from legacy networks, it should not force a new resource or it will destroy existing networks.
The text was updated successfully, but these errors were encountered: