Skip to content

Commit

Permalink
fix: Fixed policy name when create_role is false (#371)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonbabenko authored Oct 31, 2022
1 parent c8bde3c commit da56fc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit da56fc5

Please sign in to comment.