identity_governance: Updates access_package_resource_package_association to handle MS Graph resource ID changes#1830
Closed
philband wants to merge 1 commit intohashicorp:mainfrom
Closed
Conversation
…ion to handle MS Graph resource ID changes
|
Tested and works in my env. |
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.
Community Note
Description
This PR fixes the issue describes in #1828
MS Graph changed the format of the id of the accessPackageResourceRoleScope resource.
Previously it was a composited id, with format
{accessPackageResourceRole_id}_{accessPackageResourceScope_id}, now a new UUID was introduced for the base resourceaccessPackageResourceRoleScope.The change adds a fallback that triggers when a resource with the ID from the state cannot be found. The fallback then attempts to instead find the resource using the parts of the previous composite id. If sucessful it updates the state with the new, corrected id.
For deletion currently the Graph API seems even more broken: It only accepts IDs in the old format, returns HTTP/400 on attempts to delete with the new ID. Therefore I also added a fallback there which attempts to delete with the old ID format if the regular request fails.
Changes to existing Resource / Data Source
Testing
As this is a pure MS Graph backend change, I don't see how it should be testable.
Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
azuread_access_package_resource_package_association- fix Graph backend ID format changes [identity_governance: Updates access_package_resource_package_association to handle MS Graph resource ID changes #1830]This is a (please select all that apply):
Related Issue(s)
Fixes #1828
Rollback Plan
If a change needs to be reverted, we will publish an updated version of the provider.
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
Note
If this PR changes meaningfully during the course of review please update the title and description as required.