Design

Generated files

What the generated bundle contains, Terraform per domain, Kubernetes or Compose, GitHub Actions, architecture docs, ADRs, migration plan and costs, and how Brunel validates every shape of it.

The bundle

Files are generated from deterministic templates for the chosen tier and provider, never written by the AI.

Bundle layout
README.md
ARCHITECTURE.md        # narrative, Mermaid diagram, components and why
COSTS.md               # cost per component, per environment, assumptions
MIGRATION.md           # ordered, reversible steps (when a current setup was found)
docs/adr/NNNN-*.md     # one decision record per significant decision
terraform/
  versions.tf  providers.tf  backend.tf  variables.tf  outputs.tf
  network.tf  compute.tf  data.tf  security.tf  observability.tf  cicd.tf
  README.md
docker-compose.yml     # Starter tier and local development
k8s/                   # Deployment, Service, HPA, Ingress, PodDisruptionBudget (Scale and Enterprise)
.github/workflows/deploy.yml

Every generated resource carries a comment # brunel: <component-id> — <why> so the code stays traceable to the design.

Terraform

  • Split by domain, with variables and outputs, and a commented remote state stub in backend.tf.
  • Database passwords are never written: AWS RDS manages them itself; otherwise a random password goes to the secrets manager or a sensitive output.
  • Text that comes from your repository (paths, names) is escaped before it reaches HCL, YAML or shell.

Deployment workflow

.github/workflows/deploy.yml tests, builds one image per service, pushes it to the registry component, then rolls out to the chosen compute (ECS, EKS, Lambda, EC2 through SSM, a static site, or Scaleway serverless containers). On AWS it authenticates with GitHub OIDC: a deploy role, no access keys.

Validation in Brunel's CI

Brunel renders every combination of its test repositories, contexts, tiers and providers, plus two "kitchen sink" designs that use every template, and runs on all of them:

ToolChecks
terraform validateTerraform syntax, providers and references
kubeconformKubernetes manifests against their schemas
actionlintGitHub Actions workflows
docker compose configCompose files

Browse or export

All plans can browse the files in the app. Pro and above export the bundle as a ZIP. Through the API, GET /v1/projects/{id}/files lists the files of a tier and returns a file's content with path. See the endpoint reference.

Generated files · Brunel Docs