Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add new domain for staging and prod #124

Merged
merged 11 commits into from
Aug 30, 2023
38 changes: 29 additions & 9 deletions terraform/live/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@ locals {
prod_domain_name_alternative = "snaps.consensys.io"

# snaps
snaps_hosted_zone_name = "snaps.consensys.net"
snaps_hosted_zone_name_new = "snaps.consensys.io"
snaps_hosted_zone_id = aws_route53_zone.snaps.zone_id
dev_snaps_domain_name = "dev.${local.snaps_hosted_zone_name}"
dev_snaps_domain_name_new = "dev.${local.snaps_hosted_zone_name_new}"
dev_snaps_cert_new = "arn:aws:acm:us-east-1:905502874957:certificate/9a317fa9-baef-47b8-8814-f387ae646afc"
staging_snaps_domain_name = "staging.${local.snaps_hosted_zone_name}"
prod_snaps_domain_name = local.snaps_hosted_zone_name
snaps_hosted_zone_name = "snaps.consensys.net"
snaps_hosted_zone_name_new = "snaps.consensys.io"
snaps_hosted_zone_id = aws_route53_zone.snaps.zone_id
dev_snaps_domain_name = "dev.${local.snaps_hosted_zone_name}"
dev_snaps_domain_name_new = "dev.${local.snaps_hosted_zone_name_new}"
snaps_cert_new = "arn:aws:acm:us-east-1:905502874957:certificate/9a317fa9-baef-47b8-8814-f387ae646afc"
staging_snaps_domain_name = "staging.${local.snaps_hosted_zone_name}"
staging_snaps_domain_name_new = "staging.${local.snaps_hosted_zone_name_new}"
prod_snaps_domain_name = local.snaps_hosted_zone_name
prod_snaps_domain_name_new = local.snaps_hosted_zone_name_new

#cloudfront functions
cloudfront_functions = {
Expand Down Expand Up @@ -136,7 +138,7 @@ module "s3_snaps_page_dev_new" {

bucket_name = local.dev_snaps_domain_name_new
domain_name = local.dev_snaps_domain_name_new
certificate_arn = local.dev_snaps_cert_new
certificate_arn = local.snaps_cert_new
cloudfront_functions = local.cloudfront_functions
tags = module.tags.common
}
Expand Down Expand Up @@ -172,7 +174,15 @@ module "s3_snaps_page_staging" {
tags = module.tags.common
}

module "s3_snaps_page_staging_new" {
source = "../modules/aws-s3-website-no-r53"

bucket_name = local.staging_snaps_domain_name_new
domain_name = local.staging_snaps_domain_name_new
certificate_arn = local.snaps_cert_new
cloudfront_functions = local.cloudfront_functions
tags = module.tags.common
}
#############
## Prod
#############
Expand Down Expand Up @@ -203,3 +213,13 @@ module "s3_snaps_page_prod" {
cloudfront_functions = local.cloudfront_functions
tags = module.tags.common
}

module "s3_snaps_page_prod_new" {
source = "../modules/aws-s3-website-no-r53"

bucket_name = local.prod_snaps_domain_name_new
domain_name = local.prod_snaps_domain_name_new
certificate_arn = local.snaps_cert_new
cloudfront_functions = local.cloudfront_functions
tags = module.tags.common
}