File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ resource "aws_s3_bucket_acl" "bucket" {
2828 acl = " public-read"
2929}
3030
31+ # Configure website settings
3132resource "aws_s3_bucket_website_configuration" "bucket" {
3233 bucket = aws_s3_bucket. bucket . id
3334
@@ -40,23 +41,25 @@ resource "aws_s3_bucket_website_configuration" "bucket" {
4041 }
4142
4243 routing_rules = jsonencode ([
43- {
44- Condition {
45- KeyPrefixEquals = " colorcop/download"
44+ {
45+ Condition = {
46+ KeyPrefixEquals = " colorcop/download"
47+ }
48+ Redirect = {
49+ ReplaceKeyWith = " download"
50+ HostName = var.domain
51+ }
52+ },
53+ {
54+ Condition = {
55+ KeyPrefixEquals = " colorcop/features"
56+ }
57+ Redirect = {
58+ ReplaceKeyWith = " features"
59+ HostName = var.domain
60+ }
4661 }
47- Redirect {
48- ReplaceKeyWith = " download"
49- }
50- },
51- {
52- Condition {
53- KeyPrefixEquals = " colorcop/features"
54- }
55- Redirect {
56- ReplaceKeyWith = " features"
57- }
58- }
59- ])
62+ ])
6063}
6164
6265resource "aws_cloudfront_distribution" "distribution" {
You can’t perform that action at this time.
0 commit comments