hashicorp / terraform-google-vault

A Terraform Module for how to run Vault on Google Cloud using Terraform and Packer
Apache License 2.0
115 stars 75 forks source link

Prevent recreation of compute_instance_template on every apply #1

Closed madmod closed 6 years ago

madmod commented 7 years ago

The device_name was always empty so I explicitly set it to the computed value to prevent Terraform recreating it on each apply. This might be a bug in the Google provider, but I haven't found an issue for it yet.

josh-padnick commented 7 years ago

@madmod Thanks for submitting this PR! I didn't experience the google_compute_instance_template being recreated on each terraform apply unless I made a change that would trigger such a change. Are you saying even unrelated changes trigger a destroy/re-create and that adding the device-name property as specified in this PR fixed it?

If so, that sounds like buggy behavior to me and we should report on the Google Terraform GitHub repo.

josh-padnick commented 6 years ago

@madmod I finally tried to recreate this issue, and I couldn't, although I did find other issues which I resolved in #4. When I terraform apply the root example, it works fine. When I run another terraform plan or terraform apply there are no subsequent changes. Are you applying a different example, or following a different workflow?

josh-padnick commented 6 years ago

Closing this PR due to inactivity, but happy to reconsider it if needed.