Skip to content

Commit

Permalink
fixup! chore: don't use S3 hosting for 'dev' workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
chizmw committed Oct 3, 2023
1 parent 651942d commit 90d4ec4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions terraform/s3-web-workspaced.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ resource "aws_s3_bucket_ownership_controls" "wkspc_www_bucket_ownership_controls
# only create objects if we are in the prod workspace
count = local.is_prod ? length(local.files) : 0

bucket = aws_s3_bucket.wkspc_www_bucket.id
bucket = aws_s3_bucket.wkspc_www_bucket[count.index].id

rule {
object_ownership = "BucketOwnerPreferred"
Expand All @@ -28,7 +28,7 @@ resource "aws_s3_bucket_acl" "wkspc_www_bucket_acl" {
depends_on = [
aws_s3_bucket_ownership_controls.wkspc_www_bucket_ownership_controls,
]
bucket = aws_s3_bucket.wkspc_www_bucket.id
bucket = aws_s3_bucket.wkspc_www_bucket[count.index].id
acl = "public-read"
}

Expand All @@ -49,7 +49,7 @@ resource "aws_s3_bucket_cors_configuration" "wkspc_www_bucket_cors" {
# only create objects if we are in the prod workspace
count = local.is_prod ? 1 : 0

bucket = aws_s3_bucket.wkspc_www_bucket.id
bucket = aws_s3_bucket.wkspc_www_bucket[count.index].id

cors_rule {
allowed_headers = ["Authorization", "Content-Length"]
Expand All @@ -64,7 +64,7 @@ resource "aws_s3_bucket_website_configuration" "wkspc_www_bucket_website" {
# only create objects if we are in the prod workspace
count = local.is_prod ? 1 : 0

bucket = aws_s3_bucket.wkspc_www_bucket.id
bucket = aws_s3_bucket.wkspc_www_bucket[count.index].id

index_document {
suffix = "index.html"
Expand Down

0 comments on commit 90d4ec4

Please sign in to comment.