File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -228,7 +228,11 @@ variable "cloudfront_ordered_cache_behaviors" {
228
228
default_ttl = optional (number )
229
229
field_level_encryption_id = optional (string )
230
230
# forwarded_values will not be supported as Hashicorp had already deprecated it at the time of implementing this module
231
- # TODO support lambda_function_association and function_association
231
+ function_association = optional (list (object ({
232
+ event_type = string
233
+ function_arn = string
234
+ })), [])
235
+ # TODO support lambda_function_association
232
236
max_ttl = optional (number )
233
237
min_ttl = optional (number )
234
238
origin_request_policy_id = string
Original file line number Diff line number Diff line change @@ -216,6 +216,13 @@ resource "aws_cloudfront_distribution" "website" {
216
216
smooth_streaming = ordered_cache_behavior. value . smooth_streaming
217
217
target_origin_id = ordered_cache_behavior. value . target_origin_id
218
218
viewer_protocol_policy = ordered_cache_behavior. value . viewer_protocol_policy
219
+ dynamic "function_association" {
220
+ for_each = ordered_cache_behavior. value . function_association
221
+ content {
222
+ event_type = function_association. value . event_type
223
+ function_arn = function_association. value . function_arn
224
+ }
225
+ }
219
226
}
220
227
}
221
228
You can’t perform that action at this time.
0 commit comments