-
Notifications
You must be signed in to change notification settings - Fork 39
[User Guide] Quick Start Phase 1 Service Principal
github-actions edited this page Jul 10, 2024
·
2 revisions
- Navigate to the Azure Portal and sign in to your tenant.
- Search for
Azure Active Directory
and open it. - Copy the
Tenant ID
field and save it somewhere safe, making a note it is theARM_TENANT_ID
. - Click
App registrations
in the left navigation. - Click
+ New registration
. - Choose a name (SPN) that you will remember and make a note of it, we recommend using
sp-alz-bootstrap
. - Type the chosen name into the
Name
field. - Leave the other settings as default and click
Register
. - Wait for it to be created.
- Copy the
Application (client) ID
field and save it somewhere safe, making a note it is theARM_CLIENT_ID
. - Click
Certificates & secrets
in the left navigation. - Ensure the
Client secrets
tab is selected and click+ New client secret
. - Enter
ALZ Bootstrap
in theDescription
field. - Change the
Expires
field, chooseCustom
. - Set the
Start
field to todays date. - Set the
End
field to tomorrows date. - Click
Add
. - Copy the
Value
field save it somewhere safe, making a note that it is theARM_CLIENT_SECRET
.
- The service principal name (SPN) is the username of the User account or the name of the app registration you created.
- Search for
Subscriptions
and click to navigate to the subscription view. - For each of the subscriptions you created in the previous step:
- Navigate to the subscription.
- Click
Access control (IAM)
in the left navigation. - Click
+ Add
and chooseAdd role assignment
. - Choose the
Privileged administrator roles
tab. - Click
Owner
to highlight the row and then clickNext
. - Leave the
User, group or service principal
option checked. - Click
+ Select Members
and search for your SPN in the search box on the right. - Click on your User to highlight it and then click
Select
and then clickNext
. - Click the
Allow user to assign all roles (highly privileged)
option. - Click
Review + assign
, then clickReview + assign
again when the warning appears. - Wait for the role to be assigned and move onto the next subscription.
- Search for
Management Groups
and click to navigate to the management groups view. - Click the parent management group you plan to deploy the Landing Zone into (this could be
Tenant Root Group
or a new management group you created). - Click
Access control (IAM)
in the left navigation. - Click
+ Add
and chooseAdd role assignment
. - Choose the
Privileged administrator roles
tab. - Click
Owner
to highlight the row and then clickNext
. - Click
Next
. - Leave the
User, group or service principal
option checked. - Click
+ Select Members
and search for your SPN in the search box on the right. - Click on your User to highlight it and then click
Select
. - Click
Review + assign
, then clickReview + assign
again when the warning appears. - Wait for the role to be assigned and you are done with this part.
- Open a new PowerShell Core (pwsh) terminal.
- Find the
ARM_TENANT_ID
you made a note of earlier. - Type
$env:ARM_TENANT_ID="<tenant id>"
and hit enter. - Find the
ARM_CLIENT_ID
you made a note of earlier. - Type
$env:ARM_CLIENT_ID="<client id>"
and hit enter. - Find the
ARM_CLIENT_SECRET
you made a note of earlier. - Type
$env:ARM_CLIENT_SECRET="<client id>"
and hit enter. - Find the subscription id of the management subscription you made a note of earlier.
- Type
$env:ARM_SUBSCRIPTION_ID="<subscription id>"
and hit enter.
[!NOTE] If you close your PowerShell prompt prior to running the bootstrap, you need to re-enter these environment variables.
Return to Phase 1 step 1.4.
This wiki is being actively developed
If you discover any documentation bugs or would like to request new content, please raise them as an issue or feel free to contribute to the wiki via a pull request. The wiki docs are located in the repository in the docs/wiki/
folder.
- Home
-
User guide
- Getting started
- Quick Start
- Starter Modules
- Input Files
- Azure DevOps Bicep Complete
- Azure DevOps Terraform Complete Multi Region
- Azure DevOps Terraform Financial Services Industry Landing Zone
- Azure DevOps Terraform Sovereign Landing Zone
- Azure DevOps Terraform Basic
- Azure DevOps Terraform Hub Networking
- Azure DevOps Terraform Complete
- GitHub Bicep Complete
- GitHub Terraform Complete Multi Region
- GitHub Terraform Financial Services Industry Landing Zone
- GitHub Terraform Sovereign Landing Zone
- GitHub Terraform Basic
- GitHub Terraform Hub Networking
- GitHub Terraform Complete
- Local Bicep Complete
- Local Terraform Complete Multi Region
- Local Terraform Financial Services Industry Landing Zone
- Local Terraform Sovereign Landing Zone
- Local Terraform Basic
- Local Terraform Hub Networking
- Local Terraform Complete
- Frequently Asked Questions
- Upgrade Guide
- Advanced Scenarios
- Troubleshooting
- Contributing