Skip to content

Infrastructure for hosting a server-side rendered site with a domain

Notifications You must be signed in to change notification settings

nsbno/terraform-aws-ssr-site

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SSR Site Hosting

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

Usage

Remember to check out the variables and outputs to see all options.

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"]
}

Examples

See the complete example to see how to use this module

Relevant Repositories

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

About

Infrastructure for hosting a server-side rendered site with a domain

Topics

Resources

Stars

Watchers

Forks

Languages