File tree 2 files changed +14
-0
lines changed
2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -153,6 +153,13 @@ resource "aws_cloudfront_distribution" "website" {
153
153
include_body = lambda_function_association. value . include_body
154
154
}
155
155
}
156
+ dynamic "function_association" {
157
+ for_each = { for i , l in var . functions : " function-${ i } " => l }
158
+ content {
159
+ event_type = function_association. value . event_type
160
+ function_arn = function_association. value . function_arn
161
+ }
162
+ }
156
163
}
157
164
158
165
dynamic "ordered_cache_behavior" {
Original file line number Diff line number Diff line change @@ -99,3 +99,10 @@ variable "can_overwrite" {
99
99
default = false
100
100
description = " Allow overwriting route53 records for pre-existing CNAME/certificates"
101
101
}
102
+ variable "functions" {
103
+ type = list (object ({
104
+ event_type = string
105
+ function_arn = string
106
+ }))
107
+ default = []
108
+ }
You can’t perform that action at this time.
0 commit comments