Skip to content

Commit

Permalink
Revert #253 (#254)
Browse files Browse the repository at this point in the history
* lambda function association based on vars (reverts part of previous pr)

* lambda function association based on vars (reverts part of previous pr)
  • Loading branch information
Benbentwo authored Dec 21, 2022
1 parent b44d7b3 commit 7f2b318
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ data "aws_iam_policy_document" "combined" {
source_policy_documents = compact(concat(
data.aws_iam_policy_document.s3_origin.*.json,
data.aws_iam_policy_document.s3_website_origin.*.json,
local.website_enabled ? [] : data.aws_iam_policy_document.s3_ssl_only.*.json,
data.aws_iam_policy_document.s3_ssl_only.*.json,
values(data.aws_iam_policy_document.deployment)[*].json
))
}
Expand Down Expand Up @@ -528,7 +528,7 @@ resource "aws_cloudfront_distribution" "default" {
realtime_log_config_arn = var.realtime_log_config_arn

dynamic "lambda_function_association" {
for_each = { for k, v in var.lambda_function_association : k => v if ! local.website_enabled }
for_each = var.lambda_function_association
content {
event_type = lambda_function_association.value.event_type
include_body = lookup(lambda_function_association.value, "include_body", null)
Expand Down

0 comments on commit 7f2b318

Please sign in to comment.