regulatory-compliance-initi.../terraform/main.tf

86 строки
2.8 KiB
Terraform
Исходник Обычный вид История

2021-11-25 06:38:08 +03:00
# 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" {}
# Declare the Terraform Module for Cloud Adoption Framework
# Enterprise-scale and provide a base configuration.
module "enterprise_scale" {
source = "Azure/caf-enterprise-scale/azurerm"
2022-02-17 12:01:38 +03:00
version = "1.1.2"
2021-11-25 06:38:08 +03:00
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
library_path = "${path.root}/lib"
deploy_management_resources = var.deploy_management_resources
subscription_id_management = data.azurerm_client_config.core.subscription_id
configure_management_resources = local.configure_management_resources
2022-02-12 04:02:08 +03:00
# This will be used for the deployment of all "Connectivity resources" to default`.
deploy_connectivity_resources = var.deploy_connectivity_resources
subscription_id_connectivity = data.azurerm_client_config.core.subscription_id
configure_connectivity_resources = local.configure_connectivity_resources
2022-01-27 05:45:39 +03:00
# Configuration settings for optional landing zones
2022-02-25 05:12:06 +03:00
deploy_corp_landing_zones = true
deploy_online_landing_zones = true
deploy_sap_landing_zones = true
deploy_demo_landing_zones = false
custom_landing_zones = {
2022-02-25 05:12:06 +03:00
"${var.root_id}-corp-prod" = {
display_name = "Prod"
parent_management_group_id = "${var.root_id}-corp"
2022-01-27 05:45:39 +03:00
subscription_ids = ["de40a933-33fc-47a7-afaf-78f0c6edba9a"]
archetype_config = {
archetype_id = "default_empty"
parameters = {}
access_control = {}
}
}
2022-02-25 05:12:06 +03:00
"${var.root_id}-corp-test" = {
display_name = "Test"
parent_management_group_id = "${var.root_id}-corp"
subscription_ids = []
archetype_config = {
archetype_id = "default_empty"
parameters = {}
access_control = {}
}
}
2022-02-25 05:12:06 +03:00
"${var.root_id}-corp-dev" = {
display_name = "Dev"
parent_management_group_id = "${var.root_id}-corp"
subscription_ids = []
archetype_config = {
archetype_id = "default_empty"
parameters = {}
access_control = {}
}
2022-02-25 05:12:06 +03:00
# archetype_config = {
# archetype_id = "customer_online"
# parameters = {
# Deny-Resource-Locations = {
# listOfAllowedLocations = ["eastus",]
# }
# Deny-RSG-Locations = {
# listOfAllowedLocations = ["eastus",]
# }
# }
# access_control = {}
# }
}
}
2021-11-25 06:38:08 +03:00
}