forked from aztfmod/terraform-azurerm-caf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azuread_credentials.tf
23 lines (20 loc) · 1.19 KB
/
azuread_credentials.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Module for the CAf variable azuread_apps
module "azuread_credentials" {
source = "./modules/azuread/credentials"
depends_on = [module.keyvault_access_policies]
for_each = local.azuread.azuread_credentials
client_config = local.client_config
global_settings = local.global_settings
keyvaults = local.combined_objects_keyvaults
credential_policy = try(local.azuread.azuread_credential_policies[each.value.azuread_credential_policy_key], null)
settings = each.value
resources = {
application = {
id = can(each.value.azuread_application.object_id) ? each.value.azuread_application.object_id : local.combined_objects_azuread_applications[try(each.value.azuread_application.lz_key, local.client_config.landingzone_key)][each.value.azuread_application.key].object_id
application_id = can(each.value.azuread_application.application_id) ? each.value.azuread_application.application_id : local.combined_objects_azuread_applications[try(each.value.azuread_application.lz_key, local.client_config.landingzone_key)][each.value.azuread_application.key].application_id
}
}
}
output "azuread_credentials" {
value = module.azuread_credentials
}