Skip to content

Commit

Permalink
use s3 website bucket name so index documents work in subdirs
Browse files Browse the repository at this point in the history
The custom_origin_config is required because terraform will
insist that the bucket name is incorrect as it doesn't follow
the irlpodcast.s3.amazonaws.com format.

requires terraform 0.9.8

see also:
hashicorp/terraform#10572
hashicorp/terraform#13627
  • Loading branch information
Dave Parfitt committed Jun 13, 2017
1 parent d5526e4 commit ac202f0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion apps/irlpodcast/tf/irlpodcast.tf
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,15 @@ EOF

resource "aws_cloudfront_distribution" "s3_distribution" {
origin {
domain_name = "${aws_s3_bucket.irlpodcast.bucket_domain_name}"
domain_name = "irlpodcast.s3-website-us-west-2.amazonaws.com"
origin_id = "IRLPodcast"
custom_origin_config {
origin_protocol_policy = "https-only"
http_port = "80"
https_port = "443"
origin_ssl_protocols = ["TLSv1"]
#origin_read_timeout = 4
}
}

enabled = true
Expand Down

0 comments on commit ac202f0

Please sign in to comment.