Skip to content

Commit 364e3bc

Browse files
committed
try foreach
1 parent f4faa87 commit 364e3bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

infrastructure/terraform/modules/backend-api/module_s3bucket_download.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ resource "aws_s3_bucket_policy" "download_bucket_policy" {
3535
}
3636

3737
data "aws_iam_policy_document" "s3bucket_download" {
38-
count = var.cloudfront_distribution_arn != null ? 1 : 0
38+
for_each = var.cloudfront_distribution_arn != null ? toset([var.cloudfront_distribution_arn]) : []
3939

4040
statement {
4141
sid = "AllowCloudFrontServicePrincipalReadOnly"

0 commit comments

Comments
 (0)