-
Notifications
You must be signed in to change notification settings - Fork 39
[User Guide] Quick Start Phase 1
Phase 1 of the accelerator is to setup your pre-requisites. Follow the steps below to do that.
You'll need to install the following tools before getting started.
- PowerShell 7.4 (or newer): Follow the instructions for your operating system
- Azure CLI 2.55.0 (or newer): Follow the instructions for your operating system
NOTE: In all cases, ensure that the tools are available from a PowerShell core (pwsh) terminal. You may need to add them to your environment path if they are not.
We recommend setting up 3 subscriptions for Azure landing zones. These are management, identity and connectivity. See our advanced scenarios section for alternatives.
- Management: This is used to deploy the bootstrap and management resources, such as log analytics and automation accounts.
- Identity: This is used to deploy the identity resources, such as Azure AD and Azure AD Domain Services.
- Connectivity: This is used to deploy the hub networking resources, such as virtual networks and firewalls.
You can read more about the management, identity and connectivity subscriptions in the Landing Zone docs.
To create the subscriptions you will need access to a billing agreement. The following links detail the permissions required for each type of agreement:
Once you have the access required, create the three subscriptions following your desired naming convention.
Take note of the subscription id of each subscription as we will need them later.
You need either an Azure User Account or Service Principal with the following permissions to run the bootstrap:
-
Owner
on your chosen parent management group for the Azure landing zone. This could beTenant Root Group
or a new management group you create under there if preferred.- Owner is required as this account will be granting permissions for the identities that run the management group deployment. Those identities will be granted least privilege permissions.
-
Owner
on each of your 3 Azure landing zone subscriptions.
For simplicity we recommend using a User account since this is a one off process that you are unlikely to repeat.
- Open a new PowerShell Core (pwsh) terminal.
- Run
az login
. - You'll be redirected to a browser to login, perform MFA, etc.
- Find the subscription id of the management subscription you made a note of earlier.
- Type
az account set --subscription "<subscription id of your management subscription>"
and hit enter. - Type
az account show
and verify that you are connected to the management subscription.
Follow the instructions in the Service Principal section.
You'll need to decide if you are using GitHub, Azure DevOps or the Local File System and follow these steps:
When you first create an Azure DevOps organization, it will not have any Microsoft-hosted agents available. If you intend to use Microsoft-hosted agents, you must either license your org or request a free pipeline.
- Setup billing for your organization: Set up billing for your organization
- Check for and request a free pipeline via the form here: Configure and pay for parallel jobs
If you choose the billing option, you'll then need to purchase at least one parallel pipeline. You can do this by following the instructions here: Configure and pay for parallel jobs.
This first PAT is referred to as token-1
.
- Navigate to dev.azure.com and sign in to your organization.
- Ensure you navigate to the organization you want to deploy to.
- Click the
User settings
icon in the top right and selectPersonal access tokens
. - Click
+ New Token
. - Enter
Azure Landing Zone Terraform Accelerator
in theName
field. - Alter the
Expiration
drop down and selectCustom defined
. - Choose tomorrows date in the date picker.
- Click the
Show all scopes
link at the bottom. - Check the following scopes:
-
Agent Pools
:Read & manage
-
Build
:Read & execute
-
Code
:Full
-
Environment
:Read & manage
-
Graph
:Read & manage
-
Pipeline Resources
:Use & manage
-
Project and Team
:Read, write & manage
-
Service Connections
:Read, query & manage
-
Variable Groups
:Read, create & manage
-
- Click
Create
. - Copy the token and save it somewhere safe.
- Click
Close
.
If you are using self-hosted runners, you will need to create a second PAT that we'll refer to as token-2
for them. You can do this by following the steps above with the following differences:
- Select the maximum value for the
Expiration
field (this allows up to 1 year). NOTE: You may want to set a shorter expiration date for security reasons. In either case, you will need to have a process in place to extend expiration the token before it expires. - Select only the
Agent Pools
:Read & manage
scope.
The accelerator does not support GitHub personal accounts, since they don't support all the features required for security. You must have a GitHub organization account or the accelerator will fail on apply. You can create a free organization here. Learn more about account types here.
NOTE: If you choose to use a
free
organization account the accelerator bootstrap will make your repositories public. It must do this to support the functionality required by the accelerator. This is not recommended for production environments.
NOTE: The following instructions refer to
classic
personal access tokens. You can also usefine-grained
access tokens which are still in beta to provide more granular permissions. These docs will be updated to reflect this in the future.
This first PAT is referred to as token-1
.
- Navigate to github.com.
- Click on your user icon in the top right and select
Settings
. - Scroll down and click on
Developer Settings
in the left navigation. - Click
Personal access tokens
in the left navigation and selectTokens (classic)
. - Click
Generate new token
at the top and selectGenerate new token (classic)
. - Enter
Azure Landing Zone Terraform Accelerator
in theNote
field. - Alter the
Expiration
drop down and selectCustom
. - Choose tomorrows date in the date picker.
- Check the following scopes:
repo
workflow
admin:org
-
user
:read:user
-
user
:user:email
delete_repo
- Click
Generate token
. - Copy the token and save it somewhere safe.
- If your organization uses single sign on, then click the
Configure SSO
link next to your new PAT. - Select your organization and click
Authorize
, then follow the prompts to allow SSO.
If you are using self-hosted runners, you will need to create a second PAT that we'll refer to as token-2
for them. You can do this by following the steps above with the following differences:
- Select
No expiration
for theExpiration
field. NOTE: You may want to set an expiration date for security reasons, but you will need to have a process in place to regenerate the token in that scenario. - The scope required depends on the type of organization you are using:
- If you are using a Free organization or an Enterprise orgnization without a runner group, select only the
repo
scope. - If you are using an Enterprise organization and a runner group, select the
admin:org
scope for classic tokens (ororganization_self_hosted_runners:write
for fine-grained tokens).
- If you are using a Free organization or an Enterprise orgnization without a runner group, select only the
You just need to ensure that you have a folder on your local file system that you can use to store the files, which your current session has access to.
Now head to Phase 2.
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