Skip to content

Commit c84b705

Browse files
[PRMP-579] add conditional to cloudfront outputs
1 parent dcd3895 commit c84b705

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
output "cloudfront_url" {
2-
value = aws_cloudfront_distribution.distribution[count.index].domain_name
2+
value = var.has_secondary_bucket ? aws_cloudfront_distribution.distribution_with_secondary_bucket[0].domain_name : aws_cloudfront_distribution.distribution[0].domain_name
33
}
44

55
output "cloudfront_arn" {
66
description = "The ARN of the CloudFront Distribution"
7-
value = aws_cloudfront_distribution.distribution[count.index].arn
7+
value = var.has_secondary_bucket ? aws_cloudfront_distribution.distribution_with_secondary_bucket[0].arn : aws_cloudfront_distribution.distribution[0].arn
88
}

0 commit comments

Comments
 (0)