You can choose to bootstrap with bicep or terraform skip to the relevant section below to do that.
Although you can just run Deploy-Accelerator and fill out the prompted inputs, we recommend creating an inputs file. This will make it easier to run the accelerator more than once in order to refine your preferred configuration. In the following docs, we'll show that approach, but if you want to be prompted for inputs, just go ahead and run Deploy-Accelerator now.
-
Create a new folder on you local drive called
accelerator. -
Inside the accelerator create two folders called
configandoutput. You'll store you input file inside config and the output folder will be the place that the accelerator stores files while it works. -
Inside the
configfolder create a new file calledinputs.yaml. You can usejsonif you prefer, but our examples here areyaml.# Windows New-Item -ItemType "file" c:\accelerator\config\inputs.yaml -Force New-Item -ItemType "directory" c:\accelerator\output # Linux/Mac New-Item -ItemType "file" ~/accelerator/config/inputs.yaml -Force New-Item -ItemType "directory" ~/accelerator/output
📂accelerator ┣ 📂config ┃ ┗ 📜inputs.yaml ┗ 📂output -
Open your
inputs.yamlfile in Visual Studio Code (or your preferred editor) and copy the content from inputs-github-local.yaml into that file. -
Check through the file and update each input as required. It is mandatory to update items with placeholders surrounded by angle brackets
<>:Input Placeholder Description iacbicepThis is the choice of biceporterraform. Keep this asbicepfor this example.bootstrapalz_localThis is the choice of Version Control System. Keep this as alz_localfor this example.startercompleteThis is the choice of Starter Modules, which is the baseline configuration you want for your Azure landing zone. Keep this as completefor this example. This also determines the second set of inputs you'll be prompted for.bootstrap_location<region>Replace <region>with the Azure region where you would like to deploy the bootstrap resources in Azure. This field expects thenameof the region, such asuksouth. You can find a full list of names by runningaz account list-locations -o table.starter_location<region>Replace <region>with the Azure region where you would like to deploy the starter module resources in Azure. This field expects thenameof the region, such asuksouth. You can find a full list of names by runningaz account list-locations -o table.root_parent_management_group_id""This is the id of the management group that will be the parent of the management group structure created by the accelerator. If you are using the Tenant Root Groupmanagement group, you leave this as an empty string""or supply the tenant id.subscription_id_management<management-subscription-id>Replace <management-subscription-id>with the id of the management subscription you created in the previous phase.subscription_id_identity<identity-subscription-id>Replace <identity-subscription-id>with the id of the identity subscription you created in the previous phase.subscription_id_connectivity<connectivity-subscription-id>Replace <connectivity-subscription-id>with the id of the connectivity subscription you created in the previous phase.target_directory<target-directory>This is the directory where the ALZ module code will be created. This defaults a directory called localin the root of the accelerator directory if not supplied.create_bootstrap_resources_in_azuretrueThis determines whether the bootstrap will create the bootstrap resources in Azure. This defaults to true.bootstrap_subscription_id<bootstrap-subscription-id>Replace <subscription-id>with the id of the subscription in which you would like to deploy the bootstrap resources in Azure. If left blank, the subscription you are connected to viaaz loginwill be used. In most cases this is the management subscription, but you can specifiy a separate subscription if you prefer.service_namealzThis is used to build up the names of your Azure and Azure DevOps resources, for example rg-<service_name>-mgmt-uksouth-001. We recommend usingalzfor this.environment_namemgmtThis is used to build up the names of your Azure and Azure DevOps resources, for example rg-alz-<environment_name>-uksouth-001. We recommend usingmgmtfor this.postfix_number1This is used to build up the names of your Azure and Azure DevOps resources, for example rg-alz-mgmt-uksouth-<postfix_number>. We recommend using1for this. -
Now head over to your chosen starter module documentation to get the specific inputs for that module. Come back here when you are done.
-
In your PowerShell Core (pwsh) terminal run the module:
# Windows (adjust the paths to match your setup) Deploy-Accelerator -inputs "c:\accelerator\config\inputs.yaml" -output "c:\accelerator\output" # Linux/Mac (adjust the paths to match your setup) Deploy-Accelerator -inputs "~/accelerator/config/inputs.yaml" -output "~/accelerator/output"
-
You will see a Terraform
initandapplyhappen. -
There will be a pause after the
planphase you allow you to validate what is going to be deployed. -
If you are happy with the plan, then type
yesand hit enter. -
The Terraform will
applyand your environment will be bootstrapped.
-
Create a new folder on you local drive called
accelerator. -
Inside the accelerator create two folders called
configandoutput. You'll store you input file inside config and the output folder will be the place that the accelerator stores files while it works. -
Inside the
configfolder create a new file calledinputs.yaml. You can usejsonif you prefer, but our examples here areyaml.# Windows New-Item -ItemType "file" c:\accelerator\config\inputs.yaml -Force New-Item -ItemType "directory" c:\accelerator\output
# Linux/Mac New-Item -ItemType "file" ~/accelerator/config/inputs.yaml -Force New-Item -ItemType "directory" ~/accelerator/output
📂accelerator ┣ 📂config ┃ ┗ 📜inputs.yaml ┗ 📂output -
Open your
inputs.yamlfile in Visual Studio Code (or your preferred editor) and copy the content from inputs-local-terraform.yaml into that file. -
Check through the file and update each input as required. It is mandatory to update items with placeholders surrounded by angle brackets
<>:Input Placeholder Description iacterraformThis is the choice of biceporterraform. Keep this asterraformfor this example.bootstrapalz_localThis is the choice of Version Control System. Keep this as alz_localfor this example.startercompleteThis is the choice of Starter Modules, which is the baseline configuration you want for your Azure landing zone. Choose complete,hubnetworkingorbasicfor this example. This also determines the second set of inputs you'll be prompted for.bootstrap_location<region>Replace <region>with the Azure region where you would like to deploy the bootstrap resources in Azure. This field expects thenameof the region, such asuksouth. You can find a full list of names by runningaz account list-locations -o table.starter_location<region>Replace <region>with the Azure region where you would like to deploy the starter module resources in Azure. This field expects thenameof the region, such asuksouth. You can find a full list of names by runningaz account list-locations -o table.root_parent_management_group_id""This is the id of the management group that will be the parent of the management group structure created by the accelerator. If you are using the Tenant Root Groupmanagement group, you leave this as an empty string""or supply the tenant id.subscription_id_management<management-subscription-id>Replace <management-subscription-id>with the id of the management subscription you created in the previous phase.subscription_id_identity<identity-subscription-id>Replace <identity-subscription-id>with the id of the identity subscription you created in the previous phase.subscription_id_connectivity<connectivity-subscription-id>Replace <connectivity-subscription-id>with the id of the connectivity subscription you created in the previous phase.target_directory<target-directory>This is the directory where the ALZ module code will be created. This defaults a directory called localin the root of the accelerator directory if not supplied.create_bootstrap_resources_in_azuretrueThis determines whether the bootstrap will create the bootstrap resources in Azure. This defaults to true.bootstrap_subscription_id<bootstrap-subscription-id>Replace <subscription-id>with the id of the subscription in which you would like to deploy the bootstrap resources in Azure. If left blank, the subscription you are connected to viaaz loginwill be used. In most cases this is the management subscription, but you can specifiy a separate subscription if you prefer.service_namealzThis is used to build up the names of your Azure and Azure DevOps resources, for example rg-<service_name>-mgmt-uksouth-001. We recommend usingalzfor this.environment_namemgmtThis is used to build up the names of your Azure and Azure DevOps resources, for example rg-alz-<environment_name>-uksouth-001. We recommend usingmgmtfor this.postfix_number1This is used to build up the names of your Azure and Azure DevOps resources, for example rg-alz-mgmt-uksouth-<postfix_number>. We recommend using1for this. -
Now head over to your chosen starter module documentation to get the specific inputs for that module. Come back here when you are done.
- Terraform Basic Starter Module: Management groups and policies.
- Terraform Hub Networking Starter Module: Management groups, policies and hub networking.
- Terraform Complete Starter Module: Management groups, policies, hub networking with fully custom configuration.
-
In your PowerShell Core (pwsh) terminal run the module:
# Windows (adjust the paths to match your setup) Deploy-Accelerator -inputs "c:\accelerator\config\inputs.yaml" -output "c:\accelerator\output"
# Linux/Mac (adjust the paths to match your setup) Deploy-Accelerator -inputs "~/accelerator/config/inputs.yaml" -output "~/accelerator/output"
-
You will see a Terraform
initandapplyhappen. -
There will be a pause after the
planphase you allow you to validate what is going to be deployed. -
If you are happy with the plan, then type
yesand hit enter. -
The Terraform will
applyand your environment will be bootstrapped.
Now head to Phase 3.