Skip to content

Instantly share code, notes, and snippets.

@JanneMattila
Created December 13, 2021 11:18
Show Gist options
  • Save JanneMattila/727f7282353d4ff6ce5d6fd7b16e9320 to your computer and use it in GitHub Desktop.
Save JanneMattila/727f7282353d4ff6ce5d6fd7b16e9320 to your computer and use it in GitHub Desktop.
Azure Storage Account create & delete demo
# Variables
resourceGroupName="rg-storage-demo-repeat"
# You can switch regions as you see fit
location="eastus"
#location="westeurope"
storageName="stor000000010"
# Create resource group for our demo
az group create --name $resourceGroupName --location $location
# Create storage account
az storage account create \
--name $storageName \
--resource-group $resourceGroupName \
--location $location \
--sku Standard_LRS \
--https-only \
-o table
# Delete storage account
az storage account delete \
--name $storageName \
--resource-group $resourceGroupName \
--yes
# List storage account
az storage account list --resource-group $resourceGroupName -o table
# Wipe out the resources
az group delete --name $resourceGroupName -y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment