Skip to content

networkdude17/terraform-azurerm-caf-enterprise-scale

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Azure landing zones Terraform module

Important

For new deployments we now recommend using Azure Verified Modules for Platform Landing Zones. Please see the documentation at https://aka.ms/alz/tf. This module will continue to be supported for existing deployments.

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

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

‼ Notice of upcoming breaking changes

We are planning to make some breaking changes to the module in the next release (Q4 2024).

  • Module defaults will updated to deploy zone redundant SKUs by default - this applies to:
    • Firewall
    • Public IP
    • Virtual Network Gateway

We will publish guidance on how to avoid re-deployment of existing resources nearer the time.

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.7.0 and AzureRM Provider 3.108.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.

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.107"
    }
  }
}

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

Name Version
terraform ~> 1.7
azapi ~> 1.13, != 1.13.0
azurerm >= 3.108.0, < 5.0.0
random ~> 3.6
time ~> 0.11

Modules

Name Source Version
connectivity_resources ./modules/connectivity n/a
identity_resources ./modules/identity n/a
management_group_archetypes ./modules/archetypes n/a
management_resources ./modules/management n/a
role_assignments_for_policy ./modules/role_assignments_for_policy n/a

Inputs

Name Description Type Default Required
default_location 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/ string n/a yes
root_parent_id 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. string n/a yes
archetype_config_overrides 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
terraform
map(
object({
archetype_id = string
enforcement_mode = map(bool)
parameters = map(any)
access_control = map(list(string))
})
)
e.g.
terraform
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
]
}
}
}
any {} no
configure_connectivity_resources 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
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, "")
remote_vnet_traffic_enabled = optional(bool, false)
virtual_wan_traffic_enabled = optional(bool, false)
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
thumbprint = 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(map(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
})
), [])
routing_intent = optional(object({
enabled = optional(bool, false)
config = optional(object({
routing_policies = optional(list(object({
name = string
destinations = list(string)
})), [])
}), {})
}), {})
expressroute_gateway = optional(object({
enabled = optional(bool, false)
config = optional(object({
scale_unit = optional(number, 1)
allow_non_virtual_wan_traffic = optional(bool, false)
}), {})
}), {})
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(map(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_arc_guest_configuration = optional(bool, true)
azure_arc_hybrid_resource_provider = optional(bool, true)
azure_arc_kubernetes = 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_databricks = 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_managed_grafana = optional(bool, true)
azure_media_services = optional(bool, true)
azure_migrate = optional(bool, true)
azure_monitor = optional(bool, true)
azure_openai_service = 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_virtual_desktop = 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, {})
})
{} no
configure_identity_resources If specified, will customize the "Identity" landing zone settings.
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)
}), {})
}), {})
}), {})
})
{} no
configure_management_resources If specified, will customize the "Management" landing zone settings and resources.
object({
settings = optional(object({
ama = optional(object({
enable_uami = optional(bool, true)
enable_vminsights_dcr = optional(bool, true)
enable_change_tracking_dcr = optional(bool, true)
enable_mdfc_defender_for_sql_dcr = optional(bool, true)
enable_mdfc_defender_for_sql_query_collection_for_security_research = optional(bool, true)
}), {})
log_analytics = optional(object({
enabled = optional(bool, true)
config = optional(object({
daily_quota_gb = optional(number, -1)
retention_in_days = optional(number, 30)
enable_monitoring_for_vm = optional(bool, true)
enable_monitoring_for_vmss = optional(bool, true)
enable_sentinel = optional(bool, true)
enable_change_tracking = optional(bool, true)
enable_solution_for_vm_insights = optional(bool, true)
enable_solution_for_container_insights = optional(bool, true)
sentinel_customer_managed_key_enabled = optional(bool, false) # not used at this time
}), {})
}), {})
security_center = optional(object({
enabled = optional(bool, true)
config = optional(object({
email_security_contact = optional(string, "security_contact@replace_me")
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_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, {})
})
{} no
create_duration_delay 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.
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")
})
{} no
custom_landing_zones 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:
terraform
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.
terraform
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 = {}
}
}
}
any {} no
custom_policy_roles 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. map(list(string)) {} no
default_tags If specified, will set the default tags for all resources deployed by this module where supported. map(string) {} no
deploy_connectivity_resources If set to true, will enable the "Connectivity" landing zone settings and add "Connectivity" resources into the current Subscription context. bool false no
deploy_core_landing_zones If set to true, module will deploy the core Enterprise-scale Management Group hierarchy, including "out of the box" policies and roles. bool true no
deploy_corp_landing_zones If set to true, module will deploy the "Corp" Management Group, including "out of the box" policies and roles. bool false no
deploy_demo_landing_zones 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. bool false no
deploy_diagnostics_for_mg If set to true, will deploy Diagnostic Settings for management groups bool false no
deploy_identity_resources If set to true, will enable the "Identity" landing zone settings. bool false no
deploy_management_resources If set to true, will enable the "Management" landing zone settings and add "Management" resources into the current Subscription context. bool false no
deploy_online_landing_zones If set to true, module will deploy the "Online" Management Group, including "out of the box" policies and roles. bool false no
deploy_sap_landing_zones If set to true, module will deploy the "SAP" Management Group, including "out of the box" policies and roles. bool false no
destroy_duration_delay 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.
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")
})
{} no
disable_base_module_tags If set to true, will remove the base module tags applied to all resources deployed by the module which support tags. bool false no
disable_telemetry If set to true, will disable telemetry for the module. See https://aka.ms/alz-terraform-module-telemetry. bool false no
library_path If specified, sets the path to a custom library folder for archetype artefacts. string "" no
policy_non_compliance_message_default If set overrides the default non-compliance message used for policy assignments. string "This resource {enforcementMode} be compliant with the assigned policy." no
policy_non_compliance_message_default_enabled If set to true, will enable the use of the default custom non-compliance messages for policy assignments if they are not provided. bool true no
policy_non_compliance_message_enabled If set to false, will disable non-compliance messages altogether. bool true no
policy_non_compliance_message_enforced_replacement If set overrides the non-compliance replacement used for enforced policy assignments. string "must" no
policy_non_compliance_message_enforcement_placeholder If set overrides the non-compliance message placeholder used in message templates. string "{enforcementMode}" no
policy_non_compliance_message_not_enforced_replacement If set overrides the non-compliance replacement used for unenforced policy assignments. string "should" no
policy_non_compliance_message_not_supported_definitions If set, overrides the list of built-in policy definition that do not support non-compliance messages. list(string)
[
"/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"
]
no
resource_custom_timeouts 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.
hcl
resource_custom_timeouts = {
azurerm_private_dns_zone = {
create = "1h"
update = "1h30m"
delete = "30m"
read = "30s"
}
}
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)
}), {})
})
{} no
root_id 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. string "es" no
root_name If specified, will set a custom Display Name value for the Enterprise-scale "root" Management Group. string "Enterprise-Scale" no
strict_subscription_association 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. Default is false as this works better with subscription vending. bool false no
subscription_id_connectivity If specified, identifies the Platform subscription for "Connectivity" for resource deployment and correct placement in the Management Group hierarchy. string "" no
subscription_id_identity If specified, identifies the Platform subscription for "Identity" for resource deployment and correct placement in the Management Group hierarchy. string "" no
subscription_id_management If specified, identifies the Platform subscription for "Management" for resource deployment and correct placement in the Management Group hierarchy. string "" no
subscription_id_overrides If specified, will be used to assign subscription_ids to the default Enterprise-scale Management Groups. map(list(string)) {} no
template_file_variables If specified, provides the ability to define custom template variables used when reading in template files from the built-in and custom library_path. any {} no

Resources

Name Type
azapi_resource.data_collection_rule resource
azapi_resource.diag_settings resource
azurerm_automation_account.management resource
azurerm_dns_zone.connectivity resource
azurerm_express_route_gateway.virtual_wan resource
azurerm_firewall.connectivity resource
azurerm_firewall.virtual_wan resource
azurerm_firewall_policy.connectivity resource
azurerm_firewall_policy.virtual_wan resource
azurerm_log_analytics_linked_service.management resource
azurerm_log_analytics_solution.management resource
azurerm_log_analytics_workspace.management resource
azurerm_management_group.level_1 resource
azurerm_management_group.level_2 resource
azurerm_management_group.level_3 resource
azurerm_management_group.level_4 resource
azurerm_management_group.level_5 resource
azurerm_management_group.level_6 resource
azurerm_management_group_policy_assignment.enterprise_scale resource
azurerm_management_group_subscription_association.enterprise_scale resource
azurerm_network_ddos_protection_plan.connectivity resource
azurerm_policy_definition.enterprise_scale resource
azurerm_policy_set_definition.enterprise_scale resource
azurerm_private_dns_zone.connectivity resource
azurerm_private_dns_zone_virtual_network_link.connectivity resource
azurerm_public_ip.connectivity resource
azurerm_resource_group.connectivity resource
azurerm_resource_group.management resource
azurerm_resource_group.virtual_wan resource
azurerm_role_assignment.ama_managed_identity_operator resource
azurerm_role_assignment.ama_reader resource
azurerm_role_assignment.deploy_azsqldb_auditing_connectivity resource
azurerm_role_assignment.enterprise_scale resource
azurerm_role_assignment.policy_assignment resource
azurerm_role_assignment.private_dns_zone_contributor_connectivity resource
azurerm_role_definition.enterprise_scale resource
azurerm_subnet.connectivity resource
azurerm_subscription_template_deployment.telemetry_connectivity resource
azurerm_subscription_template_deployment.telemetry_core resource
azurerm_subscription_template_deployment.telemetry_identity resource
azurerm_subscription_template_deployment.telemetry_management resource
azurerm_user_assigned_identity.management resource
azurerm_virtual_hub.virtual_wan resource
azurerm_virtual_hub_connection.virtual_wan resource
azurerm_virtual_hub_routing_intent.virtual_wan resource
azurerm_virtual_network.connectivity resource
azurerm_virtual_network_gateway.connectivity resource
azurerm_virtual_network_peering.connectivity resource
azurerm_virtual_wan.virtual_wan resource
azurerm_vpn_gateway.virtual_wan resource
random_id.telem resource
time_sleep.after_azurerm_management_group resource
time_sleep.after_azurerm_policy_assignment resource
time_sleep.after_azurerm_policy_definition resource
time_sleep.after_azurerm_policy_set_definition resource
time_sleep.after_azurerm_role_assignment resource
time_sleep.after_azurerm_role_definition resource
azapi_resource.user_msi data source
azurerm_policy_definition.external_lookup data source
azurerm_policy_set_definition.external_lookup data source

Outputs

Name Description
ama_user_assigned_identity The user assigned identity for Azure Monitor Agent that is created by this module.
azurerm_automation_account Returns the configuration data for all Automation Accounts created by this module.
azurerm_dns_zone Returns the configuration data for all DNS Zones created by this module.
azurerm_express_route_gateway Returns the configuration data for all (Virtual WAN) ExpressRoute Gateways created by this module.
azurerm_firewall Returns the configuration data for all Azure Firewalls created by this module.
azurerm_firewall_policy Returns the configuration data for all Azure Firewall Policies created by this module.
azurerm_log_analytics_linked_service Returns the configuration data for all Log Analytics linked services created by this module.
azurerm_log_analytics_solution Returns the configuration data for all Log Analytics solutions created by this module.
azurerm_log_analytics_workspace Returns the configuration data for all Log Analytics workspaces created by this module.
azurerm_management_group Returns the configuration data for all Management Groups created by this module.
azurerm_management_group_policy_assignment Returns the configuration data for all Management Group Policy Assignments created by this module.
azurerm_management_group_subscription_association Returns the configuration data for all Management Group Subscription Associations created by this module.
azurerm_network_ddos_protection_plan Returns the configuration data for all DDoS Protection Plans created by this module.
azurerm_policy_definition Returns the configuration data for all Policy Definitions created by this module.
azurerm_policy_set_definition Returns the configuration data for all Policy Set Definitions created by this module.
azurerm_private_dns_zone Returns the configuration data for all Private DNS Zones created by this module.
azurerm_private_dns_zone_virtual_network_link Returns the configuration data for all Private DNS Zone network links created by this module.
azurerm_public_ip Returns the configuration data for all Public IPs created by this module.
azurerm_resource_group Returns the configuration data for all Resource Groups created by this module.
azurerm_role_assignment Returns the configuration data for all Role Assignments created by this module.
azurerm_role_definition Returns the configuration data for all Role Definitions created by this module.
azurerm_subnet Returns the configuration data for all Subnets created by this module.
azurerm_virtual_hub Returns the configuration data for all Virtual Hubs created by this module.
azurerm_virtual_hub_connection Returns the configuration data for all Virtual Hub Connections created by this module.
azurerm_virtual_hub_routing_intent Returns the configuration data for all Virtual Hub Routing Intents created by this module.
azurerm_virtual_network Returns the configuration data for all Virtual Networks created by this module.
azurerm_virtual_network_gateway Returns the configuration data for all Virtual Network Gateways created by this module.
azurerm_virtual_network_peering Returns the configuration data for all Virtual Network Peerings created by this module.
azurerm_virtual_wan Returns the configuration data for all Virtual WANs created by this module.
azurerm_vpn_gateway Returns the configuration data for all (Virtual WAN) VPN Gateways created by this module.
data_collection_rules A map of the data collection rules 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

About

Azure landing zones Terraform module

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HCL 84.8%
  • Open Policy Agent 7.2%
  • PowerShell 3.5%
  • Shell 3.2%
  • Other 1.3%