This repository contains the infrastructure code for deploying and managing truittjanney.com using Terraform on AWS.
Watch the full project walkthrough: https://youtu.be/VfKgAgI_g6I
This project provisions a fully serverless, production-ready static website architecture using:
- Amazon S3 (static site hosting)
- Amazon CloudFront (CDN)
- Route 53 (DNS management)
- AWS Certificate Manager (TLS/SSL)
- IAM (GitHub Actions deployment role via OIDC)
Terraform remote state is stored in Amazon S3 with state locking enabled via S3 lockfiles.
The infrastructure supports two environments:
-
Production
truittjanney.comwww.truittjanney.com
-
Development
dev.truittjanney.com
Each environment has its own:
- S3 bucket
- CloudFront distribution
- DNS record
- Local development uses AWS SSO (IAM Identity Center)
- CI/CD uses OIDC with GitHub Actions
- No long-lived AWS access keys are stored or used
truittjanney-website-prodtruittjanney-website-dev
Used to store static website assets.
- S3 bucket:
truittjanney-terraform-state - Versioning enabled
- Server-side encryption enabled (AES256)
- Protected with
prevent_destroylifecycle rule
Used to store Terraform state securely and reliably.
- One per environment
- Configured with Origin Access Control (OAC)
- HTTPS enforced
- Alias A records pointing to CloudFront distributions
- DNS validation for TLS/SSL certificates
-
TLS certificate for:
truittjanney.comwww.truittjanney.com
-
Allows:
- S3 uploads
- CloudFront cache invalidation
- Uses OIDC (no static credentials)
terraform init
terraform plan
terraform apply- Automatically deploys on push
- Uses OIDC to assume AWS role securely
The following images show the deployed infrastructure and monitoring setup in AWS.
infrastructure/
- acm.tf
- backend.tf
- cloudfront_dev.tf
- cloudfront_prod.tf
- cloudwatch.tf
- iam.tf
- providers.tf
- route53.tf
- s3.tf
- sns.tf
- state.tf
.tfstatefiles are not committed (managed remotely in S3)- Remote Terraform state is stored in S3 bucket
truittjanney-terraform-state - State locking is handled using S3 lockfiles (
use_lockfile = true) .terraform.lock.hclis committed for provider version consistency
Truitt Janney


