Skip to content

Commit

Permalink
terraform format
Browse files Browse the repository at this point in the history
  • Loading branch information
fillup committed Jan 7, 2018
1 parent 64df66d commit 44c2133
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 18 deletions.
8 changes: 4 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ data "aws_acm_certificate" "cert" {
* Create CloudFront distribution for SSL support but caching disabled, leave that to Cloudflare
*/
resource "aws_cloudfront_distribution" "hugo" {
count = 1
count = 1
depends_on = ["aws_s3_bucket.hugo"]

origin {
custom_origin_config {
http_port = 80
https_port = 443
http_port = 80
https_port = 443
origin_protocol_policy = "http-only"
origin_ssl_protocols = ["SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2"]
origin_ssl_protocols = ["SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2"]
}

// Important to use this format of origin domain name, it is the only format that
Expand Down
2 changes: 1 addition & 1 deletion outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ output "cloudfront_hostname" {

output "s3_bucket_arn" {
value = "${aws_s3_bucket.hugo.arn}"
}
}
24 changes: 11 additions & 13 deletions vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ variable "aliases" {
}

variable "aws_region" {
type = "string"
type = "string"
default = "us-east-1"
}

Expand All @@ -21,32 +21,30 @@ variable "cert_domain" {

variable "cf_default_ttl" {
description = "CloudFront default TTL for cachine"
type = "string"
default = "86400"
type = "string"
default = "86400"
}

variable "cf_min_ttl" {
description = "CloudFront minimum TTL for caching"
type = "string"
default = "0"
type = "string"
default = "0"
}

variable "cf_max_ttl" {
description = "CloudFront maximum TTL for caching"
type = "string"
default = "31536000"
type = "string"
default = "31536000"
}

variable "cf_price_class" {
description = "CloudFront price class"
type = "string"
default = "PriceClass_All"
type = "string"
default = "PriceClass_All"
}

variable "origin_path" {
description = "Path in S3 bucket for hosted files, without slashes"
type = "string"
default = "public"
type = "string"
default = "public"
}


0 comments on commit 44c2133

Please sign in to comment.