Storage & Networking
Verified against Azure CLI 2.87.0, flags verified via `az <cmd> --help`, 2026-08-20 · official docs
Storage accounts, blob containers/objects, and virtual network/subnet/NSG (network security group) setup.
Storage accounts#
az storage account create --resource-group my-rg --name mystorageaccount --sku Standard_LRS --location eastus az storage account list --resource-group my-rg --output table
A storage account name must be globally unique across all of Azure (not just your subscription) — a create failing with a name-already-taken error is common and not a permissions problem.
Blob containers#
az storage container create --account-name mystorageaccount --name my-container --auth-mode login az storage container list --account-name mystorageaccount --auth-mode login
--auth-mode login uses your az login identity (with the right RBAC role, e.g. Storage Blob Data Contributor) instead of a storage account key — prefer it over the legacy key-based auth mode for anything beyond a quick local test.
Uploading and downloading blobs#
az storage blob upload --account-name mystorageaccount --container-name my-container --name file.txt --file ./file.txt --auth-mode login az storage blob download --account-name mystorageaccount --container-name my-container --name file.txt --file ./file.txt --auth-mode login az storage blob list --account-name mystorageaccount --container-name my-container --auth-mode login --output table
Virtual networks and subnets#
az network vnet create --resource-group my-rg --name my-vnet --address-prefixes 10.0.0.0/16 az network vnet subnet create --resource-group my-rg --vnet-name my-vnet --name my-subnet --address-prefixes 10.0.1.0/24 az network vnet list --resource-group my-rg --output table
Network security groups (NSGs)#
az network nsg create --resource-group my-rg --name my-nsg --location eastus az network nsg rule create \ --resource-group my-rg --nsg-name my-nsg --name allow-https \ --priority 100 --access Allow --direction Inbound --protocol Tcp \ --destination-port-ranges 443 --source-address-prefixes '*'
An NSG is attached to a subnet or a NIC, not to a VNet directly — the Azure equivalent of an AWS security group, but rule priority (lower number = evaluated first, first match wins) is explicit and load-bearing here in a way AWS security groups don't require.