Skip to content

Commit bfeeb53

Browse files
knqyf263aknysh
authored andcommitted
Add lambda_function_association (#34)
1 parent cf29a8b commit bfeeb53

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ Available targets:
146146
| tags | Additional tags (e.g. map(`BusinessUnit`,`XYZ`) | map | `<map>` | no |
147147
| use_regional_s3_endpoint | When set to 'true' the s3 origin_bucket will use the regional endpoint address instead of the global endpoint address | string | `false` | no |
148148
| viewer_protocol_policy | allow-all, redirect-to-https | string | `redirect-to-https` | no |
149+
| lambda_function_association | A config block that triggers a lambda function with specific actions | list | `<list>` | no |
149150

150151
## Outputs
151152

docs/terraform.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
| tags | Additional tags (e.g. map(`BusinessUnit`,`XYZ`) | map | `<map>` | no |
5050
| use_regional_s3_endpoint | When set to 'true' the s3 origin_bucket will use the regional endpoint address instead of the global endpoint address | string | `false` | no |
5151
| viewer_protocol_policy | allow-all, redirect-to-https | string | `redirect-to-https` | no |
52+
| lambda_function_association | A config block that triggers a lambda function with specific actions | list | `<list>` | no |
5253

5354
## Outputs
5455

main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ resource "aws_cloudfront_distribution" "default" {
153153
default_ttl = "${var.default_ttl}"
154154
min_ttl = "${var.min_ttl}"
155155
max_ttl = "${var.max_ttl}"
156+
157+
lambda_function_association = ["${var.lambda_function_association}"]
156158
}
157159

158160
restrictions {

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,3 +257,9 @@ variable "custom_error_response" {
257257
type = "list"
258258
default = []
259259
}
260+
261+
variable "lambda_function_association" {
262+
type = "list"
263+
default = []
264+
description = "A config block that triggers a lambda function with specific actions"
265+
}

0 commit comments

Comments
 (0)