Skip to content

Commit

Permalink
Merge pull request #4 from monte-carlo-data/santi/olym-3469-add-suppo…
Browse files Browse the repository at this point in the history
…rt-for-signed-urls-on-dc-agent

add CORS configuration for data bucket
  • Loading branch information
santiagoaguiar authored Jan 10, 2024
2 parents 0d50bd8 + d7d6bd9 commit 172b3be
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,17 @@ resource "aws_s3_bucket_lifecycle_configuration" "mcd_agent_store_lifecycle" {
}
}

resource "aws_s3_bucket_cors_configuration" "mcd_agent_store_cors" {
bucket = aws_s3_bucket.mcd_agent_store.id

cors_rule {
allowed_methods = ["GET"]
allowed_origins = ["https://*.getmontecarlo.com"]
allowed_headers = ["*"]
max_age_seconds = 3000
}
}

resource "aws_s3_bucket_public_access_block" "mcd_agent_store_block_public_access" {
bucket = aws_s3_bucket.mcd_agent_store.id
block_public_acls = true
Expand Down

0 comments on commit 172b3be

Please sign in to comment.