• Stars
    star
    794
  • Rank 56,840 (Top 2 %)
  • Language HCL
  • License
    MIT License
  • Created almost 4 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Azure landing zones Terraform module

Azure landing zones Terraform module

Build Status GitHub release (latest SemVer) Average time to resolve an issue Percentage of issues still open

Detailed information about how to use, configure and extend this module can be found on our Wiki:

Overview

The Azure landing zones Terraform module is designed to accelerate deployment of platform resources based on the Azure landing zones conceptual architecture using Terraform.

A conceptual architecture diagram highlighting the design areas covered by the Azure landing zones Terraform module.

This is currently split logically into the following capabilities within the module (links to further guidance on the Wiki):

Module capability Scope Design area
Core Resources Management group and subscription organization Resource organization
Management Resources Management subscription Management
Connectivity Resources Connectivity subscription Network topology and connectivity
Identity Resources Identity subscription Identity and access management

Using a very simple initial configuration, the module will deploy a management group hierarchy based on the above diagram. This includes the recommended governance baseline, applied using Azure Policy and Access control (IAM) resources deployed at the management group scope. The default configuration can be easily extended to meet differing requirements, and includes the ability to deploy platform resources in the management and connectivity subscriptions.

NOTE: In addition to setting input variables to control which resources are deployed, the module requires setting a Provider Configuration block to enable deployment across multiple subscriptions.

Although resources are logically grouped to simplify operations, the modular design of the module also allows resources to be deployed using different Terraform workspaces. This allows customers to address concerns around managing large state files, or assigning granular permissions to pipelines based on the principle of least privilege. (more information coming soon in the Wiki)

Terraform versions

This module has been tested using Terraform 1.3.1 and AzureRM Provider 3.54.0 as a baseline, and various versions to up the latest at time of release. In some cases, individual versions of the AzureRM provider may cause errors. If this happens, we advise upgrading to the latest version and checking our troubleshooting guide before raising an issue.

NOTE: The module now requires a minimum Terraform version of 1.3.1 to support the GA release of optional() Object Type Attributes and the required fix for issue #31844.

Usage

We recommend starting with the following configuration in your root module to learn what resources are created by the module and how it works.

This will deploy the core components only.

NOTE: For production use we highly recommend using the Terraform Registry and pinning to the latest stable version, as per the example below. Pinning to the main branch in GitHub will give you the latest updates quicker, but increases the likelihood of unplanned changes to your environment and unforeseen issues.

main.tf

# Configure Terraform to set the required AzureRM provider
# version and features{} block.

terraform {
  required_providers {
    azurerm = {
      source  = "hashicorp/azurerm"
      version = ">= 3.54.0"
    }
  }
}

provider "azurerm" {
  features {}
}

# Get the current client configuration from the AzureRM provider.
# This is used to populate the root_parent_id variable with the
# current Tenant ID used as the ID for the "Tenant Root Group"
# management group.

data "azurerm_client_config" "core" {}

# Use variables to customize the deployment

variable "root_id" {
  type    = string
  default = "es"
}

variable "root_name" {
  type    = string
  default = "Enterprise-Scale"
}

variable "default_location" {
  type    = string
}

# Declare the Azure landing zones Terraform module
# and provide a base configuration.

module "enterprise_scale" {
  source  = "Azure/caf-enterprise-scale/azurerm"
  version = "<version>" # change this to your desired version, https://www.terraform.io/language/expressions/version-constraints

  default_location = var.default_location

  providers = {
    azurerm              = azurerm
    azurerm.connectivity = azurerm
    azurerm.management   = azurerm
  }

  root_parent_id = data.azurerm_client_config.core.tenant_id
  root_id        = var.root_id
  root_name      = var.root_name

}

NOTE: For additional guidance on how to customize your deployment using the advanced configuration options for this module, please refer to our User Guide and the additional examples in our documentation.

Permissions

Please refer to our Module Permissions guide on the Wiki.

Examples

The following list outlines some of our most popular examples:

For the complete list of our latest examples, please refer to our Examples page on the Wiki.

Release notes

Please see the releases page for the latest module updates.

Upgrade guides

For upgrade guides from previous versions, please refer to the following links:

Documentation

Requirements

The following requirements are needed by this module:

Modules

The following Modules are called:

connectivity_resources

Source: ./modules/connectivity

Version:

identity_resources

Source: ./modules/identity

Version:

management_group_archetypes

Source: ./modules/archetypes

Version:

management_resources

Source: ./modules/management

Version:

role_assignments_for_policy

Source: ./modules/role_assignments_for_policy

Version:

Required Inputs

The following input variables are required:

default_location

Description: Must be specified, e.g eastus. Will set the Azure region in which region bound resources will be deployed. Please see: https://azure.microsoft.com/en-gb/global-infrastructure/geographies/

Type: string

root_parent_id

Description: The root_parent_id is used to specify where to set the root for all Landing Zone deployments. Usually the Tenant ID when deploying the core Enterprise-scale Landing Zones.

Type: string

Optional Inputs

The following input variables are optional (have default values):

archetype_config_overrides

Description: If specified, will set custom Archetype configurations for the core ALZ Management Groups. Does not work for management groups specified by the 'custom_landing_zones' input variable. To override the default configuration settings for any of the core Management Groups, add an entry to the archetype_config_overrides variable for each Management Group you want to customize. To create a valid archetype_config_overrides entry, you must provide the required values in the archetype_config_overrides object for the Management Group you wish to re-configure. To do this, simply create an entry similar to the root example below for one or more of the supported core Management Group IDs:

  • root
  • decommissioned
  • sandboxes
  • landing-zones
  • platform
  • connectivity
  • management
  • identity
  • corp
  • online
  • sap
map(
  object({
    archetype_id     = string
    enforcement_mode = map(bool)
    parameters       = map(any)
    access_control   = map(list(string))
  })
)

e.g.

  archetype_config_overrides = {
    root = {
      archetype_id = "root"
      enforcement_mode = {
        "Example-Policy-Assignment" = true,
      }
      parameters = {
        Example-Policy-Assignment = {
          parameterStringExample = "value1",
          parameterBoolExample   = true,
          parameterNumberExample = 10,
          parameterListExample = [
            "listItem1",
            "listItem2",
          ]
          parameterObjectExample = {
            key1 = "value1",
            key2 = "value2",
          }
        }
      }
      access_control = {
        Example-Role-Definition = [
          "00000000-0000-0000-0000-000000000000", # Object ID of user/group/spn/mi from Microsoft Entra ID
          "11111111-1111-1111-1111-111111111111", # Object ID of user/group/spn/mi from Microsoft Entra ID
        ]
      }
    }
  }

Type: any

Default: {}

configure_connectivity_resources

Description: If specified, will customize the "Connectivity" landing zone settings and resources.

Notes for the configure_connectivity_resources variable:

  • settings.hub_network_virtual_network_gateway.config.address_prefix
    • Only support adding a single address prefix for GatewaySubnet subnet
  • settings.hub_network_virtual_network_gateway.config.gateway_sku_expressroute
    • If specified, will deploy the ExpressRoute gateway into the GatewaySubnet subnet
  • settings.hub_network_virtual_network_gateway.config.gateway_sku_vpn
    • If specified, will deploy the VPN gateway into the GatewaySubnet subnet
  • settings.hub_network_virtual_network_gateway.config.advanced_vpn_settings.private_ip_address_allocation
    • Valid options are "", "Static" or "Dynamic". Will set private_ip_address_enabled and private_ip_address_allocation as needed.
  • settings.azure_firewall.config.address_prefix
    • Only support adding a single address prefix for AzureFirewallManagementSubnet subnet

Type:

object({
    settings = optional(object({
      hub_networks = optional(list(
        object({
          enabled = optional(bool, true)
          config = object({
            address_space                = list(string)
            location                     = optional(string, "")
            link_to_ddos_protection_plan = optional(bool, false)
            dns_servers                  = optional(list(string), [])
            bgp_community                = optional(string, "")
            subnets = optional(list(
              object({
                name                      = string
                address_prefixes          = list(string)
                network_security_group_id = optional(string, "")
                route_table_id            = optional(string, "")
              })
            ), [])
            virtual_network_gateway = optional(object({
              enabled = optional(bool, false)
              config = optional(object({
                address_prefix           = optional(string, "")
                gateway_sku_expressroute = optional(string, "")
                gateway_sku_vpn          = optional(string, "")
                advanced_vpn_settings = optional(object({
                  enable_bgp                       = optional(bool, null)
                  active_active                    = optional(bool, null)
                  private_ip_address_allocation    = optional(string, "")
                  default_local_network_gateway_id = optional(string, "")
                  vpn_client_configuration = optional(list(
                    object({
                      address_space = list(string)
                      aad_tenant    = optional(string, null)
                      aad_audience  = optional(string, null)
                      aad_issuer    = optional(string, null)
                      root_certificate = optional(list(
                        object({
                          name             = string
                          public_cert_data = string
                        })
                      ), [])
                      revoked_certificate = optional(list(
                        object({
                          name             = string
                          public_cert_data = string
                        })
                      ), [])
                      radius_server_address = optional(string, null)
                      radius_server_secret  = optional(string, null)
                      vpn_client_protocols  = optional(list(string), null)
                      vpn_auth_types        = optional(list(string), null)
                    })
                  ), [])
                  bgp_settings = optional(list(
                    object({
                      asn         = optional(number, null)
                      peer_weight = optional(number, null)
                      peering_addresses = optional(list(
                        object({
                          ip_configuration_name = optional(string, null)
                          apipa_addresses       = optional(list(string), null)
                        })
                      ), [])
                    })
                  ), [])
                  custom_route = optional(list(
                    object({
                      address_prefixes = optional(list(string), [])
                    })
                  ), [])
                }), {})
              }), {})
            }), {})
            azure_firewall = optional(object({
              enabled = optional(bool, false)
              config = optional(object({
                address_prefix                = optional(string, "")
                address_management_prefix     = optional(string, "")
                enable_dns_proxy              = optional(bool, true)
                dns_servers                   = optional(list(string), [])
                sku_tier                      = optional(string, "Standard")
                base_policy_id                = optional(string, "")
                private_ip_ranges             = optional(list(string), [])
                threat_intelligence_mode      = optional(string, "Alert")
                threat_intelligence_allowlist = optional(list(string), [])
                availability_zones = optional(object({
                  zone_1 = optional(bool, true)
                  zone_2 = optional(bool, true)
                  zone_3 = optional(bool, true)
                }), {})
              }), {})
            }), {})
            spoke_virtual_network_resource_ids      = optional(list(string), [])
            enable_outbound_virtual_network_peering = optional(bool, false)
            enable_hub_network_mesh_peering         = optional(bool, false)
          })
        })
      ), [])
      vwan_hub_networks = optional(list(
        object({
          enabled = optional(bool, true)
          config = object({
            address_prefix = string
            location       = string
            sku            = optional(string, "")
            routes = optional(list(
              object({
                address_prefixes    = list(string)
                next_hop_ip_address = string
              })
            ), [])
            expressroute_gateway = optional(object({
              enabled = optional(bool, false)
              config = optional(object({
                scale_unit = optional(number, 1)
              }), {})
            }), {})
            vpn_gateway = optional(object({
              enabled = optional(bool, false)
              config = optional(object({
                bgp_settings = optional(list(
                  object({
                    asn         = number
                    peer_weight = number
                    instance_0_bgp_peering_address = optional(list(
                      object({
                        custom_ips = list(string)
                      })
                    ), [])
                    instance_1_bgp_peering_address = optional(list(
                      object({
                        custom_ips = list(string)
                      })
                    ), [])
                  })
                ), [])
                routing_preference = optional(string, "Microsoft Network")
                scale_unit         = optional(number, 1)
              }), {})
            }), {})
            azure_firewall = optional(object({
              enabled = optional(bool, false)
              config = optional(object({
                enable_dns_proxy              = optional(bool, true)
                dns_servers                   = optional(list(string), [])
                sku_tier                      = optional(string, "Standard")
                base_policy_id                = optional(string, "")
                private_ip_ranges             = optional(list(string), [])
                threat_intelligence_mode      = optional(string, "Alert")
                threat_intelligence_allowlist = optional(list(string), [])
                availability_zones = optional(object({
                  zone_1 = optional(bool, true)
                  zone_2 = optional(bool, true)
                  zone_3 = optional(bool, true)
                }), {})
              }), {})
            }), {})
            spoke_virtual_network_resource_ids        = optional(list(string), [])
            secure_spoke_virtual_network_resource_ids = optional(list(string), [])
            enable_virtual_hub_connections            = optional(bool, false)
          })
        })
      ), [])
      ddos_protection_plan = optional(object({
        enabled = optional(bool, false)
        config = optional(object({
          location = optional(string, "")
        }), {})
      }), {})
      dns = optional(object({
        enabled = optional(bool, true)
        config = optional(object({
          location = optional(string, "")
          enable_private_link_by_service = optional(object({
            azure_api_management                 = optional(bool, true)
            azure_app_configuration_stores       = optional(bool, true)
            azure_arc                            = optional(bool, true)
            azure_automation_dscandhybridworker  = optional(bool, true)
            azure_automation_webhook             = optional(bool, true)
            azure_backup                         = optional(bool, true)
            azure_batch_account                  = optional(bool, true)
            azure_bot_service_bot                = optional(bool, true)
            azure_bot_service_token              = optional(bool, true)
            azure_cache_for_redis                = optional(bool, true)
            azure_cache_for_redis_enterprise     = optional(bool, true)
            azure_container_registry             = optional(bool, true)
            azure_cosmos_db_cassandra            = optional(bool, true)
            azure_cosmos_db_gremlin              = optional(bool, true)
            azure_cosmos_db_mongodb              = optional(bool, true)
            azure_cosmos_db_sql                  = optional(bool, true)
            azure_cosmos_db_table                = optional(bool, true)
            azure_data_explorer                  = optional(bool, true)
            azure_data_factory                   = optional(bool, true)
            azure_data_factory_portal            = optional(bool, true)
            azure_data_health_data_services      = optional(bool, true)
            azure_data_lake_file_system_gen2     = optional(bool, true)
            azure_database_for_mariadb_server    = optional(bool, true)
            azure_database_for_mysql_server      = optional(bool, true)
            azure_database_for_postgresql_server = optional(bool, true)
            azure_digital_twins                  = optional(bool, true)
            azure_event_grid_domain              = optional(bool, true)
            azure_event_grid_topic               = optional(bool, true)
            azure_event_hubs_namespace           = optional(bool, true)
            azure_file_sync                      = optional(bool, true)
            azure_hdinsights                     = optional(bool, true)
            azure_iot_dps                        = optional(bool, true)
            azure_iot_hub                        = optional(bool, true)
            azure_key_vault                      = optional(bool, true)
            azure_key_vault_managed_hsm          = optional(bool, true)
            azure_kubernetes_service_management  = optional(bool, true)
            azure_machine_learning_workspace     = optional(bool, true)
            azure_managed_disks                  = optional(bool, true)
            azure_media_services                 = optional(bool, true)
            azure_migrate                        = optional(bool, true)
            azure_monitor                        = optional(bool, true)
            azure_purview_account                = optional(bool, true)
            azure_purview_studio                 = optional(bool, true)
            azure_relay_namespace                = optional(bool, true)
            azure_search_service                 = optional(bool, true)
            azure_service_bus_namespace          = optional(bool, true)
            azure_site_recovery                  = optional(bool, true)
            azure_sql_database_sqlserver         = optional(bool, true)
            azure_synapse_analytics_dev          = optional(bool, true)
            azure_synapse_analytics_sql          = optional(bool, true)
            azure_synapse_studio                 = optional(bool, true)
            azure_web_apps_sites                 = optional(bool, true)
            azure_web_apps_static_sites          = optional(bool, true)
            cognitive_services_account           = optional(bool, true)
            microsoft_power_bi                   = optional(bool, true)
            signalr                              = optional(bool, true)
            signalr_webpubsub                    = optional(bool, true)
            storage_account_blob                 = optional(bool, true)
            storage_account_file                 = optional(bool, true)
            storage_account_queue                = optional(bool, true)
            storage_account_table                = optional(bool, true)
            storage_account_web                  = optional(bool, true)
          }), {})
          private_link_locations                                 = optional(list(string), [])
          public_dns_zones                                       = optional(list(string), [])
          private_dns_zones                                      = optional(list(string), [])
          enable_private_dns_zone_virtual_network_link_on_hubs   = optional(bool, true)
          enable_private_dns_zone_virtual_network_link_on_spokes = optional(bool, true)
          virtual_network_resource_ids_to_link                   = optional(list(string), [])
        }), {})
      }), {})
    }), {})
    location = optional(string, "")
    tags     = optional(any, {})
    advanced = optional(any, {})
  })

Default: {}

configure_identity_resources

Description: If specified, will customize the "Identity" landing zone settings.

Type:

object({
    settings = optional(object({
      identity = optional(object({
        enabled = optional(bool, true)
        config = optional(object({
          enable_deny_public_ip             = optional(bool, true)
          enable_deny_rdp_from_internet     = optional(bool, true)
          enable_deny_subnet_without_nsg    = optional(bool, true)
          enable_deploy_azure_backup_on_vms = optional(bool, true)
        }), {})
      }), {})
    }), {})
  })

Default: {}

configure_management_resources

Description: If specified, will customize the "Management" landing zone settings and resources.

Type:

object({
    settings = optional(object({
      log_analytics = optional(object({
        enabled = optional(bool, true)
        config = optional(object({
          retention_in_days                                 = optional(number, 30)
          enable_monitoring_for_vm                          = optional(bool, true)
          enable_monitoring_for_vmss                        = optional(bool, true)
          enable_solution_for_agent_health_assessment       = optional(bool, true)
          enable_solution_for_anti_malware                  = optional(bool, true)
          enable_solution_for_change_tracking               = optional(bool, true)
          enable_solution_for_service_map                   = optional(bool, false)
          enable_solution_for_sql_assessment                = optional(bool, true)
          enable_solution_for_sql_vulnerability_assessment  = optional(bool, true)
          enable_solution_for_sql_advanced_threat_detection = optional(bool, true)
          enable_solution_for_updates                       = optional(bool, true)
          enable_solution_for_vm_insights                   = optional(bool, true)
          enable_solution_for_container_insights            = optional(bool, true)
          enable_sentinel                                   = optional(bool, true)
        }), {})
      }), {})
      security_center = optional(object({
        enabled = optional(bool, true)
        config = optional(object({
          email_security_contact                                = optional(string, "security_contact@replace_me")
          enable_defender_for_apis                              = optional(bool, true)
          enable_defender_for_app_services                      = optional(bool, true)
          enable_defender_for_arm                               = optional(bool, true)
          enable_defender_for_containers                        = optional(bool, true)
          enable_defender_for_cosmosdbs                         = optional(bool, true)
          enable_defender_for_cspm                              = optional(bool, true)
          enable_defender_for_dns                               = optional(bool, true)
          enable_defender_for_key_vault                         = optional(bool, true)
          enable_defender_for_oss_databases                     = optional(bool, true)
          enable_defender_for_servers                           = optional(bool, true)
          enable_defender_for_servers_vulnerability_assessments = optional(bool, true)
          enable_defender_for_sql_servers                       = optional(bool, true)
          enable_defender_for_sql_server_vms                    = optional(bool, true)
          enable_defender_for_storage                           = optional(bool, true)
        }), {})
      }), {})
    }), {})
    location = optional(string, "")
    tags     = optional(any, {})
    advanced = optional(any, {})
  })

Default: {}

create_duration_delay

Description: Used to tune terraform apply when faced with errors caused by API caching or eventual consistency. Sets a custom delay period after creation of the specified resource type.

Type:

object({
    azurerm_management_group      = optional(string, "30s")
    azurerm_policy_assignment     = optional(string, "30s")
    azurerm_policy_definition     = optional(string, "30s")
    azurerm_policy_set_definition = optional(string, "30s")
    azurerm_role_assignment       = optional(string, "0s")
    azurerm_role_definition       = optional(string, "60s")
  })

Default: {}

custom_landing_zones

Description: If specified, will deploy additional Management Groups alongside Enterprise-scale core Management Groups. Although the object type for this input variable is set to any, the expected object is based on the following structure:

variable "custom_landing_zones" {
  type = map(
    object({
      display_name               = string
      parent_management_group_id = string
      subscription_ids           = list(string)
      archetype_config = object({
        archetype_id   = string
        parameters     = map(any)
        access_control = map(list(string))
      })
    })
  )

The decision not to hard code the structure in the input variable type is by design, as it allows Terraform to handle the input as a dynamic object type. This was necessary to allow the parameters value to be correctly interpreted. Without this, Terraform would throw an error if each parameter value wasn't a consistent type, as it would incorrectly identify the input as a tuple which must contain consistent type structure across all entries.

Note the id of the custom landing zone will be appended to var.root_id. The maximum length of the resulting name must be less than 90 characters.

The custom_landing_zones object is used to deploy additional Management Groups within the core Management Group hierarchy. The main object parameters are display_name, parent_management_group_id, subscription_idsand archetype_config.

  • display_name is the name assigned to the Management Group.

  • parent_management_group_id is the name of the parent Management Group and must be a valid Management Group ID.

  • subscription_ids is an object containing a list of Subscription IDs to assign to the current Management Group.

  • archetype_config is used to configure the configuration applied to each Management Group. This object must contain valid entries for the archetype_id parameters, and access_control attributes.

The following example shows how you would add a simple Management Group under the myorg-landing-zones Management Group, where root_id = "myorg" and using the default_empty archetype definition.

  custom_landing_zones = {
    myorg-customer-corp = {
      display_name               = "MyOrg Customer Corp"
      parent_management_group_id = "myorg-landing-zones"
      subscription_ids           = [
        "00000000-0000-0000-0000-000000000000",
        "11111111-1111-1111-1111-111111111111",
      ]
      archetype_config = {
        archetype_id   = "default_empty"
        parameters     = {}
        access_control = {}
      }
    }
  }

Type: any

Default: {}

custom_policy_roles

Description: If specified, the custom_policy_roles variable overrides which Role Definition ID(s) (value) to assign for Policy Assignments with a Managed Identity, if the assigned "policyDefinitionId" (key) is included in this variable.

Type: map(list(string))

Default: {}

default_tags

Description: If specified, will set the default tags for all resources deployed by this module where supported.

Type: map(string)

Default: {}

deploy_connectivity_resources

Description: If set to true, will enable the "Connectivity" landing zone settings and add "Connectivity" resources into the current Subscription context.

Type: bool

Default: false

deploy_core_landing_zones

Description: If set to true, module will deploy the core Enterprise-scale Management Group hierarchy, including "out of the box" policies and roles.

Type: bool

Default: true

deploy_corp_landing_zones

Description: If set to true, module will deploy the "Corp" Management Group, including "out of the box" policies and roles.

Type: bool

Default: false

deploy_demo_landing_zones

Description: If set to true, module will deploy the demo "Landing Zone" Management Groups ("Corp", "Online", and "SAP") into the core Enterprise-scale Management Group hierarchy.

Type: bool

Default: false

deploy_diagnostics_for_mg

Description: If set to true, will deploy Diagnostic Settings for management groups

Type: bool

Default: false

deploy_identity_resources

Description: If set to true, will enable the "Identity" landing zone settings.

Type: bool

Default: false

deploy_management_resources

Description: If set to true, will enable the "Management" landing zone settings and add "Management" resources into the current Subscription context.

Type: bool

Default: false

deploy_online_landing_zones

Description: If set to true, module will deploy the "Online" Management Group, including "out of the box" policies and roles.

Type: bool

Default: false

deploy_sap_landing_zones

Description: If set to true, module will deploy the "SAP" Management Group, including "out of the box" policies and roles.

Type: bool

Default: false

destroy_duration_delay

Description: Used to tune terraform deploy when faced with errors caused by API caching or eventual consistency. Sets a custom delay period after destruction of the specified resource type.

Type:

object({
    azurerm_management_group      = optional(string, "0s")
    azurerm_policy_assignment     = optional(string, "0s")
    azurerm_policy_definition     = optional(string, "0s")
    azurerm_policy_set_definition = optional(string, "0s")
    azurerm_role_assignment       = optional(string, "0s")
    azurerm_role_definition       = optional(string, "0s")
  })

Default: {}

disable_base_module_tags

Description: If set to true, will remove the base module tags applied to all resources deployed by the module which support tags.

Type: bool

Default: false

disable_telemetry

Description: If set to true, will disable telemetry for the module. See https://aka.ms/alz-terraform-module-telemetry.

Type: bool

Default: false

library_path

Description: If specified, sets the path to a custom library folder for archetype artefacts.

Type: string

Default: ""

policy_non_compliance_message_default

Description: If set overrides the default non-compliance message used for policy assignments.

Type: string

Default: "This resource {enforcementMode} be compliant with the assigned policy."

policy_non_compliance_message_default_enabled

Description: If set to true, will enable the use of the default custom non-compliance messages for policy assignments if they are not provided.

Type: bool

Default: true

policy_non_compliance_message_enabled

Description: If set to false, will disable non-compliance messages altogether.

Type: bool

Default: true

policy_non_compliance_message_enforced_replacement

Description: If set overrides the non-compliance replacement used for enforced policy assignments.

Type: string

Default: "must"

policy_non_compliance_message_enforcement_placeholder

Description: If set overrides the non-compliance message placeholder used in message templates.

Type: string

Default: "{enforcementMode}"

policy_non_compliance_message_not_enforced_replacement

Description: If set overrides the non-compliance replacement used for unenforced policy assignments.

Type: string

Default: "should"

policy_non_compliance_message_not_supported_definitions

Description: If set, overrides the list of built-in policy definition that do not support non-compliance messages.

Type: list(string)

Default:

[
  "/providers/Microsoft.Authorization/policyDefinitions/1c6e92c9-99f0-4e55-9cf2-0c234dc48f99",
  "/providers/Microsoft.Authorization/policyDefinitions/1a5b4dca-0b6f-4cf5-907c-56316bc1bf3d",
  "/providers/Microsoft.Authorization/policyDefinitions/95edb821-ddaf-4404-9732-666045e056b4"
]

resource_custom_timeouts

Description: Optional - Used to tune terraform deploy when faced with errors caused by API limits.

For each supported resource type, there is a child object that specifies the create, update, and delete timeouts. Each of these arguments takes a string representation of a duration, such as "60m" for 60 minutes, "10s" for ten seconds, or "2h" for two hours. If a timeout is not specified, the default value for the resource will be used.

e.g.

resource_custom_timeouts = {
  azurerm_private_dns_zone = {
    create = "1h"
    update = "1h30m"
    delete = "30m"
    read   = "30s"
  }
}

Type:

object({
    azurerm_private_dns_zone = optional(object({
      create = optional(string, null)
      update = optional(string, null)
      read   = optional(string, null)
      delete = optional(string, null)
    }), {})
    azurerm_private_dns_zone_virtual_network_link = optional(object({
      create = optional(string, null)
      update = optional(string, null)
      read   = optional(string, null)
      delete = optional(string, null)
    }), {})
  })

Default: {}

root_id

Description: If specified, will set a custom Name (ID) value for the Enterprise-scale "root" Management Group, and append this to the ID for all core Enterprise-scale Management Groups.

Type: string

Default: "es"

root_name

Description: If specified, will set a custom Display Name value for the Enterprise-scale "root" Management Group.

Type: string

Default: "Enterprise-Scale"

strict_subscription_association

Description: If set to true, subscriptions associated to management groups will be exclusively set by the module and any added by another process will be removed. If set to false, the module will will only enforce association of the specified subscriptions and those added to management groups by other processes will not be removed.

Type: bool

Default: true

subscription_id_connectivity

Description: If specified, identifies the Platform subscription for "Connectivity" for resource deployment and correct placement in the Management Group hierarchy.

Type: string

Default: ""

subscription_id_identity

Description: If specified, identifies the Platform subscription for "Identity" for resource deployment and correct placement in the Management Group hierarchy.

Type: string

Default: ""

subscription_id_management

Description: If specified, identifies the Platform subscription for "Management" for resource deployment and correct placement in the Management Group hierarchy.

Type: string

Default: ""

subscription_id_overrides

Description: If specified, will be used to assign subscription_ids to the default Enterprise-scale Management Groups.

Type: map(list(string))

Default: {}

template_file_variables

Description: If specified, provides the ability to define custom template variables used when reading in template files from the built-in and custom library_path.

Type: any

Default: {}

Resources

The following resources are used by this module:

Outputs

The following outputs are exported:

azurerm_automation_account

Description: Returns the configuration data for all Automation Accounts created by this module.

azurerm_dns_zone

Description: Returns the configuration data for all DNS Zones created by this module.

azurerm_express_route_gateway

Description: Returns the configuration data for all (Virtual WAN) ExpressRoute Gateways created by this module.

azurerm_firewall

Description: Returns the configuration data for all Azure Firewalls created by this module.

azurerm_firewall_policy

Description: Returns the configuration data for all Azure Firewall Policies created by this module.

azurerm_log_analytics_linked_service

Description: Returns the configuration data for all Log Analytics linked services created by this module.

azurerm_log_analytics_solution

Description: Returns the configuration data for all Log Analytics solutions created by this module.

azurerm_log_analytics_workspace

Description: Returns the configuration data for all Log Analytics workspaces created by this module.

azurerm_management_group

Description: Returns the configuration data for all Management Groups created by this module.

azurerm_management_group_policy_assignment

Description: Returns the configuration data for all Management Group Policy Assignments created by this module.

azurerm_management_group_subscription_association

Description: Returns the configuration data for all Management Group Subscription Associations created by this module.

azurerm_network_ddos_protection_plan

Description: Returns the configuration data for all DDoS Protection Plans created by this module.

azurerm_policy_definition

Description: Returns the configuration data for all Policy Definitions created by this module.

azurerm_policy_set_definition

Description: Returns the configuration data for all Policy Set Definitions created by this module.

azurerm_private_dns_zone

Description: Returns the configuration data for all Private DNS Zones created by this module.

azurerm_private_dns_zone_virtual_network_link

Description: Returns the configuration data for all Private DNS Zone network links created by this module.

azurerm_public_ip

Description: Returns the configuration data for all Public IPs created by this module.

azurerm_resource_group

Description: Returns the configuration data for all Resource Groups created by this module.

azurerm_role_assignment

Description: Returns the configuration data for all Role Assignments created by this module.

azurerm_role_definition

Description: Returns the configuration data for all Role Definitions created by this module.

azurerm_subnet

Description: Returns the configuration data for all Subnets created by this module.

azurerm_virtual_hub

Description: Returns the configuration data for all Virtual Hubs created by this module.

azurerm_virtual_hub_connection

Description: Returns the configuration data for all Virtual Hub Connections created by this module.

azurerm_virtual_network

Description: Returns the configuration data for all Virtual Networks created by this module.

azurerm_virtual_network_gateway

Description: Returns the configuration data for all Virtual Network Gateways created by this module.

azurerm_virtual_network_peering

Description: Returns the configuration data for all Virtual Network Peerings created by this module.

azurerm_virtual_wan

Description: Returns the configuration data for all Virtual WANs created by this module.

azurerm_vpn_gateway

Description: Returns the configuration data for all (Virtual WAN) VPN Gateways created by this module.

Telemetry

NOTE: The following statement is applicable from release v2.0.0 onwards

When you deploy one or more modules using the Azure landing zones Terraform module, Microsoft can identify the installation of said module/s with the deployed Azure resources. Microsoft can correlate these resources used to support the software. Microsoft collects this information to provide the best experiences with their products and to operate their business. The telemetry is collected through customer usage attribution. The data is collected and governed by Microsoft's privacy policies.

If you don't wish to send usage data to Microsoft, details on how to turn it off can be found here.

License

Contributing

More Repositories

1

azure-quickstart-templates

Azure Quickstart Templates
Bicep
13,930
star
2

azure-sdk-for-net

This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
C#
5,123
star
3

Azure-Sentinel

Cloud-native SIEM for intelligent security analytics for your entire enterprise.
Jupyter Notebook
4,458
star
4

azure-sdk-for-python

This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/python/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-python.
Python
4,340
star
5

autorest

OpenAPI (f.k.a Swagger) Specification code generator. Supports C#, PowerShell, Go, Java, Node.js, TypeScript, Python
TypeScript
4,332
star
6

azure-powershell

Microsoft Azure PowerShell
C#
4,178
star
7

DotNetty

DotNetty project โ€“ a port of netty, event-driven asynchronous network application framework
C#
4,056
star
8

MachineLearningNotebooks

Python notebooks with ML and deep learning examples with Azure Machine Learning Python SDK | Microsoft
Jupyter Notebook
4,030
star
9

azure-cli

Azure Command-Line Interface
Python
3,930
star
10

draft-classic

A tool for developers to create cloud-native applications on Kubernetes.
Go
3,925
star
11

bicep

Bicep is a declarative language for describing and deploying Azure resources
Bicep
3,185
star
12

azure-rest-api-specs

The source for REST API specifications for Microsoft Azure.
TypeScript
2,536
star
13

azure-sdk-for-java

This repository is for active development of the Azure SDK for Java. For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/java/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-java.
Java
2,242
star
14

azure-sdk-for-js

This repository is for active development of the Azure SDK for JavaScript (NodeJS & Browser). For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/javascript/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-js.
TypeScript
1,975
star
15

AKS

Azure Kubernetes Service
HTML
1,949
star
16

azure-functions-host

The host/runtime that powers Azure Functions
C#
1,871
star
17

golua

A Lua 5.3 engine implemented in Go
Go
1,850
star
18

Azurite

A lightweight server clone of Azure Storage that simulates most of the commands supported by it with minimal dependencies
TypeScript
1,792
star
19

azureml-examples

Official community-driven Azure Machine Learning examples, tested with GitHub Actions.
Jupyter Notebook
1,687
star
20

Microsoft-Defender-for-Cloud

Welcome to the Microsoft Defender for Cloud community repository
PowerShell
1,677
star
21

Enterprise-Scale

The Azure Landing Zones (Enterprise-Scale) architecture provides prescriptive guidance coupled with Azure best practices, and it follows design principles across the critical design areas for organizations to define their Azure architecture
PowerShell
1,603
star
22

azure-sdk-for-go

This repository is for active development of the Azure SDK for Go. For consumers of the SDK we recommend visiting our public developer docs at:
Go
1,552
star
23

durabletask

Durable Task Framework allows users to write long running persistent workflows in C# using the async/await capabilities.
C#
1,497
star
24

Stormspotter

Azure Red Team tool for graphing Azure and Azure Active Directory objects
Python
1,493
star
25

azure-policy

Repository for Azure Resource Policy built-in definitions and samples
Open Policy Agent
1,485
star
26

iotedge

The IoT Edge OSS project
C#
1,421
star
27

aztfexport

A tool to bring existing Azure resources under Terraform's management
Go
1,335
star
28

azure-sdk-for-node

Azure SDK for Node.js - Documentation
JavaScript
1,187
star
29

review-checklists

This repo contains code and examples to operationalize Azure review checklists.
Python
1,160
star
30

azure-functions-core-tools

Command line tools for Azure Functions
C#
1,128
star
31

Azure-Functions

PowerShell
1,107
star
32

acs-engine

WE HAVE MOVED: Please join us at Azure/aks-engine!
Go
1,031
star
33

aks-engine

AKS Engine: legacy tool for Kubernetes on Azure (see status)
Go
1,027
star
34

data-api-builder

Data API builder provides modern REST and GraphQL endpoints to your Azure Databases and on-prem stores.
C#
846
star
35

coco-framework

The Confidential Consortium Blockchain Framework is an open-source system that enables high-scale, confidential blockchain networks that meet all key enterprise requirementsโ€”providing a means to accelerate production enterprise adoption of blockchain technology.
834
star
36

azure-iot-sdks

SDKs for a variety of languages and platforms that help connect devices to Microsoft Azure IoT services
829
star
37

GPT-RAG

Sharing the learning along the way we been gathering to enable Azure OpenAI at enterprise scale in a secure manner. GPT-RAG core is a Retrieval-Augmented Generation pattern running in Azure, using Azure Cognitive Search for retrieval and Azure OpenAI large language models to power ChatGPT-style and Q&A experiences.
Bicep
822
star
38

azure-sql-database-samples

Azure SQL Database Samples and Reference Implementation Repository
Python
781
star
39

Azure-Network-Security

Resources for improving Customer Experience with Azure Network Security
Python
768
star
40

AzurePublicDataset

Microsoft Azure Traces
Jupyter Notebook
761
star
41

caf-terraform-landingzones

Azure Terraform SRE framework
HCL
756
star
42

azure-search-vector-samples

A repository of code samples for Vector search capabilities in Azure AI Search.
Jupyter Notebook
729
star
43

azure-functions-durable-extension

Durable Task Framework extension for Azure Functions
C#
715
star
44

azure-service-operator

Azure Service Operator allows you to create Azure resources using kubectl
Go
715
star
45

azure-webjobs-sdk

Azure WebJobs SDK
C#
712
star
46

ResourceModules

This repository includes a CI platform for and collection of mature and curated Bicep modules. The platform supports both ARM and Bicep and can be leveraged using GitHub actions as well as Azure DevOps pipelines.
Bicep
710
star
47

ALZ-Bicep

This repository contains the Azure Landing Zones (ALZ) Bicep modules that help deliver and deploy the Azure Landing Zone conceptual architecture in a modular approach. https://aka.ms/alz/docs
Bicep
694
star
48

azure-api-management-devops-resource-kit

Azure API Management DevOps Resource Kit
C#
682
star
49

azure-sdk-for-rust

This repository is for active development of the *unofficial* Azure SDK for Rust. This repository is *not* supported by the Azure SDK team.
Rust
672
star
50

application-gateway-kubernetes-ingress

This is an ingress controller that can be run on Azure Kubernetes Service (AKS) to allow an Azure Application Gateway to act as the ingress for an AKS cluster.
Go
668
star
51

CCOInsights

Welcome to the Continuous Cloud Optimization Power BI Dashboard GitHub Project. In this repository you will find all the guidance and files needed to deploy the Dashboard in your environment to take benefit of a single pane of glass to get insights about your Azure resources and services.
Mathematica
668
star
52

SimuLand

Understand adversary tradecraft and improve detection strategies
PowerShell
664
star
53

azure-xplat-cli

For ARM-based service please go to CLI 2.0.
JavaScript
651
star
54

terraform

Source code for the Azure Marketplace Terraform development VM package.
HCL
648
star
55

DeepLearningForTimeSeriesForecasting

A tutorial demonstrating how to implement deep learning models for time series forecasting
Jupyter Notebook
647
star
56

azure-cosmos-dotnet-v3

.NET SDK for Azure Cosmos DB for the core SQL API
C#
637
star
57

node-sqlserver

C++
625
star
58

azure-devops-cli-extension

Azure DevOps Extension for Azure CLI
Python
621
star
59

azure-storage-fuse

A virtual file system adapter for Azure Blob storage
Go
613
star
60

Community-Policy

This repo is for Microsoft Azure customers and Microsoft teams to collaborate in making custom policies.
Open Policy Agent
612
star
61

azure-resource-manager-schemas

Schemas used to author and validate Resource Manager Templates. These schemas power the intellisense and syntax completion in our ARM Tools VSCode extension, as well as the Export Template API
TypeScript
607
star
62

counterfit

a CLI that provides a generic automation layer for assessing the security of ML models
Python
599
star
63

azure-storage-azcopy

The new Azure Storage data transfer utility - AzCopy v10
Go
597
star
64

azure-cosmos-dotnet-v2

Contains samples and utilities relating to the Azure Cosmos DB .NET SDK
577
star
65

azure-iot-sdk-c

A C99 SDK for connecting devices to Microsoft Azure IoT services
C
575
star
66

azure-service-bus

โ˜๏ธ Azure Service Bus service issue tracking and samples
571
star
67

aad-pod-identity

[DEPRECATED] Assign Azure Active Directory Identities to Kubernetes applications.
Go
569
star
68

Azure-Sentinel-Notebooks

Interactive Azure Sentinel Notebooks provides security insights and actions to investigate anomalies and hunt for malicious behaviors.
Jupyter Notebook
541
star
69

AzureStack-QuickStart-Templates

Quick start ARM templates that deploy on Microsoft Azure Stack
PowerShell
540
star
70

WALinuxAgent

Microsoft Azure Linux Guest Agent
Python
529
star
71

iot-edge-v1

Azure IoT Edge
C
524
star
72

Industrial-IoT

Azure Industrial IoT Platform
C#
518
star
73

azure-openai-samples

Azure OpenAI Samples is a collection of code samples illustrating how to use Azure Open AI in creating AI solution for various use cases across industries. This repository is mained by a community of volunters. We welcomed your contributions.
Jupyter Notebook
514
star
74

Mission-Critical

This repository provides a design methodology and approach to building highly-reliable applications on Microsoft Azure for mission-critical workloads.
510
star
75

static-web-apps-cli

Azure Static Web Apps CLI โœจ
TypeScript
509
star
76

draft

A day 0 tool for getting your app on k8s fast
Go
507
star
77

azure-docs-powershell-samples

Azure Powershell code samples, often used in docs.microsoft.com/Azure developer documentation
PowerShell
502
star
78

AI-in-a-Box

Jupyter Notebook
496
star
79

azure-storage-node

Microsoft Azure Storage SDK for Node.js
JavaScript
495
star
80

api-management-developer-portal

Developer portal provided by the Azure API Management service.
TypeScript
484
star
81

MS-AMP

Microsoft Automatic Mixed Precision Library
Python
483
star
82

Azure-TDSP-ProjectTemplate

TDSP: Data science project template repository with standardized directory structure and document templates to support efficient project execution and collaboration.
R
483
star
83

mlops-v2

Azure MLOps (v2) solution accelerators. Enterprise ready templates to deploy your machine learning models on the Azure Platform.
Shell
481
star
84

azure-mobile-services

Mobile Services is deprecated - Use Mobile Apps instead
HTML
472
star
85

azure-sdk

This is the Azure SDK parent repository and mostly contains documentation around guidelines and policies as well as the releases for the various languages supported by the Azure SDK.
PowerShell
472
star
86

azqr

Azure Quick Review
Go
471
star
87

kubelogin

A Kubernetes credential (exec) plugin implementing azure authentication
Go
467
star
88

bicep-registry-modules

Bicep registry modules
Bicep
457
star
89

azure-devtestlab

Azure DevTestLab artifacts, scripts and samples
PowerShell
455
star
90

azure-iot-sdk-csharp

A C# SDK for connecting devices to Microsoft Azure IoT services
C#
455
star
91

azure-devops-utils

Azure DevOps Utilities
Shell
449
star
92

AzureDatabricksBestPractices

Version 1 of Technical Best Practices of Azure Databricks based on real world Customer and Technical SME inputs
446
star
93

app-service-announcements

Subscribe to this repo to be notified about major changes in App Service
446
star
94

azure-storage-net

Microsoft Azure Storage Libraries for .NET
C#
445
star
95

Azure-DataFactory

C#
444
star
96

actions-workflow-samples

Help developers to easily get started with GitHub Action workflows to deploy to Azure
Pug
438
star
97

arm-ttk

Azure Resource Manager Template Toolkit
PowerShell
433
star
98

RDS-Templates

ARM Templates for Remote Desktop Services deployments
PowerShell
427
star
99

actions

Author and use Azure Actions to automate your GitHub workflows
HTML
422
star
100

container-service-for-azure-china

Container Service for Azure China
Shell
419
star