Skip to content

Commit

Permalink
Deployment: ui url mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
chrmod committed Jul 14, 2023
1 parent e7b4cd2 commit 185b9a5
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions deploy/ui.tf
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@

resource "aws_s3_bucket" "balrog-ui-ghosterydev-com" {
bucket = "balrog-ui.ghosterydev.com"
acl = "public-read"
}

website {
index_document = "index.html"
error_document = "index.html"
resource "aws_s3_bucket_website_configuration" "balrog-ui-ghosterydev-com" {
bucket = aws_s3_bucket.balrog-ui-ghosterydev-com.id
index_document {
suffix = "index.html"
}
}

resource "aws_s3_bucket_acl" "b_acl" {
bucket = aws_s3_bucket.balrog-ui-ghosterydev-com.id
acl = "public-read"
}

locals {
s3_origin_id = "S3Origin-Balrog"
}
Expand Down Expand Up @@ -47,6 +53,13 @@ resource "aws_cloudfront_distribution" "default" {
max_ttl = 86400
}

custom_error_response {
error_caching_min_ttl = 300
error_code = 404
response_code = 200
response_page_path = "/index.html"
}

restrictions {
geo_restriction {
locations = []
Expand Down

0 comments on commit 185b9a5

Please sign in to comment.