A production-ready AWS Terraform starter kit featuring secure OIDC authentication, automated CI/CD pipelines, multi-environment support, and comprehensive security scanning. Get your infrastructure up and running in minutes with best practices baked in.
- ⚡ One-Command Bootstrap: Single command automatically sets up your entire infrastructure pipeline
- Creates S3 bucket with native state locking (Terraform 1.10+)
- Generates environment-specific Terraform configurations
- Provisions OIDC provider for secure keyless authentication
- Auto-generates GitHub Actions workflows for CI/CD
- 💬 PR Plan Comments: Terraform plan outputs are automatically posted to your pull requests for easy infrastructure change reviews
- 🛡️ Built-in Security: TFLint and Checkov are integrated in the pipeline to catch issues before you deploy to AWS
- AWS account with admin access
- GitHub account with repository admin access
That's it! All other tools (Terraform, AWS CLI, TFLint, Checkov) can be installed automatically with make install-tools.
Important: For production use, deploy each environment to a separate AWS account:
- Test → AWS Account A (e.g., 111111111111)
- Staging → AWS Account B (e.g., 222222222222)
- Production → AWS Account C (e.g., 333333333333)
Why?
- Security isolation between environments
- Blast radius containment
- Compliance requirements (SOC2, ISO 27001, etc.)
- Cost separation and tracking
- Click the green "Use this template" button to create a new repository based on this starter kit.
make install-tools # Installs Terraform, AWS CLI, TFLint, Checkov, Granted# Option A: AWS CLI
aws configure
# Option B: Granted (for multiple accounts)
assume <profile-name>
# Verify you are connected to AWS in the CLI
aws sts get-caller-identitymake setup
# Or: ./scripts/setup.shWhat happens:
- ✅ Verifies prerequisites e.g. dev tools
- ✅ Creates S3 backend with native state locking (no DynamoDB needed)
- ✅ Provisions environment (test/staging/production)
- ✅ Deploys OIDC provider + IAM role so you can deploy securely via GitHub
- ✅ Generates GitHub workflow files
Multi-Account Setup:
# Test account
assume test-account
make setup # Select: test
# Staging account
assume staging-account
make setup # Select: staging
# Production account
assume prod-account
make setup # Select: productionAll values are embedded as defaults - only set if you want to override:
AWS_ACCOUNT_ID(already hardcoded)AWS_REGIONTF_STATE_BUCKET
- Go to Settings → Environments → production
- Add required reviewers
- Set deployment branches to
mainonly
git checkout -b test-deployment
# Make a small change to environments/test/main.tf
git add . && git commit -m "test: verify pipeline"
git push origin test-deployment✅ GitHub Actions runs automatically ✅ TFLint + Checkov scan ✅ Terraform plan posted to PR ✅ Merge to deploy
For detailed information including project structure, common commands, troubleshooting, and best practices, visit the → official documentation.
