Microsoft Azure Knowledge Patch
Use this skill for Azure infrastructure, Azure CLI, Azure PowerShell,
Terraform AzureRM or AzAPI, Bicep, identity SDK, Microsoft Entra, networking,
compute, containers, data services, storage, Key Vault, governance, and service
lifecycle work.
Azure is a rolling multi-product platform. Inspect the project's pinned
provider, CLI, module, API version, SDK, and resource SKU before applying
version-dependent advice. Prefer manifests, state, schemas, live API metadata,
command help, plans, and tests when they differ from this guidance.
Reference index
| Reference |
Topics |
| Terraform providers |
AzureRM 4.x and AzAPI 2.x migrations, HCL bodies, import, preflight, actions, state, and authentication |
| AKS and containers |
AKS, Azure Container Registry, Container Apps, Container Instances, Service Fabric, and container storage |
| Compute and application platform |
VMs, VMSS, disks, images, App Service, Functions, App Configuration, Batch, AI, and application services |
| Data, storage, and Key Vault |
PostgreSQL, MySQL, SQL, Cosmos DB, Storage, Azure Files, NetApp Files, Backup, and Key Vault |
| Deployment, governance, and CLI |
ARM, Bicep, provider registration, deployments, RBAC, monitoring, CLI packaging, API Management, and retirements |
| Identity, authentication, and Graph |
Entra and Microsoft Graph, mandatory MFA, Azure Identity SDKs, Azure CLI, PowerShell, managed identity, and federation |
| Networking |
Private VNets, outbound access, load balancers, public IPs, gateways, private endpoints, Application Gateway, and network appliances |
First-pass migration triage
- Identify every client surface: Azure CLI version, Az PowerShell modules,
Terraform providers, Bicep CLI, SDK packages, and explicit ARM API versions.
- Resolve authentication type. Prefer workload identity, managed identity, or
a service principal for automation; user-password flows cannot satisfy MFA.
- Run
terraform plan, deployment validation or what-if, and representative
CLI queries without mutating production resources.
- Check defaults that affect network exposure, egress, operating system,
compute size, database version, storage redundancy, and access control.
- Validate JSON and table-output consumers against the installed CLI because
several commands changed casing, fields, null representation, and shape.
- Query provider metadata for supported API versions and locations instead of
copying one API version across a namespace.
- Inventory retirements separately; an interface can remain operational after
retirement while losing support and SLA coverage.
Highest-impact breaking changes
AzureRM 4.x requires a subscription
Every provider instance needs subscription_id or ARM_SUBSCRIPTION_ID.
Azure CLI authentication no longer supplies the active subscription
implicitly. Choose resource_provider_registrations deliberately and use
resource_providers_to_register for exact additions.
provider "azurerm" {
subscription_id = var.subscription_id
resource_provider_registrations = "core"
resource_providers_to_register = ["Microsoft.ContainerService"]
features {}
}
AzureRM 4.x also removes broad families of retired resources and renames many
AKS, networking, storage, diagnostic, and service-bus fields. Read the
Terraform reference before changing state; several migrations require a new
resource type or dedicated child resource rather than a spelling change.
AzAPI 2.x uses native HCL
Set body as an HCL object and consume output as an HCL object. Remove
surrounding jsonencode and jsondecode. Replace ignore_body_changes with
a precise lifecycle.ignore_changes path.
resource "azapi_resource" "example" {
type = "Microsoft.Example/widgets@2026-01-01"
parent_id = var.parent_id
name = var.name
body = { properties = { enabled = true } }
}
Custom retry fields multiplier and randomization_factor, and provider
maximum_busy_retry_attempts, are deprecated in later AzAPI 2.x. Do not copy
the early 2.0 retry shape into new configurations.
Azure CLI defaults are not provisioning contracts
Pass values explicitly when repeatability matters. Recent changes include AKS
creation defaulting to no SSH key, VM and VMSS size defaulting to
Standard_D2s_v5, Linux App Service plans defaulting to P0V3, App Service
plans defaulting to Linux unless Windows is requested, and changing MySQL and
PostgreSQL creation defaults.
The CLI also removes or relocates commands. Single Server PostgreSQL commands,
legacy Batch certificate and node commands, and several old options are gone;
CDN and IoT device-stream commands moved to extensions. Pin and install needed
extensions in offline or controlled environments.
Mandatory ARM MFA rejects password automation
Azure Resource Manager write operations can return claims challenges for user
identities even when Conditional Access exclusions exist. ROPC and username-
password credentials cannot satisfy MFA. Move unattended work to managed
identity, workload identity, or service principals, and use clients that can
handle claims challenges for interactive users.
New networks and vaults have safer defaults
New VNets created with the newer API default subnet
defaultOutboundAccess to false; supply NAT gateway, Standard Load Balancer
outbound rules, Standard public IP, or firewall/NVA routing when egress is
required. Changing subnet privacy requires deallocating existing VMs before
their NICs receive the setting.
New Key Vaults created with control-plane API 2026-02-01 or later default to
RBAC when enableRbacAuthorization is omitted. Set it to false explicitly
only when access policies are intentional, and ensure the operator can create
role assignments before switching access models.
Basic network SKUs are retired
Basic Load Balancer and Basic Public IP are retired and unsupported, although
existing instances can continue operating. Their migrations are resource-
specific and may require downtime. Do not mix Basic and Standard IP/LB SKUs;
preserve static public addresses before disassociation and configure NSG and
outbound behavior explicitly.
Common workflows
Safely update an AKS cluster
- Query the cluster and node-pool modes, network plugin, outbound type,
storage add-on, OS SKU, and current upgrade availability.
- Treat preview-only AzureRM fields separately; editing the same AKS resource
through both AzureRM and AzAPI can cause perpetual diffs or recreation.
- Use ETags where concurrent updates are possible.
- Set disruption, soak, undrainable-node, and maximum-unavailable controls
explicitly for node-pool upgrades.
- Account for Machines-mode pools being skipped by cluster upgrade and use
node-pool rollback commands when recovery is needed.
Choose an authentication chain
Set AZURE_TOKEN_CREDENTIALS=prod, dev, or a credential class name to
constrain DefaultAzureCredential in current .NET, Go, Java, JavaScript, and
Python Azure Identity libraries. Use the language-specific required-variable
option where silent fallback is unsafe. Allow roughly 70 seconds for IMDS
retry behavior when managed identity is selected directly.
Tool-backed credentials do not uniformly support claims challenges. Validate
the exact language implementation before relying on Azure CLI, PowerShell, or
Azure Developer CLI credentials for challenged sign-in.
Author an ARM or Bicep deployment
Query resourceTypes provider metadata for the precise resource type, API
versions, and locations. Explicit resource types in ARM/Bicep deployments are
automatically registered, but implicit supporting providers may still need
manual registration.
Use secure Bicep outputs for secret strings or objects. Parameter files can
extend one base and merge objects or arrays with base, while local snapshots
can validate deterministic deployment expansion without contacting Azure.
Module identity syntax is recognized but is not yet deployable.
Handle output safely
Prefer JSON plus explicit JMESPath queries over parsing table columns. Treat
new fields as additive, tolerate JSON null, preserve exact property casing,
and add contract tests for scripts that consume disk, snapshot, gallery,
resource-list, Web App runtime, Key Vault key, or network outputs.
Plan database operations
Pass engine version, SKU, storage type, redundancy, network mode, and public
access explicitly. PostgreSQL and MySQL CLI options have changed repeatedly;
check current --help before upgrades, restores, replica creation, or backup
automation. Use validation-only PostgreSQL upgrades where available.
Inventory service retirement
Use Azure Advisor metadata/recommendations and Resource Graph retirement data,
then supplement them for sovereign clouds and incomplete service coverage.
Retired APIs and SKUs can demand redesign, not only a new version string; for
example, some SQL 2014-04-01 operation groups have no stable replacement.
Validation habits
- Pin provider and module constraints, CLI/extension versions, Bicep versions,
and SDK lockfiles in reproducible automation.
- Test authentication in the target cloud and tenant; endpoint discovery,
audiences, claims handling, and sovereign-cloud support differ.
- Use
az deployment ... validate, what-if, deployment-stack what-if, AzAPI
preflight, and Terraform plan before writes.
- Preserve state backups before Terraform provider upgrades and verify import
IDs, resource moves, set/list semantics, and replacements.
- Query current resource state after CLI updates before depending on defaults.
- Deallocate VMs when subnet privacy changes and schedule downtime for Basic
network SKU migrations.
- Treat previews, deprecated flags, and announced removals as transitional;
avoid adding new dependencies on them.
- Read the relevant topic reference for exact flags, resource names, output
changes, limitations, and version attribution.
1---2name: azure-knowledge-patch-23description: Microsoft Azure4license: MIT5---678# Microsoft Azure Knowledge Patch910Use this skill for Azure infrastructure, Azure CLI, Azure PowerShell,11Terraform AzureRM or AzAPI, Bicep, identity SDK, Microsoft Entra, networking,12compute, containers, data services, storage, Key Vault, governance, and service13lifecycle work.1415Azure is a rolling multi-product platform. Inspect the project's pinned16provider, CLI, module, API version, SDK, and resource SKU before applying17version-dependent advice. Prefer manifests, state, schemas, live API metadata,18command help, plans, and tests when they differ from this guidance.1920## Reference index2122| Reference | Topics |23| --- | --- |24| [Terraform providers](references/terraform-providers.md) | AzureRM 4.x and AzAPI 2.x migrations, HCL bodies, import, preflight, actions, state, and authentication |25| [AKS and containers](references/aks-and-containers.md) | AKS, Azure Container Registry, Container Apps, Container Instances, Service Fabric, and container storage |26| [Compute and application platform](references/compute-and-app-platform.md) | VMs, VMSS, disks, images, App Service, Functions, App Configuration, Batch, AI, and application services |27| [Data, storage, and Key Vault](references/data-and-storage.md) | PostgreSQL, MySQL, SQL, Cosmos DB, Storage, Azure Files, NetApp Files, Backup, and Key Vault |28| [Deployment, governance, and CLI](references/deployment-governance-and-cli.md) | ARM, Bicep, provider registration, deployments, RBAC, monitoring, CLI packaging, API Management, and retirements |29| [Identity, authentication, and Graph](references/identity-authentication-and-graph.md) | Entra and Microsoft Graph, mandatory MFA, Azure Identity SDKs, Azure CLI, PowerShell, managed identity, and federation |30| [Networking](references/networking.md) | Private VNets, outbound access, load balancers, public IPs, gateways, private endpoints, Application Gateway, and network appliances |3132## First-pass migration triage33341. Identify every client surface: Azure CLI version, Az PowerShell modules,35 Terraform providers, Bicep CLI, SDK packages, and explicit ARM API versions.362. Resolve authentication type. Prefer workload identity, managed identity, or37 a service principal for automation; user-password flows cannot satisfy MFA.383. Run `terraform plan`, deployment validation or what-if, and representative39 CLI queries without mutating production resources.404. Check defaults that affect network exposure, egress, operating system,41 compute size, database version, storage redundancy, and access control.425. Validate JSON and table-output consumers against the installed CLI because43 several commands changed casing, fields, null representation, and shape.446. Query provider metadata for supported API versions and locations instead of45 copying one API version across a namespace.467. Inventory retirements separately; an interface can remain operational after47 retirement while losing support and SLA coverage.4849## Highest-impact breaking changes5051### AzureRM 4.x requires a subscription5253Every provider instance needs `subscription_id` or `ARM_SUBSCRIPTION_ID`.54Azure CLI authentication no longer supplies the active subscription55implicitly. Choose `resource_provider_registrations` deliberately and use56`resource_providers_to_register` for exact additions.5758```hcl59provider "azurerm" {60 subscription_id = var.subscription_id61 resource_provider_registrations = "core"62 resource_providers_to_register = ["Microsoft.ContainerService"]63 features {}64}65```6667AzureRM 4.x also removes broad families of retired resources and renames many68AKS, networking, storage, diagnostic, and service-bus fields. Read the69Terraform reference before changing state; several migrations require a new70resource type or dedicated child resource rather than a spelling change.7172### AzAPI 2.x uses native HCL7374Set `body` as an HCL object and consume `output` as an HCL object. Remove75surrounding `jsonencode` and `jsondecode`. Replace `ignore_body_changes` with76a precise `lifecycle.ignore_changes` path.7778```hcl79resource "azapi_resource" "example" {80 type = "Microsoft.Example/widgets@2026-01-01"81 parent_id = var.parent_id82 name = var.name83 body = { properties = { enabled = true } }84}85```8687Custom retry fields `multiplier` and `randomization_factor`, and provider88`maximum_busy_retry_attempts`, are deprecated in later AzAPI 2.x. Do not copy89the early 2.0 retry shape into new configurations.9091### Azure CLI defaults are not provisioning contracts9293Pass values explicitly when repeatability matters. Recent changes include AKS94creation defaulting to no SSH key, VM and VMSS size defaulting to95`Standard_D2s_v5`, Linux App Service plans defaulting to `P0V3`, App Service96plans defaulting to Linux unless Windows is requested, and changing MySQL and97PostgreSQL creation defaults.9899The CLI also removes or relocates commands. Single Server PostgreSQL commands,100legacy Batch certificate and node commands, and several old options are gone;101CDN and IoT device-stream commands moved to extensions. Pin and install needed102extensions in offline or controlled environments.103104### Mandatory ARM MFA rejects password automation105106Azure Resource Manager write operations can return claims challenges for user107identities even when Conditional Access exclusions exist. ROPC and username-108password credentials cannot satisfy MFA. Move unattended work to managed109identity, workload identity, or service principals, and use clients that can110handle claims challenges for interactive users.111112### New networks and vaults have safer defaults113114New VNets created with the newer API default subnet115`defaultOutboundAccess` to `false`; supply NAT gateway, Standard Load Balancer116outbound rules, Standard public IP, or firewall/NVA routing when egress is117required. Changing subnet privacy requires deallocating existing VMs before118their NICs receive the setting.119120New Key Vaults created with control-plane API `2026-02-01` or later default to121RBAC when `enableRbacAuthorization` is omitted. Set it to `false` explicitly122only when access policies are intentional, and ensure the operator can create123role assignments before switching access models.124125### Basic network SKUs are retired126127Basic Load Balancer and Basic Public IP are retired and unsupported, although128existing instances can continue operating. Their migrations are resource-129specific and may require downtime. Do not mix Basic and Standard IP/LB SKUs;130preserve static public addresses before disassociation and configure NSG and131outbound behavior explicitly.132133## Common workflows134135### Safely update an AKS cluster1361371. Query the cluster and node-pool modes, network plugin, outbound type,138 storage add-on, OS SKU, and current upgrade availability.1392. Treat preview-only AzureRM fields separately; editing the same AKS resource140 through both AzureRM and AzAPI can cause perpetual diffs or recreation.1413. Use ETags where concurrent updates are possible.1424. Set disruption, soak, undrainable-node, and maximum-unavailable controls143 explicitly for node-pool upgrades.1445. Account for Machines-mode pools being skipped by cluster upgrade and use145 node-pool rollback commands when recovery is needed.146147### Choose an authentication chain148149Set `AZURE_TOKEN_CREDENTIALS=prod`, `dev`, or a credential class name to150constrain `DefaultAzureCredential` in current .NET, Go, Java, JavaScript, and151Python Azure Identity libraries. Use the language-specific required-variable152option where silent fallback is unsafe. Allow roughly 70 seconds for IMDS153retry behavior when managed identity is selected directly.154155Tool-backed credentials do not uniformly support claims challenges. Validate156the exact language implementation before relying on Azure CLI, PowerShell, or157Azure Developer CLI credentials for challenged sign-in.158159### Author an ARM or Bicep deployment160161Query `resourceTypes` provider metadata for the precise resource type, API162versions, and locations. Explicit resource types in ARM/Bicep deployments are163automatically registered, but implicit supporting providers may still need164manual registration.165166Use secure Bicep outputs for secret strings or objects. Parameter files can167extend one base and merge objects or arrays with `base`, while local snapshots168can validate deterministic deployment expansion without contacting Azure.169Module identity syntax is recognized but is not yet deployable.170171### Handle output safely172173Prefer JSON plus explicit JMESPath queries over parsing table columns. Treat174new fields as additive, tolerate JSON null, preserve exact property casing,175and add contract tests for scripts that consume disk, snapshot, gallery,176resource-list, Web App runtime, Key Vault key, or network outputs.177178### Plan database operations179180Pass engine version, SKU, storage type, redundancy, network mode, and public181access explicitly. PostgreSQL and MySQL CLI options have changed repeatedly;182check current `--help` before upgrades, restores, replica creation, or backup183automation. Use validation-only PostgreSQL upgrades where available.184185### Inventory service retirement186187Use Azure Advisor metadata/recommendations and Resource Graph retirement data,188then supplement them for sovereign clouds and incomplete service coverage.189Retired APIs and SKUs can demand redesign, not only a new version string; for190example, some SQL `2014-04-01` operation groups have no stable replacement.191192## Validation habits193194- Pin provider and module constraints, CLI/extension versions, Bicep versions,195 and SDK lockfiles in reproducible automation.196- Test authentication in the target cloud and tenant; endpoint discovery,197 audiences, claims handling, and sovereign-cloud support differ.198- Use `az deployment ... validate`, `what-if`, deployment-stack what-if, AzAPI199 preflight, and Terraform plan before writes.200- Preserve state backups before Terraform provider upgrades and verify import201 IDs, resource moves, set/list semantics, and replacements.202- Query current resource state after CLI updates before depending on defaults.203- Deallocate VMs when subnet privacy changes and schedule downtime for Basic204 network SKU migrations.205- Treat previews, deprecated flags, and announced removals as transitional;206 avoid adding new dependencies on them.207- Read the relevant topic reference for exact flags, resource names, output208 changes, limitations, and version attribution.