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 16f93db commit 651942d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions terraform/s3-web-workspaced.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ resource "aws_s3_bucket_ownership_controls" "wkspc_www_bucket_ownership_controls
resource "aws_s3_bucket_acl" "wkspc_www_bucket_acl" {

# only create objects if we are in the prod workspace
count = local.is_prod ? length(local.files) : 0
count = local.is_prod ? 1 : 0

depends_on = [
aws_s3_bucket_ownership_controls.wkspc_www_bucket_ownership_controls,
Expand All @@ -35,7 +35,7 @@ resource "aws_s3_bucket_acl" "wkspc_www_bucket_acl" {
resource "aws_s3_bucket_policy" "wkspc_www_bucket_policy" {

# only create objects if we are in the prod workspace
count = local.is_prod ? length(local.files) : 0
count = local.is_prod ? 1 : 0

depends_on = [
aws_s3_bucket_acl.wkspc_www_bucket_acl,
Expand All @@ -47,7 +47,7 @@ resource "aws_s3_bucket_policy" "wkspc_www_bucket_policy" {
resource "aws_s3_bucket_cors_configuration" "wkspc_www_bucket_cors" {

# only create objects if we are in the prod workspace
count = local.is_prod ? length(local.files) : 0
count = local.is_prod ? 1 : 0

bucket = aws_s3_bucket.wkspc_www_bucket.id

Expand All @@ -62,7 +62,7 @@ resource "aws_s3_bucket_cors_configuration" "wkspc_www_bucket_cors" {
resource "aws_s3_bucket_website_configuration" "wkspc_www_bucket_website" {

# only create objects if we are in the prod workspace
count = local.is_prod ? length(local.files) : 0
count = local.is_prod ? 1 : 0

bucket = aws_s3_bucket.wkspc_www_bucket.id

Expand All @@ -79,7 +79,7 @@ resource "aws_s3_bucket_website_configuration" "wkspc_www_bucket_website" {
resource "aws_cloudfront_distribution" "wkspc_www_s3_distribution" {

# only create objects if we are in the prod workspace
count = local.is_prod ? length(local.files) : 0
count = local.is_prod ? 1 : 0

origin {
domain_name = aws_s3_bucket.wkspc_www_bucket.bucket_regional_domain_name
Expand Down Expand Up @@ -173,7 +173,7 @@ resource "aws_lambda_permission" "allow_bucket" {
resource "aws_lambda_permission" "apigw_invoke_function" {

# only create objects if we are in the prod workspace
count = local.is_prod ? length(local.files) : 0
count = local.is_prod ? 1 : 0

statement_id = "AllowApiGatewayToInvokeFunction-${local.site_name}-${terraform.workspace}"
action = "lambda:InvokeFunction"
Expand Down

0 comments on commit 651942d

Please sign in to comment.