-
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
google_compute_instance keeps computing network_interface attributes. #582
Comments
Hi Anas, I am trying to reproduce this with the following Terraform config but I don't get a perpetual diff like you are describing: resource "google_compute_address" "default" {
name = "test-address"
}
resource "google_compute_instance" "instance" {
name = "server"
machine_type = "g1-small"
zone = "us-central1-b"
boot_disk {
auto_delete = true
initialize_params {
image = "debian-cloud/debian-8"
}
}
network_interface {
network = "default"
access_config {
nat_ip = "${google_compute_address.default.address}"
}
}
} Can you post the full diff for Thank you |
@rosbo thanks for checking. The diff I posted is the whole diff.
I would like to mention that this issue happens with instance created before. Not sure if it affects newly created ones as well. |
@rosbo I changed my terraform code to use the full URI of the network instead of just its name, and I don't see any pending changes. I am not sure on which version of terraform this was changed as the same code was working fine. |
Hum... The Note: I tested with 1.0.1 and 1.1.0 and I tested with creating an instance with 1.0.1 and then upgrading to 1.1.0 and couldn't reproduce... |
Also, the network field is ForceNew which means it forces the creation of a new resources if it is changed. That also means that the diff output includes a special mention network_interface.0.network: "https://www.googleapis.com/compute/v1/projects/MY_GCP_PROJECT/global/networks/default" => "default2" (forces new resource) |
@rosbo weird! well I wouldn't waste my time on it, I will keep the changes I did for terraform files. Thanks for checking. I will close this issue. |
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
v0.10.6
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
After upgrading the plugin to 1.1.0,
terraform plan
showed this changes:Run
terraform apply
to apply "pending" changes (due to provider plugin upgrade).Actual Behavior
But even after
terraform apply
,terraform plan
keeps showing the same changes over and over.Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform plan
=> will shows the output posted inExpected Behavior
terraform apply
terraform plan
=> will shows the same output as on step 1.References
The text was updated successfully, but these errors were encountered: