TFECO-9155: Support importing by resource identity for sdkv2 resource#333
Merged
TFECO-9155: Support importing by resource identity for sdkv2 resource#333
Conversation
1bcce18 to
af1f0af
Compare
72181c9 to
1cf238e
Compare
austinvalle
reviewed
Apr 22, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for importing resources by resource identity for the sdkv2 provider while transitioning from the legacy email field to separate local_part and domain fields.
- Updated the resource identity schema and identity upgrader to split the email field.
- Enhanced the importer to reconstruct the email from the new identity fields.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| internal/sdkv2provider/resource_user_identity_test.go | Test updates to verify identity splitting and importer behavior. |
| internal/sdkv2provider/resource_user_identity.go | Changes to support resource identity import with versioned schema. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
austinvalle
reviewed
May 2, 2025
96ac190 to
840533f
Compare
840533f to
22cec49
Compare
austinvalle
reviewed
May 7, 2025
Member
austinvalle
left a comment
There was a problem hiding this comment.
Changes look good! One nit and looks like the go.mod needs to be updated for that new identity pass through 👍🏻
brandonc
pushed a commit
to brandonc/terraform-provider-corner
that referenced
this pull request
May 28, 2025
…hashicorp#333) * support importing by resource identity for sdkv2 resource * add steps to test import from identity * updated the version * tested resource identity upgrade by manually changing identity version * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * split identity schema upgrade test into it's own resource and test case * fix identity upgrader version * update to latest main of plugin-sdk, drop unused upgrade function, tidy go mod * use tagged switch to please linter --------- Co-authored-by: Austin Valle <austinvalle@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
depends on hashicorp/terraform-plugin-sdk#1463