Azure Storage Documentation

Create an Azure Storage Account

This guide will walk you through the process of creating a new Azure Storage account using the Azure portal, Azure CLI, and Azure PowerShell.

An Azure storage account provides a unique namespace in Azure for your data objects. All objects that you store in an Azure Storage account have names that are unique within that storage account.

Prerequisites

Method 1: Using the Azure Portal

The Azure portal offers a user-friendly graphical interface for managing Azure resources.

1

Sign in to the Azure Portal

Open your web browser and navigate to https://portal.azure.com/. Sign in with your Azure account credentials.

2

Navigate to Storage Accounts

In the Azure portal, search for "Storage accounts" in the search bar at the top and select it from the results.

3

Create a New Storage Account

Click the "Create" button on the Storage accounts page.

Azure Portal - Create Storage Account Button
4

Configure Basic Settings

On the "Create a storage account" page, fill in the following details on the Basics tab:

  • Subscription: Select your Azure subscription.
  • Resource group: Choose an existing resource group or create a new one. Resource groups help organize your Azure resources.
  • Storage account name: Enter a globally unique name for your storage account. This name will be part of the storage account's endpoint URL (e.g., mystorageaccount.blob.core.windows.net). It must be between 3 and 24 characters and can contain only lowercase letters and numbers.
  • Region: Select the Azure region where you want to deploy your storage account.
  • Performance: Choose between Standard (for most general-purpose scenarios) and Premium (for high-performance scenarios, with SSD-based storage).
  • Redundancy: Select the data redundancy option (e.g., Locally-redundant storage (LRS), Geo-redundant storage (GRS)).
5

Configure Advanced Settings (Optional)

Navigate to the Advanced tab to configure options like:

  • Access tier (Hot/Cool)
  • Networking options
  • Data protection settings
  • Encryption settings

For most basic use cases, the default advanced settings are sufficient.

6

Review and Create

Click the "Review + create" button. Azure will validate your configuration. Once validation passes, click "Create" to deploy your storage account.

Method 2: Using Azure CLI

The Azure Command-Line Interface (CLI) is a powerful tool for managing Azure resources from your terminal.

Ensure you have the Azure CLI installed and are logged into your Azure account (`az login`).

To create a storage account, use the following command:


az storage account create \
    --name  \
    --resource-group  \
    --location  \
    --sku Standard_LRS \
    --kind StorageV2
        

Replace the placeholders:

You can find a list of available locations with az account list-locations -o table.

Method 3: Using Azure PowerShell

Azure PowerShell provides a robust scripting environment for managing Azure services.

Ensure you have the Azure PowerShell module installed and are connected to your Azure account (`Connect-AzAccount`).

To create a storage account, use the following cmdlets:


# Define variables
$storageAccountName = ""
$resourceGroupName = ""
$location = ""
$skuName = "Standard_LRS" # Or Standard_GRS, Premium_LRS, etc.
$kind = "StorageV2"     # General-purpose v2 is recommended

# Create the resource group if it doesn't exist
New-AzResourceGroup -Name $resourceGroupName -Location $location -Force

# Create the storage account
New-AzStorageAccount `
    -Name $storageAccountName `
    -ResourceGroupName $resourceGroupName `
    -Location $location `
    -SkuName $skuName `
    -Kind $kind `
    -EnableHttpsTrafficOnly $true
        

Replace the placeholders with your specific details.

Choosing the correct performance tier (Standard vs. Premium) and redundancy option (LRS, GRS, ZRS) is crucial for meeting your application's availability and performance requirements. Consider your workload and cost implications carefully.