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

Make google_container_node_pool resources importable. #284

Merged
merged 4 commits into from
Aug 7, 2017
Merged

Make google_container_node_pool resources importable. #284

merged 4 commits into from
Aug 7, 2017

Conversation

drzero42
Copy link
Contributor

@drzero42 drzero42 commented Aug 3, 2017

Fixes part of #165 by making google_container_node_pool resources importable.

@rosbo rosbo self-requested a review August 4, 2017 22:10
Copy link
Contributor

@rosbo rosbo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

d.Set("zone", parts[0])
d.Set("cluster", parts[1])
d.Set("name", parts[2])

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum...

The Create method sets the id of the resource to the name of the container node pool.
The import will leave the id as zone/cluster/name.

This is not a big deal since we don't use the resource id after creation right now but if we decide to use it in the future, it is nice to have them consistent.

However, only setting the id to name like it's done in Create is wrong since it is valid for two node pool across two clusters to have the same name. Currently, we prevent this use case.

I created a separate issue (#298) to fix the Create method and set the id to zone/cluster/name. This will require a use of schema migration and it is better to do this in a separate PR. Migration will make all the ids consistent.

Nothing to do for you here :) I will take care of the other issue.

@drzero42
Copy link
Contributor Author

drzero42 commented Aug 5, 2017

I added documentation for the import :)

@rosbo
Copy link
Contributor

rosbo commented Aug 7, 2017

Thank you for your contribution

@rosbo rosbo merged commit f06970c into hashicorp:master Aug 7, 2017
z1nkum pushed a commit to z1nkum/terraform-provider-google that referenced this pull request Aug 15, 2017
negz pushed a commit to negz/terraform-provider-google that referenced this pull request Oct 17, 2017
chrisst pushed a commit to chrisst/terraform-provider-google that referenced this pull request Nov 9, 2018
luis-silva pushed a commit to luis-silva/terraform-provider-google that referenced this pull request May 21, 2019
…rp#278)" (hashicorp#284)

This reverts commit 09df2a6, which
contains 0.12-alpha4, which is broken in surprising ways.
@ghost
Copy link

ghost commented Mar 31, 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 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 31, 2020
flozzone pushed a commit to flozzone/terraform-provider-google that referenced this pull request Oct 17, 2024
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.

3 participants