Skip to main content

Terraform roots

Atlas keeps reusable infrastructure logic in shared modules and instantiates that logic from two environment roots.

Root inventory

Root filePurpose
backend.tfS3 backend and DynamoDB locking configuration
providers.tfAWS provider configuration
versions.tfTerraform and provider version constraints
data.tfenvironment-level data sources such as availability zones
locals.tfname prefixes, common tags, and secret templates
variables.tfroot inputs and validation
main.tfmodule wiring and any root-level listener rules
monitoring.tfSNS topic, alarms, and budget notifications
outputs.tfoperator-facing outputs and integration values

What both roots instantiate

  • events_ecr
  • dashboard_ecr
  • vpc
  • events_secret
  • dashboard_secret
  • msk
  • optional sink buckets and msk_s3_sink
  • alb
  • events_service
  • dashboard_backend
  • dashboard_db
  • kafka_ui

Why the roots exist separately

  • separate state files and lock scopes
  • separate backend resources and keys
  • the same module graph with environment-specific values
  • a clear migration path from the current staging deployment to a harder production posture

Read order for operators

  1. Confirm the correct state backend, hostnames, ACM certificate, and access settings for the target root.
  2. Read main.tf to verify which modules and listener rules are active in the root.
  3. Inspect outputs.tf after apply to locate hostnames, repository URLs, secret names, and database connection details.