Skip to content

Commit

Permalink
update function association for default behaviour (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
franklinpashok authored Sep 13, 2024
1 parent 6a54c2b commit 4bc155d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cloudfront.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ module "cdn" {
cache_policy_id = data.aws_cloudfront_cache_policy.this.id

function_association = var.create_associate_function ? [{
event_type = "viewer-request"
function_arn = aws_cloudfront_function.viewer_request[0].arn
viewer-request = {
function_arn = aws_cloudfront_function.viewer_request[0].arn
}
}] : []

}, var.default_cache_behavior)
Expand Down

0 comments on commit 4bc155d

Please sign in to comment.