deploy/terraform/ that creates exactly the same AWS resources as the CloudFormation template — same VPC, IAM, EC2, and security services. Use it if your team already runs Terraform or if you want the plan → inspect → apply workflow before any resources are created.
Module layout
Using the installer (recommended)
The fastest path is to let the installer run Terraform for you. Pass--method terraform:
- Checks for Terraform >= 1.10 (installs it automatically if missing — no root required)
- Creates an S3 backend bucket with versioning and KMS encryption
- Writes a
backend.tfpointing at that bucket - Runs
terraform init→validate→apply -auto-approve
Running Terraform directly
Clone the repo and run Terraform yourself for the full plan-then-apply workflow:profile_name and environment_name are required — they have no defaults.
Key variables
variables.tf is the authoritative source — check there for validation rules and any variables added after this page was written.
Sensitive variables and state security
litellm_api_key and provider_api_key are marked sensitive = true in Terraform, so they won’t appear in plan or apply output. They do appear in Terraform state in plaintext.
The kiro_from_secret variable only stores a Secrets Manager reference, not the raw key. The instance resolves the actual key at install time via its IAM role. This is the recommended pattern for secrets — see Managing secrets with AWS Secrets Manager.
State management
When you use the installer, it creates an S3 backend bucket automatically:- Bucket name:
<environment-name>-tfstate-<account-id> - State key:
loki-agent/terraform.tfstate - Encryption: KMS server-side encryption, public access blocked
- Locking: native S3 locking (Terraform >= 1.10)
loki:tf-state-bucket and loki:tf-state-key so the uninstaller can find and clean up state.
If you deploy manually, set up your own backend in backend.tf before running terraform init.
Terraform outputs
After apply, retrieve outputs with:Watching bootstrap progress
The bootstrap script publishes progress to SSM Parameter Store regardless of which IaC tool you used:COMPLETE, connect via SSM:
Tear-down
Remove every resource Lowkey created:If you passed an existing VPC via
existing_vpc_id, that VPC is kept — Terraform only destroys resources it created.