Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Feb 8, 2024
1 parent ce346e6 commit 3835811
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions permissionset/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ locals {
single = "p-sso-%v"
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 = 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_name_single = local.auto_policy_count == 0 ? [format(local.auto_policy_name_format["single"], var.name)] : []
auto_policy_name_multiple = can(local.auto_policy_count > 0 && local.auto_policy_count <= 20) ? [for i in range(1, local.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)))
}
Expand Down
8 changes: 4 additions & 4 deletions permissionset/settings.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
locals {
settings = var.settings_file != null ? (fileexists(var.settings_file) ? yamldecode(file(var.settings_file)) : null) : null
name = coalesce(var.name, try(local.settings.group, null))
description = coalesce(var.description, try(local.settings.description, null), local.name)
auto_policy_acount = try(local.settings.auto_policy_count, var.auto_policy_count)
settings = var.settings_file != null ? (fileexists(var.settings_file) ? yamldecode(file(var.settings_file)) : null) : null
name = coalesce(var.name, try(local.settings.group, null))
description = coalesce(var.description, try(local.settings.description, null), local.name)
auto_policy_count = try(local.settings.auto_policy_count, var.auto_policy_count)
}

0 comments on commit 3835811

Please sign in to comment.