aws_react_frontend

Creates a bunch of resources like an s3 bucket and cloudfront distribution to host a SPA react app. It also sets up CF to forward API requests to the backend server and sets up the associated domain name and certificates.

Terraform Module Source

module "aws_react_frontend" {
  source = "https://tfmodules.matillion-cto.matillion.com/aws_react_frontend.tar.gz"
  ...
}

Resources

NameType
aws_cloudfront_distribution.cloudfrontresource
aws_cloudfront_origin_access_identity.web_distributionresource
aws_s3_bucket.s3_bucketresource
aws_s3_bucket_policy.s3_bucket_policyresource
aws_cloudfront_cache_policy.api_policydata source
aws_cloudfront_origin_request_policy.api_policydata source
aws_iam_policy_document.s3_bucket_policydata source

Inputs

NameDescriptionTypeDefaultRequired
backendUrlNameThe first part of the URL of the backend.stringn/ayes
serviceNameThe name of the servicestringn/ayes
serviceUrlNameThe first part of the URL, this gets combined with zone to be serviceUrlName.zonestringn/ayes
includeWildcardWhether to include a wildcard record for the serviceboolfalseno
zoneThe name of the Route53 zone to usestring"matillion-cto.matillion.com"no

Outputs

NameDescription
output_valuesn/a
s3_idn/a