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

Document id field for resources #5542

Assignees
Milestone

Comments

@rileykarson
Copy link
Collaborator

rileykarson commented Jan 30, 2020

In 3.0.0, we changed Terraform's internal id field from formats like {{project}}/{{region}}/{{name}} to projects/{{project}}/regions/{{region}}/resources/{{name}}, a valid reference value.

Historically we've encouraged users to use name or self_link as the reference value, however these values should be preferred going forward. We've since documented the field on generated resources, but no examples or tests have been updated and neither have handwritten resources.

For this issue:

This should happen in small groups (~3-7 resources) so the PRs are easy to test and not overwhelming.

@danawillow
Copy link
Contributor

We should also probably update our examples/tests to use it

cc @slevenick since we were talking about this for a bit earlier

@danawillow
Copy link
Contributor

Riley to add more details before this goes to bug triage folks

@danawillow danawillow added this to the Goals milestone Feb 3, 2020
modular-magician added a commit to modular-magician/terraform-provider-google that referenced this issue Mar 18, 2020
* fixed ids for hashicorp#5542

* fixed ids for hashicorp#5542 and replacing self_links

* fixed ids for hashicorp#5542

* Update datasource_google_compute_backend_service.html.markdown

(forcing update to build)

* Updated id value

Co-authored-by: edward <[email protected]>
Co-authored-by: emily <[email protected]>
Signed-off-by: Modular Magician <[email protected]>
modular-magician added a commit that referenced this issue Mar 18, 2020
* fixed ids for #5542

* fixed ids for #5542 and replacing self_links

* fixed ids for #5542

* Update datasource_google_compute_backend_service.html.markdown

(forcing update to build)

* Updated id value

Co-authored-by: edward <[email protected]>
Co-authored-by: emily <[email protected]>
Signed-off-by: Modular Magician <[email protected]>

Co-authored-by: edward <[email protected]>
Co-authored-by: emily <[email protected]>
@rileykarson
Copy link
Collaborator Author

@edwardmedia did GoogleCloudPlatform/magic-modules#3205 fix every id, or are some remaining?

@ghost
Copy link

ghost commented Apr 17, 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 Apr 17, 2020
@edwardmedia edwardmedia reopened this Apr 29, 2020
@c2thorn c2thorn reopened this May 11, 2020
@edwardmedia
Copy link
Contributor

edwardmedia commented May 27, 2020

The work is complete. Some examples remain unchanged as their tests are failing.

@danawillow
Copy link
Contributor

@edwardmedia do you have a list of examples that this doesn't work for? It would be worth having that so we can fix the resources in question.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.