Prepare local tooling and Azure access to build:
- Azure Terraform remote state backend (azurerm)
- State migration from local → remote
- Locking validation (Azure Blob lease)
This step only verifies environment readiness.
No Azure resources are created here.
Ensure the following tools are installed:
- Azure CLI (
az) - Terraform (
terraform) - Git (
git) - PowerShell (Windows)
Verify versions:
az version
terraform version
git --versionExpected:
-
Azure CLI installed
-
Terraform ≥ 1.6
-
Git installed
Login and verify active subscription:
az login
az account show --query "{name:name, id:id, user:user.name}" -o jsonEnsure
- Correct subscription is selected
- You have permission to create resources
If needed:
az account list -o table
az account set --subscription "<SUBSCRIPTION_NAME_OR_ID>"The following values are used consistently across all steps:
| Component | Value |
|---|---|
| Region | westeurope |
| Backend Resource Group | rg-tfstate-runbook |
| Storage Account | sttfstate260221me01 |
| Container | tfstate |
| State Key | runbook.tfstate |
| Workload Resource Group | rg-workload-runbook |
You may change names, but they must remain consistent throughout the runbook.
Repository structure:
terraform-azure-backend-oidc-runbook/ ├── infra/ │ └── workload/ │ └── 01-local-state/ ├── proofs/ │ └── remote-state/ └── runbook/
Workload directory used later:
infra/workload/01-local-state
-
Before proceeding to Step 01:
-
Azure CLI is authenticated
-
Correct subscription is active
-
Terraform is installed
-
Git repository is initialized