Skip to content

Commit 60d8c5a

Browse files
committed
fix
1 parent 7322327 commit 60d8c5a

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

terraform/website/main.tf

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,29 +47,21 @@ resource "aws_s3_bucket_website_configuration" "bucket" {
4747
}
4848
Redirect = {
4949
ReplaceKeyWith = "download"
50+
HostName = var.domain
5051
}
5152
},
5253
{
5354
Condition = {
54-
KeyPrefixEquals = "colorcop/features2"
55+
KeyPrefixEquals = "colorcop/features"
5556
}
5657
Redirect = {
57-
ReplaceKeyWith = "features2"
58+
ReplaceKeyWith = "features"
59+
HostName = var.domain
5860
}
5961
}
6062
])
6163
}
6264

63-
resource "aws_s3_object" "redirect_features" {
64-
bucket = aws_s3_bucket.bucket.id
65-
key = "colorcop/features"
66-
content_type = "text/html"
67-
68-
website_redirect {
69-
replace_key_with = "features"
70-
}
71-
}
72-
7365
resource "aws_cloudfront_distribution" "distribution" {
7466
aliases = [local.www_domain, var.domain]
7567
comment = "Cloudfront distribution for ${var.domain}"

0 commit comments

Comments
 (0)