-
Notifications
You must be signed in to change notification settings - Fork 15
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
Use Pulumi to create Entra applications #2248
Use Pulumi to create Entra applications #2248
Conversation
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
b76de51
to
4d7ff34
Compare
d211fe6
to
810d86e
Compare
59078dd
to
3d5f21a
Compare
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.
Looks good I think moving more of this stuff to community supported Pulumi modules will help a lot.
Just a few style questions.
data_safe_haven/infrastructure/components/composite/entra_application.py
Outdated
Show resolved
Hide resolved
data_safe_haven/infrastructure/components/composite/entra_application.py
Outdated
Show resolved
Hide resolved
@JimMadge : My biggest worry here is that we add an entry for the Microsoft Graph Service Principal to our state file. This contains a huge amount of data (which more than doubles the size of the state file). Since we're only using it to get the GUIDs for various named permissions, we could replace the bits we need with an Enum or lookup-table. However, this would mean that we would be out-of-sync if any of these GUIDs changed (unlikely to happen as this would break a lot of third-party code). What do you think? |
@jemrobinson is that the long version of the note about How large is it exactly, does it cause problems? |
Yes
About 12k lines (of which we use maybe 4-5 lines) of a 30k JSON file for a full SRE deployment. Also, we should note that the GraphApi class already has a partial copy of this (see below), so abstracting it into a common class could actually simplify our current structure. data-safe-haven/data_safe_haven/external/api/graph_api.py Lines 27 to 49 in 1bf9d0c
|
…e used to seed the pulumi-azuread provider
…s since these set the provider information in the state file and cannot be changed
bc3db5a
to
7ef3d6c
Compare
@jemrobinson That sounds like a good idea then, if the stack doesn't really need the full set 👍. I'm not super worried though because it is just a few kb in a file we don't expect people to read or edit by hand. |
@JimMadge : this is actually a bigger refactor than I'd realised. Let's merge this as-is (if you're happy). |
✅ Checklist
Enable foobar integration
rather than515 foobar
).develop
.🚦 Depends on
n/a
Replace creation of SRE Entra applications through the SDK with creation through
pulumi-azuread
.Note we still need one SDK-created Entra application in the SHM which is used to authenticate
pulumi-azuread
.The
msgraph_permissions
map looks up the GUIDs for all possible permissions. We could consider replacing this with a static lookup table that only covers the ones we need.🌂 Related issues
Closes #2215
🔬 Tests
Tested on a fresh SRE deployment