Skip to content
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

attached_disks only work if source is a self_link #514

Closed
paddycarver opened this issue Oct 2, 2017 · 3 comments · Fixed by #605
Closed

attached_disks only work if source is a self_link #514

paddycarver opened this issue Oct 2, 2017 · 3 comments · Fixed by #605
Labels

Comments

@paddycarver
Copy link
Contributor

paddycarver commented Oct 2, 2017

When using attached_disk on a resource, if a name is used instead of a full self_link, the API response can't match it to the attached_disk field it belongs to, and tries to make it a disk. But disks don't exist anymore, so it just ignores it in the state. This manifests as a constant diff showing the need to update the attached disk.

A quick solution to this would be to update the matching that happens in compute_instance's Read function to accept either a self_link or a name and treat them as equivalent. A better solution to this would probably involve ripping out the code that distinguished between attached_disk and disk entirely, and reworking the logic of that section, as we no longer need to match against disk.

In the meantime, users can workaround the problem by using the self_link instead of the name in their configs.

@danawillow
Copy link
Contributor

FYI #460

@paddycarver
Copy link
Contributor Author

*facepalm*

luis-silva pushed a commit to luis-silva/terraform-provider-google that referenced this issue May 21, 2019
@ghost
Copy link

ghost commented Mar 30, 2020

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 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
2 participants