Terraform (AWS)
Terraform scaffolding for AWS with S3 backend, per-environment configs, and common tagging.
What create-faster adds
A complete infra/ directory with AWS provider configuration, S3 remote state backend, and per-environment variable files. No npm dependencies are added -- Terraform is installed separately.
Files created:
infra/
├── providers.tf # AWS provider ~> 6.0, required_version >= 1.10, common tags
├── backend.tf # S3 backend declaration
├── variables.tf # region, project_name, env (dev/staging/prod validation)
├── variables.auto.tfvars # Defaults pre-filled with project name
├── secrets.auto.tfvars # Placeholder for sensitive values (gitignored)
├── outputs.tf # Empty placeholder for resource outputs
├── main.tf # Empty placeholder for your resources
└── backend/
├── dev.hcl # Dev environment S3 backend config
└── prod.hcl # Prod environment S3 backend configproviders.tf
Configures the AWS provider with:
- AWS provider
~> 6.0 - Terraform
>= 1.10.0(required for native state locking) local.resource_namecomputed as{project_name}-{env}local.common_tagsapplied to all resources viadefault_tags(Project, Env, ManagedBy)
backend.tf
Declares an empty S3 backend. Configuration is injected at init time via -backend-config:
terraform init -backend-config=backend/dev.hclvariables.tf
Three variables:
region-- AWS regionproject_name-- used in resource naming and tagsenv-- validated todev,staging, orprod
variables.auto.tfvars
Pre-filled with the project name, default region eu-west-3, and env = "dev".
secrets.auto.tfvars
Empty placeholder for sensitive values. Gitignored so secrets never reach the repository.
backend/ configs
Per-environment S3 backend configs with use_lockfile = true (Terraform >= 1.10 native file locking, no DynamoDB table needed). Fill in <BUCKET_NAME> and <AWS_PROFILE_*> placeholders before first use.
main.tf
Empty file where you add your infrastructure resources.
.gitignore
.terraform/, *.tfstate*, and secrets.auto.tfvars are added to .gitignore.
CLI usage
bunx create-faster myproject \
--app myproject:nextjs \
--deployment terraform-aws \
--pm bunInitialize and plan:
cd infra
terraform init -backend-config=backend/dev.hcl
terraform plan
