Automated
An Automated system needs no human effort for repetitive operations: provisioning, deployment, validation, secret distribution, remediation. In every edition of the Baseline and its blueprints the pipeline, not a laptop, is the only writer to shared environments. If deployment requires a hero, it is not automated.
The infrastructure pipeline
Every Baseline repository ships the same three infrastructure workflows:
| Workflow | Trigger | What it does |
|---|---|---|
plan.yml | Pull request touching anything a plan depends on | Runs the guardrails, then plans every unit and posts the result. A new push cancels the plan still running for the old head |
apply.yml | Merge to main | Applies every unit in dependency order under the prod GitHub Environment. Applies queue per ref and are never cancelled, so two merges cannot apply against the same state at once |
drift-detection.yml | 01:00 UTC, the critical folders Tuesday to Friday, every folder Monday (Azure: Monday by default) | Plans with -detailed-exitcode and -lock=false per folder; exit code 2 opens or updates an issue labeled drift with the plan output |
| Aspect | AWS Enterprise Baseline | Azure Enterprise Baseline | GCP Enterprise Baseline |
|---|---|---|---|
| Workflows | plan.yml, apply.yml, drift-detection.yml | The three, plus runner-image.yml | The three, plus runner-image.yml and notifier-image.yml |
| Baseline pipeline identity | GitHub OIDC: apply uses acme-aws-platform-baseline-deployer, which accepts only environment:prod; plan and drift use the read-only acme-aws-platform-baseline-reader, which reaches only acme-terraform-reader in each account | Federated managed identity id-acme-azure-platform-baseline-deployer, whose only subject is environment:prod, so plan, apply and drift all run in the prod Environment; no client secret | Workload Identity Federation: plan and apply run in the prod Environment as sa-acme-baseline-ci, then each project's deployer; drift runs as the read-only sa-acme-baseline-drift |
| Blueprint pipeline identities | One role per repository and stage, such as acme-aws-blueprint-webapp-infra-dev-deployer, which accepts only that stage's Environment and reaches only that stage's account; a build role per code repository | One managed identity per repository and stage, such as id-acme-azure-blueprint-webapp-infra-dev-deployer, accepting only that stage's Environment; a build identity per code repository | One service account per repository and stage, such as sa-acme-webapp-infra-dev-ci, bound to that stage's Environment; a build account per code repository |
| Drift, Tuesday to Friday | Network, identity and the three active workload accounts | Off by default; an @optional schedule covers core-network, core-identity, core-security, plat-dev, plat-staging, plat-prod | core-network, core-identity, plat-dev, plat-staging, plat-prod |
| Blueprint repositories | plan.yml and apply.yml | plan.yml, apply.yml, and drift detection in each stage's Environment: dev and staging daily at 05:00 UTC, prod on Mondays behind its reviewers | plan.yml, apply.yml, and drift detection in each stage's Environment: dev and staging daily at 05:00 UTC, prod on manual runs behind its reviewers |
| Cost estimate | Infracost comment when INFRACOST_API_KEY is set | Infracost comment when INFRACOST_API_KEY is set | None |
Plan and apply write a JSON run report that CI uploads as an artifact. The GitHub Actions explainer of each edition describes the federation step every workflow starts with.
Guardrails that run before a plan
The same checks run locally in pre-commit and again in CI, so a contributor without hooks is still caught. Five guard scripts have the same name in every edition; the address-plan guard is named after the edition's map:
| Check | Protects against |
|---|---|
check-stack-layout.py | A region folder without a stack file, a hand-written unit under environments/, an unreferenced unit definition |
check-no-hardcoded-cidrs.py | A private IP range typed anywhere but the address plan |
check-vpc-maps.py, check-vnet-maps.py, check-network-maps.py | Invalid, overlapping or mis-nested ranges, or a unit whose address lookup has no map entry (AWS, Azure, GCP) |
check-mock-outputs.py | A dependency that cannot be planned because its outputs are not mocked |
check-required-inputs.py | A unit that does not supply every required input of its module |
check-module-versions.py | A module whose provider pins differ from root.hcl |
tofu fmt, tflint, Checkov, Trivy | Malformed, non-idiomatic or insecure configuration |
In CI, the AWS edition runs all four scanners, the Azure edition runs Checkov as the gate and Trivy as a report, and the GCP edition runs tflint and Checkov, with Trivy in pre-commit. The policy as code page explains why conventions checked by machine stay true.
Application delivery
Every edition's Web App Blueprint builds each image once and never rebuilds it for a later stage:
ci.ymlon a pull request: lint, tests, Docker build, Trivy scan that fails on fixable HIGH and CRITICAL vulnerabilities.cd-integration.ymlon merge tomain: build, pushmain-<short sha>to the edition's registry (ECR incore-artifacts, Azure Container Registry inacme-core-artifactswith the tag locked, Artifact Registry inacme-core-artifactswith immutable tags), open a pull request againstenvs/devin the GitOps repository, auto-merged; ArgoCD auto-syncs dev.cd-release.ymlon a GitHub Release: add thevX.Y.Ztag to the same image, open a pull request againstenvs/stg, auto-merged; ArgoCD auto-syncs staging.promote-prod.ymlon demand with a release tag: verify the tag exists in the registry, open theenvs/prdpull request behind theprodEnvironment; a person merges it and ArgoCD prod is synced manually.
No workflow pushes to the GitOps repository directly; each mints a short-lived token for the acme-runner GitHub App and opens a pull request. The Data and ETL Blueprint follows the same build-once rule and records the deployed trigger image tag where the infrastructure reads it back: an SSM parameter on AWS, the stage contract vault on Azure, Parameter Manager on GCP. The GitOps and immutable artifacts pages cover each part.
How each edition delivers it
Beyond the pipelines, each edition automates secrets, certificates, the single-page app and its runners with its own services.
AWS Enterprise Baseline
- Front end:
cd-frontend.ymlbuilds the React application, syncs it to S3 and invalidates CloudFront. - Secrets: a merge to the secrets repository runs one job per stage under its GitHub Environment; that stage's
acme-secrets-syncer-<stage>role decrypts the SOPS file with the stage's KMS key and writes SSM Parameter Store SecureStrings in the target account; the External Secrets Operator refreshes Kubernetes secrets hourly. - DNS and certificates: ExternalDNS writes public and internal records; ACM certificates are validated through DNS and renewed by AWS.
- Remediation: EventBridge rules remove public access from an S3 bucket reported public and route high-severity findings to SNS.
- Runners: optional self-hosted runners start per job on Spot instances and terminate when the job ends.
Azure Enterprise Baseline
- Front end:
cd-frontend.ymlbuilds the single-page app for dev, and the release workflow for staging and prod; the upload copies it to the stage storage account's static website with Entra authentication and purges the Front Door endpoint. - Secrets: a push to the secrets repository syncs each changed stage in its own GitHub Environment: that stage's syncer identity,
id-acme-secrets-<stage>-syncer, decrypts with the stage's Key Vault key and writes the application vaultkv-acme-eus2-<stage>-app, from the self-hosted runners because the vaults are private. External Secrets delivers the values to the pods. - DNS and certificates: Front Door issues managed certificates for the public hosts; cert-manager obtains the origin certificate by DNS-01 against the stage zone and runs an internal CA for
*.<stage>.internal.company.com; the application routing add-on writes internal records. - Remediation: the edition prevents rather than remediates. Deny, DenyAction and Modify policies at
mg-acmestop or correct a change at request time. - Runners: a Container Apps job in
acme-core-autostarts one ephemeral runner per queued job and reaches the private endpoints; workflows use it onceRUNNER_LABELSis set.
GCP Enterprise Baseline
- Front end:
scripts/deploy-frontend.shdeploys the single-page app as a new Cloud Run revision, records the tag in Parameter Manager and invalidates the Cloud CDN cache. - Secrets: a push to the secrets repository syncs each changed stage in its own GitHub Environment: that stage's syncer, such as
sa-acme-secrets-syncer-dev, reached through Workload Identity Federation, decrypts with the stage's Cloud KMS key and writes Secret Manager in the stage project. External Secrets maps the values into the pods. - DNS and certificates: Certificate Manager issues Google-managed certificates with DNS authorizations; external-dns writes public and internal records; cert-manager runs an internal CA for internal hosts.
- Remediation: the optional Security Command Center notifier (
enable_scc_notifier) removes public bindings from a bucket with aPUBLIC_BUCKET_ACLfinding outsideacme-core-public. - Runners: GitHub-hosted runners by default; optional Actions Runner Controller runners on GKE Autopilot in
acme-core-auto.
Review is part of the automation
CODEOWNERS routes reviews by blast radius in every edition: environments/core/, units/, .github/, root.hcl, common.hcl, the address plan and scripts/ to the infra admins; stacks/ and modules/ to the infra admins and platform leads; security.hcl to the infra admins and the security team; environments/plat/prod/ to platform leads and the security team. On Azure and GCP the security team also owns policies/ (the WAF and Cloud Armor templates); on GCP also src/ (the notifier); on Azure the platform leads co-own network.hcl and the DevOps leads co-own runner-image/. The prod GitHub Environment holds required reviewers everywhere. A change reaches the cloud only through pull request, plan, review, merge and apply.
How you verify it
AWS Enterprise Baseline
- ECR in the
artifactsaccount: repositories with tag immutability on and nolatesttag.
Azure Enterprise Baseline
az acr repository show-tags --name cracmeeus2artifacts --repository acme-azure-blueprint-webapp --detail: every tag with write and delete disabled.
GCP Enterprise Baseline
gcloud artifacts repositories describe acme-gcp-blueprint-webapp --location us-west1 --project acme-core-artifacts: immutable tags on.
In every edition, the Actions tab of the Baseline repository shows a plan run on every pull request, an apply run on every merge and drift runs on the schedule above; the GitOps repository shows envs/<stage>/values.yaml changed only by pull requests from the acme-runner App; and each repository's settings show the Environments dev, staging and prod, with required reviewers on prod.