s3-cloudflare-static-website

cjoy/s3-cloudflare-static-website/aws

Terraform Module HCL AWS

๐Ÿš€ Provision a static web hosting environment, using S3 (storing website file), CloudFront (CDN) & CloudFlare (DNS Management).

Install
module "s3-cloudflare-static-website" {
source = "cjoy/s3-cloudflare-static-website/aws"
version = "0.1.5"
}
plain text: /constructs/tfmod-cjoy-s3-cloudflare-static-website-aws/install.txt
โญ Source on GitHub ๐Ÿ“ฆ Registry page
README

Static Website (S3, CloudFront & Cloudflare) This terraform module provisions the appropriate AWS & CloudFlare resources allowing you to deploy a static website using S3 (static file storage), CloudFront (CDN) & CloudFlare (DNS Management). This module should be used inconjuction with your prefered continuous integration service (CircleCI, Github Actions etc). You can use this module to provision the required resources and should rely on your CI process to build and sync to S3. What it does Step 1: Create a S3 bucket used to store static website files. Step 2: Provision an ACM certificate to verify you domain. Step 3: Provision ACM validation record via cloudflare. This is so that ACM can validate you own the domain you specified. Step 4: Test ACM Validation after adding DNS validation rec

Inputs (6)
NameTypeDescriptionDefault
cloudflare_zone_idstringThe DNS zone ID in which add the record. You can get this from the domain view i required
bucket_namestringThis corresponds to a unique bucket name in which you want to store your site co required
domain_namestringThis is the domain name you want to use to point your website. (eg. example.com, required
tagsmap(string)Tags you would like to apply across AWS resources.{}
index_documentstringThis corresponds to the default index document. (Defaults to index.html)"index.html"
error_documentstringThis corresponds to the default error document. (Defaults to error.html)"error.html"
Outputs (3)
aws_cloudfront โ€” Attributes from aws_cloudfront_distribution (https://www.terraform.io/docs/providers/aws/r/cloudfron
aws_s3 โ€” Attributes from aws_s3_bucket (https://www.terraform.io/docs/providers/aws/r/s3_bucket.html)
aws_acm โ€” Attributes from aws_acm_certificate (https://www.terraform.io/docs/providers/aws/r/acm_certificate.h
Resources (5)
aws_acm_certificateaws_acm_certificate_validationaws_cloudfront_distributionaws_s3_bucketcloudflare_record
Details
FrameworkTerraform Module
LanguageHCL
Version0.1.5
Cloud AWS
โ˜… Stars4
Forks3
Total downloads6.6k
Inputs6
Outputs3
Resources5
Namespacecjoy
Updated