Skip to content

Base terraform modules for the enterprise-scale landing zones on Terraform part of Azure Cloud Adoption Framework

License

Notifications You must be signed in to change notification settings

onkarpathre/terraform-azurerm-caf

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VScodespaces

Azure Cloud Adoption Framework - enterprise-scale on Terraform module

This is a preview of azurerm module for enterprise-scale landing zones on Terraform. Microsoft Cloud Adoption Framework for Azure provides you with guidance and best practices to adopt Azure.

Core enterprise-scale components

Deploying the core of enterprise-scale landing zones will use two elements:

This module can be called from landing zones using the Terraform registry: https://registry.terraform.io/modules/aztfmod/caf-enterprise-scale/azurerm/

module "caf-enterprise-scale" {
  source  = "aztfmod/caf-enterprise-scale/azurerm"
  version = "~>0.2"
  # insert the 7 required variables here
}

Getting started

  1. Prerequisites are the same as for current version of landing zones, please setup your environment using the following guide: https://github.com/Azure/caf-terraform-landingzones/blob/master/documentation/getting_started/getting_started.md.

  2. Clone the Azure landing zones repo:

git clone --branch vnext https://github.com/Azure/caf-terraform-landingzones.git /tf/caf/public
  1. Log in the subscription with the rover:
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>
  1. Deploy the basic launchpad:
rover -lz /tf/caf/public/landingzones/caf_launchpad -launchpad -var-file /tf/caf/public/landingzones/caf_launchpad/scenario/100/configuration.tfvars -a apply

Once completed you would see 2 resource groups in your subscription. The scenario 100 is pretty basic and include the minimum to get the terraform remote state management working.

  1. Upgrade to advanced launchpad (if you have Azure AD permissions - not working on AIRS):
rover -lz /tf/caf/public/landingzones/caf_launchpad -launchpad -var-file /tf/caf/public/landingzones/caf_launchpad/scenario/200/configuration.tfvars -a apply
  1. Deploy the caf_foundations. This is currently mostly a stub, but will implement enterprise management groups, policies, alerts, etc.:
rover -lz /tf/caf/public/landingzones/caf_foundations -a apply
  1. Deploy a networking scenario:
rover -lz /tf/caf/public/landingzones/caf_networking/ -var-file /tf/caf/public/landingzones/caf_networking/scenario/100-single-region-hub/configuration.tfvars -a apply

Coding principles

This vnext is relying extensively on Terraform 0.13 capabilities (module iterations, conditional modules, variables validation, etc.).

Those new features allow more complex and more dynamic code composition. The following concepts are used:

  • No code environment composition: a landing zone environment can be composed customizing variable files and code must be robust enough to accommodate combinations and composition.
  • Flexible foundations to meet customer needs: everything is customizable at all layers.
  • Key-based configuration and customization: all configuration objects will call each other based on the object keys.
  • Iteration-based objects deployment: a landing zone calls all its modules, iterating on complex objects for technical resources deployment.

Example levels

We categorize the various examples in this repo as follow:

level functionalities supported environments
100 basic functionalities and features, no RBAC or security hardening - for demo and simple POC working on AIRS subscriptions
200 intermediate functionalities includes RBAC features may not work in AIRS, need AAD permissions
300 advanced functionalities, multi region support, includes RBAC features not working in AIRS, need AAD permissions
400 advanced functionalities, multi region support, includes RBAC features and security hardening not working in AIRS, need AAD permissions

Landing zone constructions sets

Once you deploy the core enterprise scale components, you can leverage the following additional solution landing zones:

Solution URL
Azure Kubernetes Services https://github.com/aztfmod/landingzone_aks
Data and Analytics https://github.com/aztfmod/landingzone_data_analytics
SAP on Azure https://github.com/aztfmod/terraform-azurerm-sap
Shared Image Gallery https://github.com/aztfmod/landingzone_shared_image_gallery

To review the enterprise-scale on Terraform landing zone hierarchy model, you can refer to the classic model:

Related repositories

Repo Description
caf-terraform-landingzones landing zones repo with sample and core documentations
rover devops toolset for operating landing zones
azure_caf_provider custom provider for naming conventions
modules set of curated modules available in the Terraform registry

Community

Feel free to open an issue for feature or bug, or to submit a PR.

In case you have any question, you can reach out to tf-landingzones at microsoft dot com.

You can also reach us on Gitter

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

Code of conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

About

Base terraform modules for the enterprise-scale landing zones on Terraform part of Azure Cloud Adoption Framework

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HCL 90.2%
  • Smarty 8.5%
  • Shell 1.3%