Skip to main content
Kubernetes/EKS only. On a VM, skip this page.
This page is now a detailed reference. For the copy-paste customer path that combines S3 state, DynamoDB locking, GitHub OIDC, IAM policy, and GitHub Actions secrets, use AWS + GitHub Actions.
Setup wizard → Step 6 (Terraform state backend). The wizard recorded your backend choice; this page is where you create the actual S3 bucket + DynamoDB lock table — before the first terraform apply.

Terraform state backend (per stage)

A stage is one AWS account boundary — for example dev and prod are two stages (you named them in the wizard’s Step 5). Each stage gets its own state backend — an S3 bucket and a DynamoDB lock table — because Terraform state isolation matches the AWS account boundary.
Create the backend before merging the first agent-generated PR. The Sariva platform performs zero validation of state-backend access; the first terraform plan from your CI runner is the authoritative gate, so a wrong region or missing IAM grant surfaces as the exact AWS API error.
The wizard’s step 6 asked which mode per stage:
  • byob (bring your own bucket) — default. You create the bucket + lock table — or reuse ones you already have, just put their names in the wizard and skip the creation commands below. The wizard wrote the names into values.yaml::tf_state.
  • agent_created. The Sariva platform opens a bootstrap PR per stage that creates the backend, then migrates to remote state in the same CI job:
    This is separate from growth ops because backend creation needs admin-level AWS permissions the day-to-day CI runner role doesn’t have.
Manual byob creation (once per stage):
Repeat for each stage from the wizard’s step 6.

CI runner network prerequisites

Your CI runner needs outbound HTTPS to these endpoints to run terraform init and apply:
Most failures here surface at the first terraform init as Could not retrieve the list of available versions for provider hashicorp/aws: ... no such host — that’s registry.terraform.io unreachable. Verify access before merging the first agent PR.
Air-gapped / proxied? Use Terraform’s native .terraformrc mirror — no Sariva-side change needed. The emitted Terraform keeps standard provider source addresses; redirection happens at the terraform CLI config layer (provider_installation { network_mirror { url = "https://mirror.corp.example.com/terraform/" } direct { exclude = ["*/*"] } }).