Skip to content

Commit

Permalink
feat(aws): cloudfront: allow multiple members in origin group
Browse files Browse the repository at this point in the history
  • Loading branch information
fredleger committed Mar 14, 2024
1 parent ecaadf8 commit f7d98f0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions aws/cloudfront-distribution/cloudfront.tf
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,11 @@ resource "aws_cloudfront_distribution" "main" {
failover_criteria {
status_codes = origin_group.value.failover_criteria.status_codes
}
member {
origin_id = origin_group.value.member.origin_id
dynamic "member" {
for_each = length(origin_group.value.member) > 0 ? flatten([origin_group.value.member]) : []
content {
origin_id = try(member.value.origin_id, null)
}
}
}
}
Expand Down

0 comments on commit f7d98f0

Please sign in to comment.