-
Notifications
You must be signed in to change notification settings - Fork 37
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
Custom resource for Azure PIM role management policies #3663
Open
thomas11
wants to merge
8
commits into
master
Choose a base branch
from
tkappler/pim2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
Does the PR have any schema changes?Looking good! No breaking changes found. New resources:
New functions:
|
thomas11
force-pushed
the
tkappler/pim2
branch
from
October 24, 2024 16:24
e75e3f2
to
5c2b57a
Compare
thomas11
force-pushed
the
tkappler/pim2
branch
from
October 24, 2024 22:37
5c2b57a
to
5cba82d
Compare
thomas11
force-pushed
the
tkappler/pim2
branch
from
January 24, 2025 17:44
af07a66
to
110615d
Compare
thomas11
changed the title
Azure Entra PIM custom resource
Custom resource for Azure PIM role management policies
Jan 24, 2025
thomas11
force-pushed
the
tkappler/pim2
branch
from
January 27, 2025 06:11
110615d
to
58fab79
Compare
'Delete' isn't implemented yet.
…rnal validation via azure SDK
…oesn't know about path properties
thomas11
force-pushed
the
tkappler/pim2
branch
from
January 27, 2025 06:47
58fab79
to
dd99599
Compare
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.
About
This PR adds support for Role Management Policies, part of Privileged Identity Management (PIM) in the Microsoft.Authentication namespace. It's one part of #2455.
Note that this is about the ARM part of PIM; there's also a Microsoft Graph API part which is not covered by this provider.
This resource wasn't automatically included because it supports only GET and PATCH. The policies are singletons that cannot be created or deleted, only modified via PATCH.
Implementation
Role Management Policies essentially consist of a name which is actually a GUID, and a list of ~20 rules.
Using our existing singleton support
defaults.GetDefaultResourceState
was tricky becauseSo instead, I've implemented a custom resource that captures the original state of a policy when it's first "created", i.e., added to Pulumi state. When a rule or the whole policy is removed from Pulumi, we look up the original state and re-apply it.
Testing
The e2e/integration test for this resource is special because using PIM requires a paid Entra ID P2 license. We have one that you can see here.