- Notifications
You must be signed in to change notification settings - Fork101
ResourceIdentity: Add support for import by identity and update pass-through implementations#1126
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
One thing not included in this PR is an implementation of an "identity => import stub state" pass-through. I'm still not 100% sure what provider developers will prefer in-terms of helper functions, but we can easily create a new one if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
✨
db08a72
intomainUh oh!
There was an error while loading.Please reload this page.
This PR adds support for plannable import by resource identity, which is first supported in Terraform
v1.12.0-beta1
.Today, the only supported plannable import data is the
id
field, which is just a string that provider typically just redirects to theimport stub state:Now, if the resource supports identity, the import block will allow the identity to be supplied in the
identity
attribute:The identity is automatically passed through to the
Read
implementation, which typically does the heavy lifting for populating state of an imported resource, however the provider can choose to populate the identity with more information, set data in the import stub state, etc.