forked from aztfmod/terraform-azurerm-caf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
postgresql_servers.tf
executable file
·27 lines (22 loc) · 1.57 KB
/
postgresql_servers.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
output "postgresql_servers" {
value = module.postgresql_servers
}
module "postgresql_servers" {
source = "./modules/databases/postgresql_server"
depends_on = [module.keyvault_access_policies]
for_each = local.database.postgresql_servers
global_settings = local.global_settings
client_config = local.client_config
settings = each.value
resource_group_name = local.resource_groups[each.value.resource_group_key].name
location = lookup(each.value, "region", null) == null ? local.resource_groups[each.value.resource_group_key].location : local.global_settings.regions[each.value.region]
keyvault_id = try(each.value.administrator_login_password, null) == null ? module.keyvaults[each.value.keyvault_key].id : null
storage_accounts = module.storage_accounts
azuread_groups = module.azuread_groups
vnets = local.combined_objects_networking
subnet_id = try(each.value.vnet_key, null) == null ? null : try(local.combined_objects_networking[local.client_config.landingzone_key][each.value.vnet_key].subnets[each.value.subnet_key].id, local.combined_objects_networking[each.value.lz_key][each.value.vnet_key].subnets[each.value.subnet_key].id)
private_endpoints = try(each.value.private_endpoints, {})
resource_groups = try(each.value.private_endpoints, {}) == {} ? null : local.resource_groups
base_tags = try(local.global_settings.inherit_tags, false) ? local.resource_groups[each.value.resource_group_key].tags : {}
private_dns = local.combined_objects_private_dns
}