← All articles

Dev, Test, UAT, PreProd, Prod: a practical guide to enterprise environments, on-premises and in Azure UK

15 min read

  • Architecture
  • Azure
  • DevOps
  • Infrastructure
  • Environments

Most enterprises end up with five environments: Dev, Test, UAT, PreProd and Prod. The names are easy. Getting real value from them is harder: environments drift apart, test data gets copied from production without being masked, a hotfix goes straight to Prod “just this once”, and PreProd turns out to be nothing like the real thing on the night it matters.

This guide covers what each environment is for, the principles that keep them honest, and a rough reference infrastructure for a hybrid estate: internal web and app servers on-premises, plus Azure UK South and UK West.

What each environment is for

Dev Test UAT PreProd Prod
Purpose Integrate and try changes System and integration testing Business acceptance Final rehearsal, prod-like Customers
Used by Developers QA / testers Business users, product owners Release, ops, performance testing Everyone
Deploys Every merge, automatically Automatically or on demand Release candidates The exact release going to Prod Approved releases only
Data Synthetic Synthetic Masked, realistic Masked, prod-scale Real
Stability Can break Mostly stable Stable during a test cycle Stable Highly available
Scale Minimal Minimal Small Same topology as Prod Full, resilient
Change control None Light Agreed test windows Same as Prod CAB / approvals

The two environments people most often get wrong are the last two before Prod:

  • UAT is about the business saying yes. It needs realistic data and stability for the length of a test cycle. It doesn’t need production scale.
  • PreProd is about operations saying yes. It should look like Prod in every way that affects a release: the same topology, networking, firewall rules, identity, deployment process and configuration shape, at a scale that’s representative. If a release can behave differently in Prod than it did in PreProd, PreProd isn’t doing its job.

Principles that keep environments trustworthy

1. Build once, deploy many

Build an artifact once, from a commit on the main branch, and promote that same artifact through every environment. Never rebuild for Prod: a rebuild can pick up a different dependency, compiler or base image, and then what you tested isn’t what you’re shipping.

CI build main branch One artifact orders-api 1.4.2 Config per environment app settings · Key Vault promoted unchanged Dev Test UAT PreProd Prod every mergesynthetic data QA sign-offsynthetic data business sign-offmasked data ops rehearsalprod-like approvals + CABreal data
The artifact never changes; only configuration does. Each step to the right needs more confidence and more approval, but the thing being deployed is identical.

2. Configuration lives outside the build

Everything that differs between environments, such as connection strings, URLs, feature flags and scale settings, comes from configuration: app settings, environment variables, Azure App Configuration and Key Vault for secrets. The code never contains if (environment == "Prod"). Keep the shape of configuration identical everywhere and only the values different, so a missing setting fails in Dev rather than in Prod.

3. Everything is code, including the infrastructure

Define servers, networks, firewall rules and Azure resources in infrastructure as code: Bicep or Terraform for Azure, and Ansible, PowerShell DSC or your configuration management tool on-premises. Each environment is the same template with different parameters. That’s what makes “PreProd matches Prod” true and checkable, rather than a hope. Manual changes in any environment above Dev should be treated as defects.

4. Environments are isolated

An environment should never be able to affect another:

  • Network: separate VNets or VLANs per environment, with firewall rules that block traffic between them. Dev should not be able to reach a Prod database, even by accident.
  • Identity: separate service accounts and managed identities per environment. A Test credential leaking must not unlock Prod.
  • Data: separate databases, storage accounts and queues. No shared “reference” database that Prod also writes to.

5. Production data stays in production

Real customer data in lower environments is a data-protection problem, and in regulated sectors such as financial services and debt collection, a serious one. Use synthetic data in Dev and Test, and masked or anonymised copies of production for UAT and PreProd, refreshed by an automated, audited process. Developers should never need access to Prod data to do their job.

6. Prod is changed by pipelines, not people

All deployments go through the same automated pipeline. Use pipeline environments with approvals (Azure DevOps Environments or GitHub Environments) so Prod deployments need sign-off, and grant people only just-in-time access to Prod for support, through Privileged Identity Management. Hotfixes go through the same pipeline, just faster.

On-premises: internal web and app servers

For internal servers, the classic three-tier layout still works well. Every environment has the same tiers and the same firewall rules; what changes is how many servers sit in each tier.

Users DMZ · web tier Load balancer Web 1 Web 2 IIS / reverse proxy internal · app tier App 1 App 2 APIs · services · workers data tier SQL primary SQL secondary Always On AG firewall firewall
Production: at least two of everything, behind a load balancer. Lower environments keep the same tiers and firewall rules with one server per tier, so a release that needs a new port or firewall rule is caught long before Prod.

Practical points for the on-premises estate:

  • Separate the tiers. Only the web tier is reachable from users; only the app tier can reach the database. Each boundary is a firewall rule you can test in every environment.
  • One service account per application per environment, with only the rights it needs. Never run app pools as a domain admin or share accounts across environments.
  • Patch in rings. OS and framework patches go to Dev and Test first, then UAT and PreProd, then Prod. The environments become an early-warning system for patches as well as releases.
  • Use a naming convention that shows the environment, such as WEB-PRD-01, APP-UAT-01 or SQL-PPD-01, so nobody runs a script on the wrong box.
  • Give PreProd the same load-balanced, clustered shape as Prod, even if the servers are smaller. Failover, sticky sessions and cluster behaviour can’t be tested on a single server.

Azure: UK South and UK West

The two regions

  • UK South (London) has three availability zones: separate datacentres within the region with independent power, cooling and networking. It’s the natural primary region.
  • UK West (Cardiff) is UK South’s paired region, but it has no availability zones. It’s the natural secondary region for disaster recovery, and keeps data in the UK.

So the usual pattern is high availability within UK South (spread across zones) and disaster recovery to UK West (replicated, ready to take over if the whole of UK South is unavailable). UK South has reported capacity constraints during 2026, particularly for new zonal deployments, so confirm capacity with Microsoft before planning a large build there.

On-premises data centres · ExpressRoute Hub VNet · Azure Firewall · gateway Hub VNet · firewall Non-prod spokes Dev · Test · UAT PreProd mirrors Prod a subscription each auto-shutdown out of hours Prod spoke zone-redundant (3 AZs) App Service / AKS Azure SQL failover group Key Vault · App Insights Prod DR warm standby SQL geo-secondary scaled down until needed PreProd DR, for drills async UK South (London) · primary · 3 availability zones UK West (Cardiff) · paired · no zones
High availability in UK South, disaster recovery in UK West. Only Prod (and PreProd, so you can rehearse) needs a footprint in the secondary region. Hubs in both regions connect back to the data centres.

Subscriptions and management groups

Microsoft’s Cloud Adoption Framework recommends one subscription per application environment. That gives each environment its own security boundary, access control, budget and quotas, and lets each deployment pipeline’s identity be limited to one environment. A typical management group structure:

Tenant root
└── Contoso
    ├── Platform
    │   ├── Identity          domain controllers, Entra Connect
    │   ├── Management        Log Analytics, automation, backup
    │   └── Connectivity      hub VNets, firewalls, ExpressRoute, DNS
    ├── Landing zones
    │   ├── Corp              internal apps: sub-orders-dev, -test, -uat, -preprod, -prod
    │   └── Online            internet-facing apps, same pattern
    ├── Sandbox               experiments, cut off from corporate network
    └── Decommissioned

One point surprises people: Dev, Test, UAT, PreProd and Prod sit in the same management group and get the same Azure Policy. Policies that only apply in Prod cause failed promotions, where something deploys cleanly in Dev and is blocked in Prod. Differences belong in parameters such as SKUs and instance counts, not in different rules. Only Sandbox, for experiments, gets a looser policy set, and it has no connection to the corporate network.

Networking

  • Hub-and-spoke in each region. The hub holds shared services: Azure Firewall, the ExpressRoute or VPN gateway back to on-premises, and DNS. Each environment’s VNet is a spoke peered to the hub. Spokes can’t talk to each other except through the firewall, which is how Dev is kept away from Prod.
  • Private endpoints for PaaS. Azure SQL, Storage and Key Vault are reached over private IPs inside the VNet, with public network access turned off.
  • Plan IP ranges up front. Give every environment and region its own non-overlapping range that also doesn’t clash with on-premises. Fixing overlapping address space later is very painful.
  • One DNS story. Use Azure Private DNS zones and a DNS resolver so on-premises servers and Azure resources can resolve each other’s private names.

Resilience by environment

Dev / Test UAT PreProd Prod
Region UK South (or UK West) UK South UK South + UK West UK South + UK West
Zones Not needed Not needed Zone-redundant, like Prod Zone-redundant
DR None, rebuild from code None Same pattern as Prod, for drills Warm standby in UK West
Database Single, small Single Failover group Azure SQL failover group (UK South → UK West)
Backups Short retention Short retention As Prod Long retention, geo-redundant
Hours Office hours, auto-shutdown During test cycles Always on during releases 24/7

For Prod, decide the recovery time objective (RTO) and recovery point objective (RPO) with the business first, then choose the pattern:

  • Backup and restore, the cheapest: hours to recover, rebuilt from IaC and backups.
  • Warm standby, shown above and the usual choice: a scaled-down copy running in UK West, databases geo-replicated, scaled up on failover. Minutes to an hour.
  • Active-active: both regions serving traffic behind Azure Front Door. The fastest recovery, but the most cost and complexity, and harder for stateful systems.

In UK financial services, the FCA and PRA operational resilience rules also expect firms to set impact tolerances for important business services and test that they can stay within them, so regular, documented DR drills (in PreProd and in Prod) are part of the job, not an optional extra.

Identity and access

  • Microsoft Entra ID for everyone, synchronised with on-premises Active Directory, with MFA and Conditional Access.
  • No standing access to Prod. Admins request time-limited elevation through Privileged Identity Management, with approval and an audit trail.
  • Managed identities for apps wherever possible, instead of passwords or keys. One identity per app per environment.
  • Pipelines deploy with their own identity, scoped to one environment’s subscription, ideally using workload identity federation so there are no stored secrets.
  • Break-glass accounts for emergencies, stored securely, monitored, and tested.

Observability and cost

  • Monitoring: Application Insights per app per environment, and Log Analytics workspaces, with Prod kept separate from non-prod. Only Prod alerts should page someone out of hours; non-prod alerts go to a team channel.
  • Tagging: every resource gets environment, application, owner and costCentre tags, enforced by policy, so cost reports and clean-ups are possible.
  • Naming: a consistent pattern that shows the environment and region, for example rg-orders-prod-uks-001, app-orders-uat-uks, sql-orders-prod-ukw (with uks for UK South and ukw for UK West).
  • Cost: auto-shutdown or scale-to-zero for Dev and Test outside office hours, smaller SKUs below PreProd, reserved instances or savings plans for steady Prod workloads, and budgets with alerts on every subscription.

A rough reference estate

Environment On-premises Azure
Dev 1 web, 1 app, shared non-prod SQL instance UK South, small App Service plan or dev AKS pool, basic SQL tier, auto-shutdown
Test 1 web, 1 app, own database UK South, same as Dev
UAT 1 web, 1 app, own database with masked data UK South, slightly larger, stable during test cycles
PreProd 2 web, 2 app behind a load balancer, SQL Always On UK South zone-redundant + UK West DR, Prod topology at reduced scale
Prod 2+ web, 2+ app behind a load balancer, SQL Always On across two sites UK South zone-redundant + UK West warm standby, SQL failover group, Front Door

Checklist

  • Each environment has a clear purpose, owner and data policy
  • One artifact is built once and promoted unchanged
  • Configuration and secrets are external; Key Vault per environment
  • All infrastructure is defined as code, with PreProd generated from the same templates as Prod
  • Environments are isolated: network, identity and data
  • No real customer data below Prod; masked refreshes are automated and audited
  • Deployments only through pipelines, with approvals for Prod
  • No standing admin access to Prod; PIM for elevation
  • One Azure subscription per environment, same management group, same policies
  • Hub-and-spoke networking, private endpoints, non-overlapping IP ranges
  • Prod and PreProd are zone-redundant in UK South with DR to UK West
  • RTO and RPO are agreed, and DR is tested on a schedule
  • Tags, naming, budgets and out-of-hours shutdown are in place

Further reading