An ARM template (JSON) and a Bicep file describe the same thing: the Azure resources you want. Both have parameters (inputs), variables (values worked out once), resources (type, API version, name, location, properties) and outputs. Bicep is shorter and the CLI compiles it to ARM JSON before Azure Resource Manager deploys it. To modify a template, change a parameter's default value or allowed values, add a parameter, or edit a resource's properties, then preview the result with what-if.
- Templates are declarative. You describe the end state; Resource Manager works out the steps.
- ARM JSON sections are parameters, variables, resources and outputs (plus $schema and contentVersion).
- Bicep uses param, var, resource and output keywords and compiles to ARM JSON.
🎯 Exam tip: "Which value will be used?" = the value passed at deployment, otherwise the defaultValue.
⚠️ Watch out: Thinking Bicep deploys something different from ARM JSON. It compiles to the same JSON.
Deploy a template to a resource group with az deployment group create --template-file main.bicep (or New-AzResourceGroupDeployment, or Deploy a custom template in the portal). Preview first with what-if. The default mode is Incremental, which adds and updates resources; Complete also deletes resources in the group that the template doesn't define. To get a template from what already exists, use Export template on a resource group or resource (or az group export), or download one from Deployments history. Convert ARM JSON to Bicep with az bicep decompile.
- CLI az deployment group create, PowerShell New-AzResourceGroupDeployment, portal Deploy a custom template.
- Default mode is Incremental. Complete deletes resources not in the template.
- what-if previews - + create, ~ modify, - delete, = no change.
🎯 Exam tip: "Delete resources not in the template" = Complete mode.
⚠️ Watch out: Running Complete mode without what-if and deleting resources someone else added.
You create a VM in the portal (Virtual machines › + Create), with az vm create or with New-AzVM, choosing the region, availability options, image, size, admin account and inbound ports. The size sets vCPUs, memory, maximum data disks and price; the name tells you the family, such as D for general purpose, E for memory optimised and F for compute optimised. Resizing restarts the VM. If the new size isn't available on the hardware cluster hosting the VM, deallocate it first and every size in the region becomes available.
- Create with the portal wizard, az vm create or New-AzVM. Basics holds region, availability, image, size and admin account.
- Size names show family, vCPUs, features and generation (Standard_D4s_v5).
- Resizing restarts the VM. Sizes not on the current cluster need the VM deallocated first.
🎯 Exam tip: "Size is greyed out / not available" = deallocate the VM, then resize.
⚠️ Watch out: Shutting down from inside the OS and expecting billing to stop.
An Azure VM has an OS disk and optional data disks, both managed disks stored in Azure Storage, plus a temporary disk on the host that loses its data when the VM is deallocated or moved. Disk types are Ultra Disk, Premium SSD v2, Premium SSD, Standard SSD and Standard HDD. You can attach data disks while the VM runs and grow disks (never shrink them), but changing a disk's type needs the VM deallocated or the disk detached. Managed disks are always encrypted at rest; encryption at host also encrypts the temp disk and the disk caches on the host. Register the EncryptionAtHost feature once, deallocate the VM, then turn it on.
- OS and data disks are managed disks; the temp disk is on the host and isn't persistent.
- Attach and detach data disks while the VM runs. Grow disks, never shrink them.
- Changing a disk type needs the VM deallocated or the disk detached.
🎯 Exam tip: "Encrypt the temp disk and caches" = encryption at host.
⚠️ Watch out: Keeping important data on the temporary disk.
To move a VM to another resource group or subscription, use Move in the portal, az resource move or Move-AzResource. The region doesn't change and the VM keeps running, but every resource ID changes, and the VM must move with its dependent resources (OS and data disks, network interface, and usually its public IP and NSG; across subscriptions the virtual network too). Both subscriptions must be in the same Microsoft Entra tenant. To move a VM to another region, use Azure Resource Mover: add resources, validate dependencies, prepare, initiate move, commit, then delete the source.
- Resource group and subscription moves keep the region and the VM keeps running.
- Resource IDs change. Update scripts, alerts and role assignments on the resource.
- Move a VM with its disks and NIC; across subscriptions the VNet goes too.
🎯 Exam tip: "Move to another region" = Azure Resource Mover.
⚠️ Watch out: Expecting a resource group move to change the region.
An availability set spreads VMs across fault domains (racks with their own power and network, up to 3) and update domains (rebooted one at a time, up to 20) inside one datacenter: 99.95% SLA with two or more VMs. Availability zones put VMs in separate datacenters in a region: 99.99%. A VM uses one or the other and you choose at creation. A Virtual Machine Scale Set runs identical VMs (use Flexible orchestration) across zones or fault domains, and autoscale rules add or remove instances on metrics such as Percentage CPU, between a minimum and maximum.
- Availability set - fault domains (up to 3) and update domains (default 5, up to 20) in one datacenter, 99.95%.
- Availability zones - separate datacenters in a region, 99.99% with VMs in two or more zones.
- Single VM with Premium SSD or better on all disks - 99.9%.
🎯 Exam tip: "Survive a datacenter failure" = availability zones.
⚠️ Watch out: Thinking an availability set protects against a whole datacenter failing.
Azure Container Registry (ACR) is your private image store. You pick a tier: Basic, Standard or Premium, and only Premium adds geo-replication and private endpoints. Apps pull with a Microsoft Entra identity that has the AcrPull role, and the admin user stays off. Azure Container Instances (ACI) runs an image as a container group in seconds, with the CPU and memory you set at creation and a restart policy of Always, OnFailure or Never. ACI bills per second and doesn't autoscale. To change CPU or memory, you recreate the group.
- ACR tiers are Basic, Standard and Premium. Premium adds geo-replication, private endpoints and the most included storage.
- You can change an ACR tier in place with az acr update --sku, with no downtime.
- Pull with a managed identity or service principal that has AcrPull. Keep the admin user disabled.
🎯 Exam tip: "Replicate the registry to another region" = Premium ACR.
⚠️ Watch out: Leaving the restart policy on Always for a batch job, so it loops and keeps billing.
Azure Container Apps runs containers in a Container Apps environment without you managing Kubernetes. You size each replica with an allowed CPU and memory pair (on the Consumption profile, from 0.25 vCPU / 0.5 Gi to 4 vCPU / 8 Gi, always 2 Gi per vCPU). Scale rules (HTTP, TCP or event-based, such as a queue) add replicas between min replicas and max replicas. With min replicas 0 the app scales to zero when it's idle; CPU and memory rules can't do that. Changing scale settings creates a new revision.
- Container apps run inside a Container Apps environment; several apps share it.
- Consumption sizes go from 0.25 vCPU / 0.5 Gi to 4 vCPU / 8 Gi, always 2 Gi per vCPU.
- Scale rules can be HTTP, TCP or custom (KEDA event sources). Min and max replicas bound them.
🎯 Exam tip: "Scale to zero when idle" = min replicas 0 with an HTTP or event rule.
⚠️ Watch out: Picking a CPU and memory pair that isn't allowed on Consumption.
An App Service plan is the set of VMs your web apps run on. Its pricing tier decides the instance size, how many instances you can have and which features you get: Free and Shared for testing, Basic (up to 3 instances, manual scale), Standard (up to 10, autoscale and 5 deployment slots), Premium v3 (up to 30, 20 slots, zone redundancy) and Isolated v2. Every app on a plan runs on every instance. Scale up changes the tier or size; scale out changes the instance count, by hand or with rules-based autoscale on a metric such as CPU percentage.
- The plan is the compute. Region, OS and tier are set on the plan; the web app runs on it.
- Basic scales out by hand to 3 instances. Standard allows 10 and autoscale. Premium v3 allows 30.
- Standard gives 5 deployment slots, Premium v3 gives 20. Custom domains with TLS start at Basic.
🎯 Exam tip: "Scale automatically on CPU" = Standard or higher with an autoscale rule.
⚠️ Watch out: Trying to add autoscale or slots on a Basic plan.
To map a custom domain to App Service, prove you own it and point it at the app. Create a TXT record named asuid.<subdomain> (or asuid for the root) holding the app's custom domain verification ID, plus a CNAME to <app>.azurewebsites.net for a subdomain or an A record to the app's IP for the root domain. Then add the custom domain on the app. Custom domains need Basic or higher for TLS (Free can't use them at all). Secure it with a free App Service managed certificate (no wildcards, not exportable), an imported Key Vault certificate or an uploaded .pfx, bound with SNI SSL. Finally turn on HTTPS Only and keep the minimum TLS version at 1.2 (the default) or higher.
- Ownership is proven with a TXT record asuid.<subdomain> containing the custom domain verification ID.
- Subdomains use a CNAME to <app>.azurewebsites.net; the root domain uses an A record to the app's IP.
- Free tier has no custom domains; Shared can map a domain but can't bind a certificate; Basic and up can do both.
🎯 Exam tip: "Verify domain ownership" = TXT record asuid.<name>.
⚠️ Watch out: Trying to create a CNAME at the zone apex.
App Service keeps automatic backups every hour for 30 days with no setup, and you add custom backups when you need your own schedule, retention, linked databases or a copy you can download. A custom backup goes to a blob container in a storage account in the same subscription, through a SAS URL, holds up to 10 GB and needs Basic or higher. Networking has two directions. Outbound: VNet integration lets the app reach private resources through an empty subnet (/28 or larger, /26 recommended) delegated to Microsoft.Web/serverFarms. Inbound: access restrictions allow or deny traffic by IP range, service tag or subnet in priority order, and a private endpoint gives the app a private IP inside your VNet.
- Automatic backups run hourly, are kept 30 days and need no storage account.
- Custom backups go to a blob container via a SAS URL, up to 10 GB, Basic tier and up, with a schedule and retention.
- Restore over the same app, to another app or to a slot.
🎯 Exam tip: "App must reach a private database" = VNet integration (outbound).
⚠️ Watch out: Expecting VNet integration to make the app private for inbound traffic.
A deployment slot is a live copy of your web app with its own hostname (<app>-staging.azurewebsites.net), running on the same App Service plan. Slots need Standard (5 slots) or Premium v3 (20 slots). You deploy to staging, test it, then swap: App Service applies production's settings to staging, warms up its instances and only then switches traffic, so there's no cold start, and swapping again rolls back. App settings and connection strings marked Deployment slot setting stay with their slot. Custom domains, certificates and TLS settings, scale settings, IP restrictions and managed identities never swap. Swap with preview pauses after warm-up, and traffic routing can send a percentage of users to a slot.
- Slots need Standard (5 per app) or Premium v3 (20 per app). Basic and Free have none.
- Slots run on the same plan, so they share its instances and scale settings.
- A swap warms up the source first, then switches routing. Swap again to roll back.
🎯 Exam tip: "No downtime when releasing" = deploy to a slot and swap.
⚠️ Watch out: Forgetting to mark production-only values (database, payment endpoint) as slot settings, so staging values reach production.