← All insightsAutomation

Automating Microsoft Azure from scratch

CodeWizard Academy · 19 December 2025 · 3 min read · Intermediate

Anything you do to Microsoft Azure twice should be automated. This walks the path from a manual install to a repeatable, pipeline-driven setup.

1. Install it reproducibly

bash
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
az login
az account show

2. Describe the desired state

A storage account via Terraform.

hcl
resource "azurerm_storage_account" "assets" {
  name                     = "acmeassets"
  resource_group_name      = azurerm_resource_group.rg.name
  location                 = "westeurope"
  account_tier             = "Standard"
  account_replication_type = "LRS"
  min_tls_version          = "TLS1_2"
}

3. Run it from CI

OIDC login from GitHub Actions to Azure.

yaml
- uses: azure/login@v2
  with:
    client-id: ${{ secrets.AZURE_CLIENT_ID }}
    tenant-id: ${{ secrets.AZURE_TENANT_ID }}
    subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}

Want senior help putting Microsoft Azure to work - or a team bootcamp on it? CodeWizard runs Israel's largest DevOps community and embeds named senior engineers with a transparent hours log. Book a free consult or explore the Academy.

Like where this is going?

Get hands-on help from the engineers who write these posts.

Book a free consult