Deploy with Terraform
On this page
Example of deploying AMBA-ALZExample of deploying a Custom ArchitectureExample of deploying with Custom Policy AssignmentsData CollectionNext Steps
Choose one of the examples
- Example of deploying AMBA-ALZ: This example demonstrates how to deploy the AMBA-ALZ pattern using an existing management group hierarchy with default naming as used in the ALZ Architecture Definition.
- Example of deploying a Custom Architecture: This example demonstrates how to deploy the AMBA-ALZ pattern using an existing custom management group hierarchy.
- Example of deploying with Custom Policy Assignments: It is possible to tailor the Policy Definitions that are deployed and assigned by developing custom archetypes. This example demonstrates a situation where only Service Health is deployed, but can be applied to other policy assignments as well.
Example of deploying AMBA-ALZ
This example demonstrates how to deploy the AMBA-ALZ pattern using an existing management group hierarchy with default naming as used in the ALZ Architecture Definition.
Create a new directory, for example
tf-amba-alz.Open Visual Studio Code or another preferred tool.
Select
Open Folder...from the File menu (or Ctrl+K Ctrl+O) and opentf-amba-alzOpen a Terminal (PowerShell).
Note
Depending on the tool being used, it may be necessary to change the terminal to the
tf-amba-alzdirectory.Download
terraform.tfDownload
main.tfDownload
variables.tfThe source and version of the module need to be updated in
main.tf. Findmodule "amba_alz"and replaceWith:
Review the variables in
variables.tfand update default values as needed.Log in to Azure:
az loginRun:
terraform initRun:
terraform apply
Note
This feature is only available for Management Group scenario. Subscription deployment scenario is not available yet.
Example of deploying a Custom Architecture
This example demonstrates how to deploy the AMBA-ALZ pattern using an existing custom management group hierarchy.
Create a new directory, for example
tf-amba-alz.Open Visual Studio Code or another preferred tool.
Select
Open Folder...from the File menu (or Ctrl+K Ctrl+O) and opentf-amba-alzOpen a Terminal (PowerShell).
Note
Depending on the tool being used, it may be necessary to change the terminal to the
tf-amba-alzdirectory.Download
terraform.tfDownload
main.tfDownload
variables.tfThe source and version of the module need to be updated in
main.tf. Findmodule "amba_alz"and replaceWith:
Review the variables in
variables.tfand update default values as needed.Set up a directory to store the custom library assets:
Download the
custom.alz_architecture_definition.jsonfile to thelibdirectory.Adjust the management group
display name,idandparent idin custom.alz_architecture_definition.json.Return to the
tf-amba-alzdirectory in the terminal.cd..Log in to Azure:
az loginRun:
terraform initRun:
terraform apply
Note
This feature is only available for Management Group scenario. Subscription deployment scenario is not available yet.
Example of deploying with Custom Policy Assignments
It is possible to tailor the Policy Definitions that are deployed and assigned by developing custom archetypes. This example demonstrates a situation where only Service Health is deployed, but can be applied to other policy assignments as well:
- Deploy using a custom management group hierarchy defined by architecture definition file in the local library.
- Use a custom root archetype to ensure that the Service Health policy definitions and assignments are deployed.
Deployment:
Create a new directory, for example
tf-amba-alz.Open Visual Studio Code or another preferred tool.
Select
Open Folder...from the File menu (or Ctrl+K Ctrl+O) and opentf-amba-alzOpen a Terminal (PowerShell).
Note
Depending on the tool being used, it may be necessary to change the terminal to the
tf-amba-alzdirectory.Download
terraform.tfDownload
main.tfDownload
variables.tfThe source and version of the module need to be updated in
main.tf. Findmodule "amba_alz"and replaceWith:
Review the variables in
variables.tfand update default values as needed.Set up a directory to store the custom library assets:
Download the
custom.alz_architecture_definition.jsonfile to thelibdirectory.Adjust the management group
display name,idandparent idin custom.alz_architecture_definition.json.Download the
root.alz_archetype_definition.jsonfile to thelibdirectory.Return to the
tf-amba-alzdirectory in the terminal.cd..Log in to Azure:
az loginRun:
terraform initRun:
terraform apply
Note
This feature is only available for Management Group scenario. Subscription deployment scenario is not available yet.
Data Collection
The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
Next Steps
To remediate non-compliant policies, continue with Policy Remediation.