Skip to content

Commit

Permalink
added compression flag
Browse files Browse the repository at this point in the history
  • Loading branch information
sionsmith committed Feb 25, 2021
1 parent fe12bd7 commit 68db87b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions aws_cloudfront_distribution.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ resource "aws_cloudfront_distribution" "s3_distribution" {
min_ttl = var.cloudfront_cache_min_ttl
default_ttl = var.cloudfront_cache_default_ttl
max_ttl = var.cloudfront_cache_max_ttl
compress = var.cloudfront_cache_compress_content

allowed_methods = [
"GET",
"HEAD",
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ variable "cloudfront_cache_max_ttl" {
default = 300
}

variable "cloudfront_cache_compress_content" {
type = bool
description = "Whether you want CloudFront to automatically compress content for web requests that include Accept-Encoding: gzip in the request header"
default = false
}

variable "distribution_fqdn" {
type = string
description = "Fully qualified domain bound to Cloudfront."
Expand Down

0 comments on commit 68db87b

Please sign in to comment.