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

Standardize id formats and make it a useful value #1927

Closed
danawillow opened this issue Aug 22, 2018 · 7 comments
Closed

Standardize id formats and make it a useful value #1927

danawillow opened this issue Aug 22, 2018 · 7 comments

Comments

@danawillow
Copy link
Contributor

We have a bunch of examples and tests that depend on the ID field, but we don't want our users to have to know the format of that field, and we want the ability to change that format at will. This issue entails making sure that every test and documentation example that relies on the id of a resource no longer does that, potentially adding new fields to existing resources that represent what we currently store as the id.

@danawillow
Copy link
Contributor Author

Just talked to @rileykarson about this, and a future world might end up going the exact opposite of this, where we use ID as the field to interpolate on for references to other resources, basically always. That becomes tricky for resources where, some things want different formats, but we might be able to get it working for most cases and document when it doesn't.

What we don't want, though, is a world where you sometimes use the id. This issue still holds for now, but loosely.

@rileykarson rileykarson added this to the 3.0.0 milestone Dec 14, 2018
@rileykarson
Copy link
Collaborator

Let's thing about this more when we get closer to 3.0.0 and can use MM for sweeping changes across even more of the codebase than we can today. Tagged with a milestone.

@paddycarver
Copy link
Contributor

Assigning this to myself to follow up with the core team about what rules exist around IDs that we need to make sure to follow.

@paddycarver
Copy link
Contributor

So I followed up with the core team, and it sounds like we can treat the ID field as a normal field, with these caveats:

  • I believe we can only really change the ID when creating a resource, or when refreshing a resource. That is, all the rules from Fit our state-setting model to the protocol #4328 apply here.
  • Because 0.11 treated ID as special sometimes, and the shims are unpredictable, we want to make sure we test the functionality with some rigor to make sure the implementation doesn't have any weirdness. But this should be treated more like a regular field in future versions of the SDK, not less, so I think treating it as a regular field ourselves is moving in the right direction.

@paddycarver
Copy link
Contributor

Leaving this issue assigned to me until we can set a new owner for it tomorrow (that owner may still end up being me, but let's at least talk about it.)

@slevenick slevenick self-assigned this Oct 3, 2019
@paddycarver paddycarver removed their assignment Oct 3, 2019
@rileykarson rileykarson changed the title Stop depending on the ID field in examples and tests Standardize id formats and make it a useful value Oct 11, 2019
@rileykarson
Copy link
Collaborator

@slevenick: Updated the title to reflect reality, feel free to change it if I've got it wrong or you've got a better idea 🙂

@ghost
Copy link

ghost commented Nov 30, 2019

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 Nov 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants