- Use Terraform Cloud, Github (+Actions), and AWS to quickly create an inexpensive, low-maintenance static website.
- Update your site with a painless release workflow.
Ship an update to your static site in two easy steps:
- push a branch with your content/ changes
- merge your PR
- github.com (free)
- terraform cloud (free)
- aws (free tier eligible)
- clone this repo
rm -rf .git
git init
- github.com
- create a new empty repo
git remote add origin <remote-url>
-
AWS
- out of band, create an AWS user
terraform-cloud
and access key, with attached managed policies:- IAMFullAccess
- AmazonS3FullAccess
- out of band, create an AWS user
-
Terraform Cloud
- create an organization
- create a workspace in the organization
- Add environment variables to your workspace, for the
terraform-cloud
access keys you created above:AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
- update the terraform cloud remote backend details in
main.tf
-
After the first
terraform apply
:- create github repo secrets (settings > secrets), using the values in terraform cloud (view in state):
- created for the
<project-name>_CI
userAWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
bucket_name
- created for the
- create github repo secrets (settings > secrets), using the values in terraform cloud (view in state):