From da56fc56b9b98535f24db013a1d6e34c3fa3a066 Mon Sep 17 00:00:00 2001 From: Anton Babenko Date: Mon, 31 Oct 2022 21:24:51 +0100 Subject: [PATCH] fix: Fixed policy name when create_role is false (#371) --- iam.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iam.tf b/iam.tf index 5ffb5e36..91feaa9e 100644 --- a/iam.tf +++ b/iam.tf @@ -12,7 +12,7 @@ locals { # for #83 that will allow one to import resources without receiving an error from coalesce. # @see https://github.com/terraform-aws-modules/terraform-aws-lambda/issues/83 role_name = local.create_role ? coalesce(var.role_name, var.function_name, "*") : null - policy_name = coalesce(var.policy_name, local.role_name) + policy_name = coalesce(var.policy_name, local.role_name, "*") # IAM Role trusted entities is a list of any (allow strings (services) and maps (type+identifiers)) trusted_entities_services = distinct(compact(concat(