File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,11 @@ variable "name" {
33 type = string
44}
55
6+ variable "cloudfront_web_acl_id" {
7+ default = " "
8+ description = " Optional web acl (WAF) to attach to CloudFront"
9+ }
10+
611variable "hostnames" {
712 description = " Hostnames to create DNS record for this app that the cloudfront distribution will accept"
813 type = list (string )
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ resource "aws_cloudfront_distribution" "default" {
1313
1414 depends_on = [aws_wafv2_web_acl . waf_cloudfront ]
1515
16- web_acl_id = var. waf_cloudfront_enable ? aws_wafv2_web_acl. waf_cloudfront [0 ]. arn : null
16+ web_acl_id = var. waf_cloudfront_enable ? (var . cloudfront_web_acl_id != null ? var . cloudfront_web_acl_id : aws_wafv2_web_acl. waf_cloudfront [0 ]. arn ) : null
1717
1818 origin {
1919 domain_name = var. alb_dns_name
You can’t perform that action at this time.
0 commit comments