-
Notifications
You must be signed in to change notification settings - Fork 2
Terraform Deployment
loki-bedlam edited this page Mar 20, 2026
·
1 revision
Deploy Loki using Terraform.
- Terraform >= 1.0
- AWS credentials configured (
aws configureor environment variables)
terraform init
terraform plan -var="environment_name=my-openclaw"
terraform apply -var="environment_name=my-openclaw"Override defaults with -var flags or a terraform.tfvars file:
# terraform.tfvars
environment_name = "my-openclaw"
instance_type = "t4g.xlarge"
model_mode = "bedrock"
bedrock_region = "us-east-1"- Lambda custom resources are deployed as
aws_lambda_functionand invoked vianull_resource+local-exec(no CloudFormation custom resource wrapper) - EC2 UserData is templated via
userdata.sh.tplusing Terraform'stemplatefile()function - The
cfn-signalin the bootstrap script is a no-op (harmless) — Terraform doesn't use CloudFormation signals - Data volume is a separate
aws_ebs_volume+aws_volume_attachment
| File | Description |
|---|---|
main.tf |
All resources |
variables.tf |
Input variables with defaults |
outputs.tf |
Stack outputs |
providers.tf |
AWS provider configuration |
userdata.sh.tpl |
EC2 UserData template |
terraform destroy -var="environment_name=my-openclaw"-
terraform applytakes ~8–10 minutes (EC2 bootstrap runs in the background) - Terraform won't wait for the bootstrap to finish — the instance will be "running" before Loki setup completes
- Check progress:
aws ssm get-parameter --name /openclaw/setup-status --query Parameter.Value --output text