Three environments are provided: dev, staging, and prod. Each has its own variable file and state, so they are fully isolated within an account (and can target different accounts by authenticating to each).
infra/environments/
├── dev/ { terraform.tfvars, backend.hcl }
├── staging/ { terraform.tfvars, backend.hcl }
└── prod/ { terraform.tfvars, backend.hcl }
terraform.tfvars— the input values for that environment (committed; no secrets or account-specific values).backend.hcl— the S3 state bucket + a per-environment state key. Thebucketships as a placeholder (REPLACE_ME_TF_STATE_BUCKET) and is filled in bymake bootstrapbefore the firstinit(see state backend).
Two optional, gitignored override files may also appear in an environment directory.
Terraform auto-loads any *.auto.tfvars, so they merge in on a normal apply without being
named on the command line, and they never get committed (*.auto.tfvars is in
.gitignore):
agent.auto.tfvars— the deployed AgentCore runtime ARN, written bymake deploy-agent(see AgentCore runtime).federated.auto.tfvars— the realfederated_loginobject (account-specificclient_id/client_secret_arn) when SSO is enabled (see federated login).
Select an environment with source scripts/load-env.sh <env> (which sets $TF_BACKEND
and $TF_VARS), then run terraform directly from infra/. Re-running
terraform init $TF_BACKEND points the backend at that environment's backend.hcl. The
make helper targets read ENVIRONMENT from .env (or ENV=<env> on the command line).
| Setting | dev | staging | prod |
|---|---|---|---|
vpc_nat_gateways |
1 | 1 | 2 (AZ-level HA) |
log_retention_days |
30 | 30 | 90 |
enable_quorum |
true | true | true |
federated_login.enabled |
false | false | false (fill in real IdP to enable) |
| state key | tessera/dev/… |
tessera/staging/… |
tessera/prod/… |
Resource names are tessera-<env>-*, so all three can coexist in one account without
collision.
- Merge to your default branch and let
devapply automatically (CI), or locally run the deploy steps withsource scripts/load-env.sh dev. - Validate in
dev. - Trigger the manual apply gate for
staging, thenprod(CI), or locally run the deploy steps withsource scripts/load-env.sh staging/prod.
Edit that environment's terraform.tfvars — for example, set real
admin_notify_emails, tune models, or raise vpc_nat_gateways. To enable
federated_login with your IdP's client_id + client_secret_arn, put the object in the
gitignored federated.auto.tfvars instead (keeps account-specific values out of git) — see
federated login.