Skip to content

Commit

Permalink
change origin path to include leading slash so it can be omitted for …
Browse files Browse the repository at this point in the history
…storing s3 files in root of bucket
  • Loading branch information
fillup committed Jan 18, 2019
1 parent b869d21 commit dc90619
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ resource "aws_cloudfront_distribution" "hugo" {
domain_name = "${var.bucket_name}.s3-website-${var.aws_region}.amazonaws.com"

origin_id = "${var.s3_origin_id}"
origin_path = "/${var.origin_path}"
origin_path = "${var.origin_path}"
}

enabled = true
Expand Down
4 changes: 2 additions & 2 deletions vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ variable "cors_max_age_seconds" {
}

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

variable "routing_rules" {
Expand Down

0 comments on commit dc90619

Please sign in to comment.