Terraform
HungryHub manages all AWS infrastructure as code using Terraform in the hungryhub-terraform repository.
For the full architecture, module map, secrets management, and operations guide see: hungryhub-terraform — Architecture and Operations
Quick reference
Run a plan or apply (CI — recommended)
GitHub → hungryhub-terraform → Actions → "Terraform Plan/Apply" → Run workflow
module: e.g. hungryhub-apps
environment: dev | prod
action: plan | apply
Run locally (emergency / one-off)
aws sts get-caller-identity --profile prod # confirm correct account
./build.sh plan prod hungryhub-apps # plan only
./build.sh apply prod hungryhub-apps # apply
Add a new environment variable to hh-server
- Declare it in
hungryhub-apps/variable.tf. - Add the value to AWS Secrets Manager:
aws secretsmanager get-secret-value \ --secret-id terraform/tfvars/prod/<suffix> \ --profile prod --region ap-southeast-1 \ --query SecretString --output text | \ python3 -c "import json,sys; d=json.load(sys.stdin); d['MY_VAR']='value'; print(json.dumps(d))" | \ aws secretsmanager put-secret-value \ --secret-id terraform/tfvars/prod/<suffix> \ --profile prod --region ap-southeast-1 \ --secret-string file:///dev/stdin - Reference it in
hungryhub-apps/configmap.tf. - Open a PR — CI will plan automatically; apply after merge.