Skip to content

Commit

Permalink
Add support for overriding viewer_minimum_protocol_version (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Burnham authored and aknysh committed May 3, 2018
1 parent b24fc87 commit 6859950
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ aws acm request-certificate --domain-name example.com --subject-alternative-name
| `default_ttl` | `60` | Default amount of time (in seconds) that an object is in a CloudFront cache | No |
| `max_ttl` | `31536000` | Maximum amount of time (in seconds) that an object is in a CloudFront cache | No |
| `price_class` | `PriceClass_100` | Price class for this distribution: `PriceClass_All`, `PriceClass_200`, `PriceClass_100` | No |
| `viewer_minimum_protocol_version` | `TLSv1` | The minimum version of the SSL protocol that you want CloudFront to use for HTTPS connections. | No |
| `viewer_protocol_policy` | `redirect-to-https` | Element to specify the protocol: `allow-all`, `https-only`, `redirect-to-https` | No |
| `origin_path` | `` | Element that causes CloudFront to request your content from a directory in your Amazon S3 bucket | No |
| `origin_domain_name` | `` | The DNS domain name of your custom origin (e.g. website) | Yes |
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ resource "aws_cloudfront_distribution" "default" {
viewer_certificate {
acm_certificate_arn = "${var.acm_certificate_arn}"
ssl_support_method = "sni-only"
minimum_protocol_version = "TLSv1"
minimum_protocol_version = "${var.viewer_minimum_protocol_version}"
cloudfront_default_certificate = true
}

Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ variable "price_class" {
default = "PriceClass_100"
}

variable "viewer_minimum_protocol_version" {
description = "(Optional) The minimum version of the SSL protocol that you want CloudFront to use for HTTPS connections."
default = "TLSv1"
}

variable "viewer_protocol_policy" {
description = "allow-all, redirect-to-https"
default = "redirect-to-https"
Expand Down

0 comments on commit 6859950

Please sign in to comment.