forked from aztfmod/terraform-azurerm-caf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app_services.tf
executable file
·28 lines (24 loc) · 1.63 KB
/
app_services.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
module "app_services" {
source = "./modules/webapps/appservice"
for_each = local.webapp.app_services
name = each.value.name
client_config = local.client_config
resource_group_name = module.resource_groups[each.value.resource_group_key].name
location = lookup(each.value, "region", null) == null ? module.resource_groups[each.value.resource_group_key].location : local.global_settings.regions[each.value.region]
app_service_plan_id = try(each.value.lz_key, null) == null ? local.combined_objects_app_service_plans[local.client_config.landingzone_key][each.value.app_service_plan_key].id : local.combined_objects_app_service_plans[each.value.lz_key][each.value.app_service_plan_key].id
settings = each.value.settings
identity = try(each.value.identity, null)
connection_strings = try(each.value.connection_strings, {})
app_settings = try(each.value.app_settings, null)
slots = try(each.value.slots, {})
global_settings = local.global_settings
dynamic_app_settings = try(each.value.dynamic_app_settings, {})
combined_objects = local.dynamic_app_settings_combined_objects
base_tags = try(local.global_settings.inherit_tags, false) ? module.resource_groups[each.value.resource_group_key].tags : {}
application_insight = try(each.value.application_insight_key, null) == null ? null : module.azurerm_application_insights[each.value.application_insight_key]
storage_accounts = local.combined_objects_storage_accounts
tags = try(each.value.tags, null)
}
output "app_services" {
value = module.app_services
}