-
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
Plan shows and apply does some changes to "network_interface.*" of most instances on every run, without change in the code #371
Comments
Update to Terraform 0.10.3 didn't help. |
Upgrading to google provider v0.1.3 (I was using 0.1.0 before - I expected it to autoupdate/notify me about new version the same way Terraform itself does...) didn't help too. |
Hum... In 0.1.3, we added a method to suppress the diff between a self-link and a name. As a work-around, try using the self-link of the network instead of the name: ...
network_interface {
network = "${google_compute_network.mon.self_link}"
...
}
... Let me know if that fixes your problem. |
Yay! It helped. :) (Note to self: I had to change it for |
I filed an issue (#377) to make sure google_compute_firewall support both |
Hey @gdubicki, I'm building off 676a2a9 for the GCP provider and 9504d17 for Terraform, and I can't seem to recreate this. I've gotten a diff for the compute address region (weirdly enough) but never for the network interfaces. Here's my minimal reproduction. Can you give it a try and see if it's reproducible for you? resource "google_compute_instance" "gateway" {
name = "paddy-gcp-371-test"
machine_type = "n1-standard-1"
zone = "us-central1-b"
tags = ["gateway", "mon-allow-ssh", "mon-allow-https", "mon-allow-opentsdb-traffic", "mon-allow-http"]
can_ip_forward = true
lifecycle {
ignore_changes = ["metadata_startup_script", "create_timeout", "disk"]
}
disk {
image = "ubuntu-1404-trusty-v20170831"
}
network_interface {
network = "${google_compute_network.default.name}"
access_config {
nat_ip = "${google_compute_address.gateway.address}"
}
}
}
resource "google_compute_address" "gateway" {
name = "paddy-gcp-371-test"
region = "us-central1"
}
resource "google_compute_network" "default" {
name = "paddy-gcp-371-test"
ipv4_range = "10.116.11.0/24"
} |
@paddycarver: #375 may have fixed this by coincidence |
Good point. I'll do a before/after test and see if I can confirm that as the source of the fix. If so, I'll close this. |
Signed-off-by: Modular Magician <[email protected]>
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Terraform Version
Terraform v0.10.2
Affected Resource(s)
Terraform Configuration Files
We are using old-style networks:
And our nodes are defined like this:
Debug Output
(I am checking possibility to share it with the rest of my team.)
Expected Behavior
We are not changing tf code, so plan should return no changes. Apply should make no changes.
Actual Behavior
Plan returns some changes do be done.
Example for those changes for nodes with external IPs:
(Note that "xxx.yyy.zzz.vvv" is the same, current external IP in all 3 places above.)
Example for other nodes:
Apply does those changes.
On the next run plan and apply to the same.
Steps to Reproduce
terraform plan
orterraform apply
Important Factoids
This has started to happen somewhere in the last few weeks, after some Terraform upgrade.
It also does not happen for new nodes, created within the last few weeks.
The text was updated successfully, but these errors were encountered: