Run the following commands on the cloud shell, or do over the GUI
- Fields in <> are arbitrary
- Create a Resource Group
New-AzResourceGroup -Name <name> -Location <region>
- Create a Storage Account
New-AzStorageAccount -ResourceGroupName <resourceGroupName> -Name <storageAccountName> -SkuName Standard_LRS -Location <region> -Kind StorageV2 -AccessTier Hot
- Get Storage Account Key
# Powershell Version >=1.4
$blobStorageAccountKey = (Get-AzStorageAccountKey -ResourceGroupName <resourceGroupName> -AccountName <storageAccountName>)| Where-Object {$_.KeyName -eq "key1"}
# Powershell Version <=1.3.2
$blobStorageAccountKey = (Get-AzStorageAccountKey -ResourceGroupName <resourceGroupName> -AccountName <storageAccountName>).Key1
- Create a storage context:
$blobStorageContext = New-AzStorageContext -StorageAccountName <storageAccountName> -StorageAccountKey $blobStorageAccountKey
- Use storage context to create new storage container:
New-AzStorageContainer -Name <containerName> -Context $blobStorageContext
Obtained in the setup process
- AZURE_STORAGE_ACCOUNT_NAME
- AZURE_STORAGE_ACCOUNT_ACCESS_KEY
- AZURE_CONTAINER_NAME