production-platform-Azure

An Azure platform for running a service on AKS with Terraform, Argo CD, CI, observability and incident handling.

View the Project on GitHub Franklindot04/production-platform-Azure

Context

The project plans three environments: dev, staging and prod. They need a boundary for names, state, access, cost, quota and policy. The project has one maintainer, one Entra ID tenant and one planned subscription.

Azure offers two common boundaries: one subscription per environment, or one subscription with one set of resource groups per environment. Separate subscriptions are a stronger boundary. They also need more setup.

Decision

Environments are separated by resource group inside one subscription.

Resource groups:

Persistent layer per environment: Key Vault and the Azure Monitor and Log Analytics workspaces. Each environment has its own. The container registry is not in Azure (ADR 0013).

Terraform layout:

State, extending ADR 0004:

Access:

Cost:

Policy: policy is assigned per environment resource group where the policy tool allows it. A subscription-wide assignment is used only for a rule that applies to every environment. Scans run in CI and no admission policy engine runs in the cluster (ADR 0020).

Creation:

Promotion path:

Teardown: ADR 0009 applies to every environment, including prod if it is created. Keeping prod running between sessions means revisiting ADR 0009.

Assumptions:

Consequences

What gets easier:

Limits of this model:

What gets harder:

Alternatives considered