Skip to content

Commit

Permalink
Set web_acl_id
Browse files Browse the repository at this point in the history
  • Loading branch information
pjuniorlima committed Jun 25, 2021
1 parent a938625 commit 7444498
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions site-main/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ resource "aws_cloudfront_distribution" "website_cdn" {
enabled = true
price_class = var.price_class
http_version = "http2"
web_acl_id = var.web_acl_id != null ? var.web_acl_id : null

origin {
origin_id = var.create_bucket == true ? "origin-bucket-${aws_s3_bucket.website_bucket[0].id}" : "origin-bucket-${var.bucket_name}"
Expand Down
5 changes: 5 additions & 0 deletions site-main/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,9 @@ variable "cache_policy_id" {
variable "origin_request_policy_id" {
default = "88a5eaf4-2fd4-4709-b370-b4c650ea3fcf"
description = "Name of origin request policy previously created"
}

variable "web_acl_id" {
description = "ARN of WAF"
default = null
}

0 comments on commit 7444498

Please sign in to comment.