allow users to bring their own credentials and override MLZ Service Principal creation #315
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.
Description
This change proposes adding a
--no-service-principal
flag to deploy.sh in conjunction with two environment variablesARM_CLIENT_ID
andARM_CLIENT_SECRET
to deploy MLZ without creating a brand new Service Principal.This change allows those who do not have
Owner
RBAC permissions but have been given Subscriptions and a Service Principal withContributor
role to those subscriptions to deploy MissionLZ.Two new scripts were introduced with this change:
This script ensures the environment variables
ARM_CLIENT_ID
andARM_CLIENT_SECRET
are set and that the Service Principal exists.This scripts ensures that the user supplied Service Principal has at minimum a
Contributor
RBAC role scoped for each of the subscriptions the user is deploying into and provides the scripts the user would run to remediate the issue.A few good ways to test this:
Deploy with the
--no-service-principal
flag to test the environment variable check:Create yourself a new Service Principal, set the relevant environment variables, and attempt to deploy into multiple subscriptions without assigning the roles:
For more help, check the updated docs.
Issue reference
The issue this PR will close: #176
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list:
shellcheck
.vscode/extensions.json
.)