Quick Start¶
Get up and running with this Terraform template in minutes.
Prerequisites¶
- Terraform >= 1.0 (recommended: 1.10.5 via
.terraform-version) - Docker (for dev container setup)
- pre-commit
- TFLint
- Checkov
- AWS credentials configured
Using the Template¶
1. Create a new repository¶
Click Use this template on GitHub to create a new repository from this template.
2. Clone and enter the repository¶
3. Set up pre-commit hooks¶
4. Initialize TFLint¶
5. Initialize Terraform¶
6. Verify the setup¶
# Format check
terraform fmt -check -recursive
# Validate configuration
terraform validate
# Run linter
tflint --config=.tflint.hcl
# Run security scan
checkov --config-file .checkov.yml
# Run all pre-commit hooks
pre-commit run --all-files
Dev Container Setup¶
For a consistent development environment, use the included dev container:
- Install the Dev Containers VSCode extension
- Open the repository in VSCode
- Click Reopen in Container when prompted
- All tools are pre-installed and ready to use
First Deployment¶
1. Configure AWS credentials¶
Set up GitHub secrets for CI/CD:
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_REGION
2. Customize environment variables¶
Edit the environment-specific tfvars files:
environments/dev/dev.tfvars # Development settings
environments/qa/qa.tfvars # QA/staging settings
environments/prod/prod.tfvars # Production settings
3. Plan and apply¶
# Plan for dev environment
terraform plan -var-file=environments/dev/dev.tfvars
# Apply when satisfied
terraform apply -var-file=environments/dev/dev.tfvars
Next Steps¶
- Read the Usage Guide for the full command reference
- Review the Repository Structure to understand the layout
- Check Security for scanning configuration
- Set up CI/CD Workflows for automated deployments