Skip to content

Commit

Permalink
fix: indexing of iam.condition == null
Browse files Browse the repository at this point in the history
  • Loading branch information
mariux committed Dec 30, 2022
1 parent 3d6246f commit dea1064
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 @@ -10,7 +10,7 @@ locals {
iam = concat(local.iam_role, local.iam_roles)

iam_map = { for idx, iam in local.iam :
try(iam._key, "${iam.role}/${iam.condition._key}", "${iam.role}/${md5(jsonencode(iam.condition))}", iam.role) => idx
try(iam._key, "${iam.role}/${iam.condition._key}", iam.condition != null ? "${iam.role}/${md5(jsonencode(iam.condition))}" : iam.role, iam.role) => idx
}
}

Expand Down

0 comments on commit dea1064

Please sign in to comment.