forked from Azure/terraform-azurerm-avm-res-cache-redis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.roleassignments.tf
13 lines (12 loc) · 998 Bytes
/
main.roleassignments.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
resource "azurerm_role_assignment" "this" {
for_each = var.role_assignments
principal_id = each.value.principal_id
scope = azurerm_redis_cache.this.id
condition = each.value.condition
condition_version = each.value.condition_version
delegated_managed_identity_resource_id = each.value.delegated_managed_identity_resource_id
principal_type = each.value.principal_type
role_definition_id = strcontains(lower(each.value.role_definition_id_or_name), lower(local.role_definition_resource_substring)) ? each.value.role_definition_id_or_name : null
role_definition_name = strcontains(lower(each.value.role_definition_id_or_name), lower(local.role_definition_resource_substring)) ? null : each.value.role_definition_id_or_name
skip_service_principal_aad_check = each.value.skip_service_principal_aad_check
}