From 2dd1050406edf0bf6ceb229d6031f5158cec8eee Mon Sep 17 00:00:00 2001 From: franklinpashok Date: Mon, 16 Sep 2024 13:22:07 +0800 Subject: [PATCH] remove the list as function association --- cloudfront.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cloudfront.tf b/cloudfront.tf index 0162a92..feed034 100644 --- a/cloudfront.tf +++ b/cloudfront.tf @@ -48,11 +48,11 @@ module "cdn" { origin_request_policy_id = data.aws_cloudfront_origin_request_policy.this.id cache_policy_id = data.aws_cloudfront_cache_policy.this.id - function_association = var.create_associate_function ? [{ + function_association = var.create_associate_function ? { viewer-request = { function_arn = aws_cloudfront_function.viewer_request[0].arn } - }] : [] + } : {} }, var.default_cache_behavior)