The Cloud Adoption Framework for Azure - Terraform module can be used to deployed all components of CAF and compose those components together. It allows you to create complex architectures and composition relying on community contributions and proven patterns. You can leverage this module within a CAF landing zone, or straight from the Terraform registry.
You can instantiate this module directly using the following syntax:
module "caf" {
source = "aztfmod/caf/azurerm"
version = "5.4.2"
# insert the 7 required variables here
}
A minimal example could be:
module "caf" {
source = "aztfmod/caf/azurerm"
version = "5.4.2"
global_settings = var.global_settings
resource_groups = var.resource_groups
keyvaults = var.keyvaults
compute = {
virtual_machines = var.virtual_machines
}
networking = {
public_ip_addresses = var.public_ip_addresses
vnets = var.vnets
}
}
You can find here a minimal example
The current folder contains an example of module with the whole features set of the module, to run all the examples in the subfolders. You can leverage it the following way:
cd /tf/caf/examples
az login
terraform init
terraform plan -var-file <path to your variable file>
terraform apply -var-file <path to your variable file>
terraform destroy -var-file <path to your variable file>
To get started with the deployment within rover, follow the steps:
rover login
### you can alternatively specify the tenant space and subscription ID on command line arguments:
rover login --tenant <tenant_name>.onmicrosoft.com -s <subscription_id>
rover -lz /tf/caf/landingzones/caf_launchpad \
-launchpad \
-var-folder /tf/caf/landingzones/caf_launchpad/scenario/100 \
-a apply
rover -lz /tf/caf/landingzones/caf_example \
-var-folder /tf/caf/examples/<path of the example> \
-a plan|apply