Creates the necessary infrastructure for hosting a Server-Side Rendered (SSR) frontend application on AWS using CloudFront.
This includes the provisioning of an ACM certificate and a CloudFront distribution, as well as Route 53 records
module "ssr" {
source = "github.com/nsbno/terraform-aws-ssr-site?ref=x.y.z"
providers = {
aws.us_east_1 = aws.us_east_1
}
application_name = "infrademo-demo-app"
domain_name = "petstore.infrademo.vydev.io"
alb_domain_name = "lb.infrademo.vydev.io"
route53_hosted_zone_id = module.metadata.dns.hosted_zone_id
s3_website_endpoint = aws_s3_bucket_website_configuration.this.website_endpoint
s3_cache_path_pattern = ["/assets/*", "/favicon.ico"]
}
See the complete example to see how to use this module
You can use these repos together with this repo!
nsbno/terraform-aws-account-metadata
-
Contains metadata about your account, e.g. hosted zone ID to be used with this repo
nsbno/terraform-aws-ecs-service
-
Use this module to deploy an ECS service, for example your SSR server
nsbno/terraform-provider-static-file-deploy
-
Use this provider to deploy and handle static files in S3
nsbno/terraform-aws-multi-domain-static-site
-
Looking to deploy a static website (SPA) like a React app? Use this module