Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Terraform boilerplate for an AWS/S3 bucket-hosted website with CloudFront for caching and CloudFlare for DNS.

Notifications You must be signed in to change notification settings

BausCode/AWS-S3-Website-Boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AWS/S3 Website Boilerplate

This is a boilerplate Terraform setup for creating infrastructure for hosting a site on S3, with a CloudFront CDN in front of it, and DNS records managed by CloudFlare.

Requirements

  • Terraform CLI - Version 0.14 or higher
  • AWS account
  • CloudFlare account

Use

Set required environment variables:

export TF_VAR_aws_access_key_id=$YOUR_AWS_ACCESS_KEY_ID
export TF_VAR_aws_secret_access_key=$YOUR_AWS_SECRET_ACCESS_KEY
export TF_VAR_cloudflare_api_key=$YOUR_CLOUDFLARE_API_KEY

Set remaining required variables in terraform.tfvars.

Run terraform plan to verify correct configuration.

Run terraform apply to execute.

About

Terraform boilerplate for an AWS/S3 bucket-hosted website with CloudFront for caching and CloudFlare for DNS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages