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

config: Make 'id' a reserved field name #15695

Merged
merged 1 commit into from
Aug 4, 2017
Merged

config: Make 'id' a reserved field name #15695

merged 1 commit into from
Aug 4, 2017

Conversation

radeksimko
Copy link
Member

This is to prevent mistakes like #9366 and generally to improve dev experience.

I could add a test, but both slices are already tested and it seems unnecessary to test just a one new item in existing slice.

@jbardin
Copy link
Member

jbardin commented Aug 4, 2017

This LGTM as long as we're sure that it's not breaking any provider mistakingly using id. Because this is handled in the config loader, I don't think it would be caught by the ACC tests themselves.

@radeksimko
Copy link
Member Author

it's not breaking any provider mistakingly using id.

if there's a resource with such field then that field is useless in the schema anyways AFAIK.

I don't think it would be caught by the ACC tests themselves

it will emerge in tests once we start bumping vendored hashicorp/terraform in all providers, because each provider test calls InternalValidate() where this will be reported. Also, we're intentionally bypassing this check for Deprecated & Removed fields, so that things can disappear gracefully - but frankly in case of id (or most other reserved fields) there's really no need to deprecate it, because they get removed before the CRUD even gets chance to read them.

@jbardin
Copy link
Member

jbardin commented Aug 4, 2017

thanks for confirming @radeksimko ;)
👍

@ghost
Copy link

ghost commented Apr 8, 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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants