Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Feb 8, 2024
1 parent f2e8a98 commit 41e30b0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions permissionset/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ locals {
multiple = "p-sso-%v-p%v"
}
auto_policy_name_single = var.auto_policy_count == 0 ? [format(local.auto_policy_name_format["single"], var.name)] : []
auto_policy_name_multiple = (var.auto_policy_count > 0 && var.auto_policy_count <= 20) ? [for i in range(1, var.auto_policy_count + 1) : format(local.auto_policy_name_format["multiple"], var.name, i)] : []
auto_policy_name_multiple = can(var.auto_policy_count > 0 && var.auto_policy_count <= 20) ? [for i in range(1, var.auto_policy_count + 1) : format(local.auto_policy_name_format["multiple"], var.name, i)] : []
auto_policy_names = compact(concat(local.auto_policy_name_single, local.auto_policy_name_multiple))

total_policies = length(compact(concat(keys(var.customer_managed_policy_names), local.auto_policy_names)))
total_policies = length(compact(concat(keys(var.customer_managed_policy_names), local.auto_policy_names)))
}

resource "aws_ssoadmin_permission_set" "pset" {
Expand Down

0 comments on commit 41e30b0

Please sign in to comment.