Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Prevent recreation of compute_instance_template on every apply #1

Closed
wants to merge 1 commit into from

Conversation

madmod
Copy link

@madmod madmod commented Oct 24, 2017

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
Copy link
Collaborator

@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
Copy link
Collaborator

@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
Copy link
Collaborator

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants