Add state migration for federated_identity_credential parent_id deprecation#32169
Closed
utafrali wants to merge 1 commit intohashicorp:mainfrom
Closed
Conversation
1 task
Collaborator
|
Hi @utafrali - Thanks for your interest in contributing to the provider! While this change does technically resolve the linked issue, since this is only a problem when running a plan/apply operation without a refresh step (i.e. State migrations are one-way only, meaning as soon as this is merged, users will no longer be able to downgrade to a previous minor version of the provider which is arguably a bigger issue than needing to run a plan/apply operation with a refresh (which the majority of users likely already do) Because of this, I'm going to close this PR. |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #32074
Description
The deprecation of
parent_idin favor ofuser_assigned_identity_idwas breaking for users with existing state. Added a state migration to handle the upgrade path so existing resources don't break when users upgrade the provider.PR Checklist
Changes to existing Resource / Data Source
Updated
FederatedIdentityCredentialResourceto implementResourceWithStateMigrationand added theStateUpgraders()method that registers the v0 to v1 migration. The migration logic copies the value fromparent_idtouser_assigned_identity_id.Testing
Added
TestAccFederatedIdentityCredential_parentIdToUserAssignedIdentityIdwhich verifies the migration works by creating a resource with the old config and upgrading to the new one. The test is gated with the feature flag so it only runs on pre-5.0 versions.Change Log
N/A
Related Issue(s)
Closes #32074
AI Assistance Disclosure
N/A