Skip to main content
Version: Next

Task 04: Create Environments

Runbook GitHub GitLab Azure DevOps

DOCUMENT CATEGORY: Runbook Step SCOPE: Deployment environment creation PURPOSE: Create deployment environments for infrastructure automation

Status: Active Applies To: All Azure Local deployments Last Updated: 2026-03-19


Objective

Create deployment environments to manage infrastructure using IaC and automation. Environments provide deployment targets with optional protection rules and approval gates.


Prerequisites

  • Project settings configured (Task 03)
  • Admin / Maintainer role on the project

Environment Naming Convention

Use consistent naming across all platforms:

Cloud/ServiceExample Names
Azure Productionazr-prod-us, azr-prod-eu
Azure Developmentazr-dev-us
Azure Stagingazr-staging

Procedure

Create Environments

  1. Navigate to SettingsEnvironments
  2. Click New environment
  3. Enter the environment name (e.g., azr-prod-us)
  4. Click Configure environment

Configure Protection Rules

For production environments, add protection rules:

SettingValue
Required reviewers✅ Add 1–2 required reviewers
Wait timerOptional — add delay before deployment (minutes)
Deployment branchesmain only (select Selected branches → add main)

Repeat for each environment in the naming convention table above.

tip

GitHub Environments integrate with GitHub Actions via the environment: key in workflow YAML. Protection rules automatically gate deployments.

References: GitHub — Using environments for deployment


Verification

  • Environment created for each deployment target
  • Environment names follow naming convention
  • Production environments have protection rules / approval gates configured

Next Steps

Configure Environment Variables


References