From 38358117c5e6a9d2053cca781fe33ef1c31a147c Mon Sep 17 00:00:00 2001 From: badra001 Date: Thu, 8 Feb 2024 13:56:06 -0500 Subject: [PATCH] fix --- permissionset/main.tf | 4 ++-- permissionset/settings.tf | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/permissionset/main.tf b/permissionset/main.tf index 485c6dc..40654a1 100644 --- a/permissionset/main.tf +++ b/permissionset/main.tf @@ -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))) } diff --git a/permissionset/settings.tf b/permissionset/settings.tf index 421067f..14c7a78 100644 --- a/permissionset/settings.tf +++ b/permissionset/settings.tf @@ -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) }