MultiCloud Classroom notes 27/Oct/2024

Azure Storage account cli

  • Install azure cli
  • azure cli reference Refer Here
  • login into azure az login
  • create a resource group
az group create -l eastus -n storagedemo


* Now lets create a storage account

az storage account create \
    --resource-group storagedemo \
    --name ltstoragefromcli \
    --location eastus \
    --allow-blob-public-access \
    --sku Standard_RAGRS

  • Now create a container
az storage container create \
    --name docs \
    --account-name "ltstoragefromcli" \
    --public-access "blob" \
    --resource-group storagedemo

  • Upload a blob
az storage blob upload \
    --account-name "ltstoragefromcli" \
    --container-name "docs" \
    --file 1.txt
  • Upload or sync a folder
az storage blob upload-batch \
    --account-name "ltstoragefromcli" \
    --destination "docs" \
    --source "."

  • Upload a website to a new container called as test
az storage blob service-properties update `
--account-name "ltstoragefromcli" `
--static-website `
--index-document index.html

az storage blob upload-batch `
    --account-name "ltstoragefromcli" `
    --source . `
    --destination '$web'
  • delete the blob
  • delete the contianer
  • delete the storage account
  • delete the resource group
az group delete --name storagedemo --yes
Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a ReplyCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Animated Social Media Icons by Acurax Responsive Web Designing Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Exit mobile version
%%footer%%