Create an Azure Storage Account
This guide provides step-by-step instructions on how to create a new Azure Storage account using the Azure portal, Azure CLI, and Azure PowerShell. Storage accounts are essential for storing and accessing your Azure data objects, such as blobs, files, queues, and tables.
Prerequisites
- An Azure subscription. If you don't have one, create a free account.
- Permissions to create resources within your subscription.
Method 1: Using the Azure Portal
The Azure portal offers a user-friendly graphical interface for creating storage accounts.
- Sign in to the Azure portal.
- In the portal's search bar, type "Storage accounts" and select it from the results.
- On the "Storage accounts" page, click + Create.
-
On the "Basics" tab, provide the following information:
- Subscription: Select your Azure subscription.
- Resource group: Choose an existing resource group or click "Create new" to create a new one.
- Account name: Enter a unique name for your storage account.
- Region: Select the Azure region where you want to deploy the storage account.
- Performance: Choose between "Standard" (recommended for most scenarios) and "Premium".
- Redundancy: Select your desired data redundancy option (e.g., LRS, GRS, RA-GRS).
- Configure other settings as needed on the "Advanced", "Networking", "Data protection", and "Encryption" tabs. For most basic scenarios, the defaults are acceptable.
- Click Review + create to validate your settings.
- Once validation passes, click Create to begin the deployment.
Method 2: Using Azure CLI
The Azure Command-Line Interface (CLI) is a powerful tool for scripting and automating Azure resource management.
First, ensure you have the Azure CLI installed and logged in. Then, use the following command:
az storage account create \
--name <your-storage-account-name> \
--resource-group <your-resource-group-name> \
--location <your-region> \
--sku Standard_LRS \
--kind StorageV2
Replace the placeholders:
<your-storage-account-name>: Your globally unique storage account name.<your-resource-group-name>: The name of your resource group.<your-region>: The Azure region (e.g.,eastus,westeurope).
Method 3: Using Azure PowerShell
Azure PowerShell provides cmdlets for managing Azure resources.
First, ensure you have the Azure PowerShell module installed and are logged in. Then, use the following command:
New-AzStorageAccount `
-Name <your-storage-account-name> `
-ResourceGroupName <your-resource-group-name> `
-Location <your-region> `
-SkuName Standard_LRS `
-Kind StorageV2 `
-EnableHttpsTrafficOnly $true
Replace the placeholders as you would for the Azure CLI.
-EnableHttpsTrafficOnly $true parameter enforces this.