Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 7

Managing Azure Storage Accounts and Blob Containers

Recommended resources

Welcome to your second lesson on implementing Blob Storage solutions. In our previous session, we established the conceptual groundwork, covering storage account types, the critical trade-off between access tiers like Hot, Cool, and Archive, and how to automate tiering with lifecycle policies.

Today, we transition from theory to practice. This lesson is focused on the learning outcome: Create an Azure Storage Account and manage blob containers using the Azure Portal or CLI. You'll get hands-on experience provisioning the fundamental resources that house your blob data. Given your background in software engineering and Azure DevOps, we will cover not only the visual Azure Portal but also the more scriptable and automatable Azure Command-Line Interface (CLI), a tool that will feel very familiar and powerful.

1. Creating a Storage Account with the Azure Portal

The Azure Portal provides a guided, visual way to create resources. It's an excellent starting point for understanding all the configuration options available, many of which we discussed in the last lesson (like redundancy and performance tiers).

The video below offers a clear, step-by-step walkthrough of creating a storage account using the portal interface.

AZ-204 Exam EP 11: Solutions that uses Azure Blob Storage

This video from "A Guide To Cloud" demonstrates the entire process of creating a storage account in the Azure Portal.

Watch the detailed walkthrough from creating an account. Pay attention to the options presented on the "Basics" tab, such as choosing a resource group, providing a unique name, and selecting performance and redundancy levels.

For a more comprehensive reference that details every option across all the creation tabs (Basics, Advanced, Networking, etc.), the official Microsoft documentation is the definitive source.

Create an Azure storage account

This official Microsoft documentation provides a complete guide to creating a storage account via the portal.

Skim through the section titled "Create an Azure storage account with the Azure portal". You don't need to memorize every field, but notice how the options on the Basics, Data protection, and Advanced tabs map directly to the concepts (redundancy, soft delete, access tier) we covered in the last lesson.

Activity: Create Your First Storage Account

Now it's your turn.

  1. Navigate to the Azure Portal.
  2. Search for "Storage accounts" and click Create.
  3. On the Basics tab, configure the following:
    • Subscription: Select your Azure subscription.
    • Resource group: Create a new one named az204-storage-rg.
    • Storage account name: Enter a globally unique, lowercase name (e.g., az204storage followed by your initials and today's date, like az204storagexy20231027).
    • Region: Choose a region near you.
    • Performance: Keep it as Standard.
    • Redundancy: Select Locally-redundant storage (LRS) for this exercise.
  4. Click Review, and after validation passes, click Create.

Deployment will take a minute or two. Once complete, you will have your first storage account ready to use.


2. Managing Blob Containers in the Portal

With a storage account in place, the next step is to create a container within it. As we reviewed, a container acts like a folder for organizing your blobs.

Manage blob containers using the Azure portal

This guide shows how to create and manage containers within a storage account.

Read the section "Create a container". Focus on the container naming rules and the different Anonymous access level settings. For security, Private (no anonymous access) is almost always the correct choice unless you have a specific public-facing scenario.

Activity: Create a Container

  1. In the Azure Portal, navigate to the storage account you just created.
  2. In the left-hand menu, under Data storage, click on Containers.
  3. Click the + Container button.
  4. Name your container images.
  5. Set the Public access level to Private (no anonymous access).
  6. Click Create.

You have now successfully provisioned the basic structure for storing blobs using the Azure Portal.


3. Automating with the Azure CLI

While the portal is great for exploration, the Azure CLI is the tool of choice for automation, repeatability, and efficiency—principles central to DevOps. Given your experience, you'll likely find the CLI to be a more productive way to manage Azure resources.

First, let's understand why a command-line approach is so valuable.

Day-10 | Automate Azure Resources using Azure CLI | Command Line Interface | #freeazurecourse

This video by Abhishek Veeramalla provides an excellent justification for using the CLI over the portal, especially in a professional context.

Watch the section from Why use CLI?. The speaker's points on quick actions, automation, reducing errors, and sharing configurations as code will resonate with your development and DevOps background.

3.1. Setting Up the Azure CLI

If you don't have the Azure CLI installed, the following video and documentation walk you through the process for Windows, macOS, or Linux. The key steps are installation and then logging in to connect the CLI to your Azure account.

Day-10 | Automate Azure Resources using Azure CLI | Command Line Interface | #freeazurecourse

This segment shows you how to install the CLI and, most importantly, how to log in.

Watch the portion on installing and configuring the CLI. The crucial command is az login, which will open a browser for you to authenticate. After logging in, you can run az version to confirm the installation was successful.

3.2. Creating Resources with CLI Commands

With the CLI ready, we can now replicate what we did in the portal, but with a few simple commands. The process is the same: create a resource group, then a storage account, then a container.

The video below demonstrates these exact steps.

Day-10 | Automate Azure Resources using Azure CLI | Command Line Interface | #freeazurecourse

This video shows the practical application of the CLI for creating the resources we need.

Follow these steps shown in the video: First, watch how to create a resource group. Next, see how to create a storage account inside that resource group.

Activity: Use the CLI to Provision Storage

Now, open your preferred terminal (PowerShell, bash, or cmd) and run the following commands. Replace the storage account name with a new, unique name.

  1. Log in to Azure (if you haven't already):

    az login
    
  2. Create a new resource group for our CLI-based resources:

    az group create --name az204-storage-cli-rg --location "East US"
    
  3. Create a new storage account. Note how parameters like --sku and --kind map to the portal options.

    az storage account create \
      --name az204storagecli<your_initials> \
      --resource-group az204-storage-cli-rg \
      --location "East US" \
      --sku Standard_LRS \
      --kind StorageV2
    

    Make sure to replace az204storagecli<your_initials> with a unique name.

  4. Create a container within the new storage account. The command for this is az storage container create.

    az storage container create \
      --account-name az204storagecli<your_initials> \
      --name documents \
      --auth-mode login
    

    This command creates a container named documents and uses your logged-in Azure AD credentials for authorization.

After running these commands, you can go back to the Azure Portal to verify that the az204-storage-cli-rg resource group and its contents were created successfully. You've just accomplished in a few lines of scriptable text what previously required navigating through multiple UI screens.


Conclusion

In this lesson, you have successfully provisioned Azure Storage resources using both the user-friendly Azure Portal and the powerful Azure CLI. This fulfills a core requirement for the AZ-204 exam and gives you a practical foundation for all blob storage operations.

Here are your key takeaways:

  • The Azure Portal is ideal for visual exploration and configuring complex, one-off resources where you want to see all available options.
  • The Azure CLI is superior for automation, scripting, and repeatable infrastructure deployment, aligning perfectly with modern development and DevOps practices.
  • The fundamental resources—resource group, storage account, and container—can be created and managed using both tools. The CLI commands az group create, az storage account create, and az storage container create are your primary tools for this.

In our next lesson, we will build directly on what you've created today. You'll learn how to perform blob operations (create, upload, manage) on containers using the Azure SDK for .NET, connecting your C# skills to the cloud storage you've just provisioned.