########################################################################################## # These commands use files located in the current folder and should be executed locally. # Make sure you install Azure CLI http://aka.ms/azcli ########################################################################################## #create the resource group az group create -l eastus -n AzureBlobs-RG # To avoid name collisions generate the unique name for your account account=azureblobs$RANDOM #create an Azure Storage account az storage account create --name $account --resource-group AzureBlobs-RG #retrieve key key=$(az storage account keys list --account-name $account --query [0].value -o tsv) #Copy the connection string for further use. connectionString=$(az storage account show-connection-string --name $account --resource-group AzureBlobs-RG -o tsv) #create a storage container by using the key az storage container create --name products --public-access blob --account-name $account --account-key $key #upload the logo file from the local folder az storage blob upload --account-name $account --account-key $key --container-name products --file logo.png --name logo.png #list blobs az storage blob show --name logo.png --account-name $account --account-key $key --container-name products #list URL to copy-paste access from the browser echo https://$account.blob.core.windows.net/products/logo.png #echo account name and connection string echo $account echo $connectionString