Skip to content

Commit

Permalink
fix(s3_website_origin): purge empty strings
Browse files Browse the repository at this point in the history
  • Loading branch information
dudymas committed Jun 9, 2024
1 parent f950681 commit 734a336
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ data "aws_iam_policy_document" "s3_website_origin" {

principals {
type = "AWS"
identifiers = var.block_origin_public_access_enabled ? flatten([aws_cloudfront_origin_access_identity.default[*].iam_arn, [var.cloudfront_origin_access_identity_iam_arn]]) : ["*"]
identifiers = var.block_origin_public_access_enabled ? compact(flatten([aws_cloudfront_origin_access_identity.default[*].iam_arn, [var.cloudfront_origin_access_identity_iam_arn]])) : ["*"]
}
dynamic "condition" {
for_each = local.website_password_enabled ? ["password"] : []
Expand Down

0 comments on commit 734a336

Please sign in to comment.