When creating a storage account in Azure, there are several tools you can use depending on your preferences and requirements.
Each tool offers different features, ease of use, and access methods.
Here are the primary tools available for creating a Storage Account in Azure.
Azure Portal (Web Interface)
The Azure Portal is the most user-friendly and visual tool for creating and managing Azure resources.
It's ideal for users who prefer a graphical user interface (GUI).
When to Use
New to Azure
If you are new to Azure or want an intuitive, step-by-step walkthrough.
Small to Medium Deployments
For small to medium-scale storage accounts or individual resource setups.
Quick Setup and Configuration
When you need a simple way to create and configure storage accounts with default settings.
Steps to Create a Storage Account via Azure Portal
Navigate to the Azure Portal.
Search for Storage Accounts in the top search bar and click on Storage Accounts.
Click on + Create.
Follow the wizard to specify Subscription, Resource Group, Storage Account Name, Region, Performance, and Replication options.
Review and click Create.
Azure CLI (Command-Line Interface)
The Azure CLI provides a powerful, scriptable way to create and manage Azure resources.
It’s ideal for users who prefer a command-line interface and need to automate or script the creation of resources.
When to Use
Automation & Scripting
When you need to create or manage multiple storage accounts or resources as part of a deployment script.
DevOps or CI/CD
If you need to integrate storage account creation into an automation pipeline.
Advanced Customization
If you are comfortable using CLI and need to perform advanced configurations not easily done through the Portal.
Example CLI Command to Create a Storage Account
xxxxxxxxxx
61az storage account create \
2--name <storage_account_name> \
3--resource-group <resource_group> \
4--location <region> \
5--sku Standard_LRS \
6--kind StorageV2
Azure PowerShell
Azure PowerShell is another scripting tool similar to Azure CLI but uses PowerShell cmdlets.
It’s ideal for Windows environments and when you prefer PowerShell scripting.
When to Use
Windows-based Users
If you're working in a Windows environment and are familiar with PowerShell.
Advanced Automation
Similar to Azure CLI, it’s useful for automating storage account creation or integrating into a pipeline.
More Granular Control
For complex PowerShell-based automation tasks or workflows.
Example PowerShell Command to Create a Storage Account
xxxxxxxxxx
61New-AzStorageAccount `
2-ResourceGroupName <resource_group> `
3-Name <storage_account_name> `
4-Location <region> `
5-Sku Standard_LRS `
6-Kind StorageV2
ARM Templates (Azure Resource Manager)
ARM templates are JSON-based files that allow you to define and deploy Azure resources in a declarative way.
They are useful for consistent, repeatable infrastructure deployment.
When to Use
Infrastructure as Code (IaC)
If you're building a DevOps pipeline or using Infrastructure as Code (IaC) practices for consistency.
Large-Scale Deployments
When you need to deploy complex or multi-resource Azure solutions with predefined configurations.
Reproducible Deployments
If you need to ensure environments are created in a consistent and repeatable manner across different regions or subscriptions.
Example ARM Template for a Storage Account
xxxxxxxxxx
171{
2"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
3"contentVersion": "1.0.0.0",
4"resources": [
5 {
6 "type": "Microsoft.Storage/storageAccounts",
7 "apiVersion": "2019-06-01",
8 "location": "<region>",
9 "properties": {
10 "sku": {
11 "name": "Standard_LRS"
12 },
13 "kind": "StorageV2"
14 },
15 "name": "<storage_account_name>"
16 }]
17}
Azure Resource Manager (ARM) API
For advanced developers, the ARM REST API allows you to create, configure, and manage Azure resources programmatically.
It’s useful for creating custom integrations or handling deployments outside of the standard tools.
When to Use
Custom Automation or Integration
If you want to integrate Azure resource management into custom applications or systems.
Programmatic Access
When you need to manage Azure resources directly from code or other automation tools.
Example API Request to Create a Storage Account
xxxxxxxxxx
11PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Storage/storageAccounts/{storage-account-name}?api-version=2019-06-01
Azure Bicep (Declarative Infrastructure as Code)
Azure Bicep is a simplified version of ARM templates.
It provides a more concise syntax and a better developer experience for defining Azure resources.
When to Use
Declarative IaC with a Simpler Syntax
If you prefer a cleaner, easier-to-read syntax than JSON-based ARM templates but still want declarative infrastructure deployment.
Repeatable Deployments
For teams building multi-resource environments or infrastructure that needs to be version-controlled.
Example Bicep Code for a Storage Account
xxxxxxxxxx
81resource storageAccount 'Microsoft.Storage/storageAccounts@2021-04-01' = {
2 name: '<storage_account_name>'
3 location: '<region>'
4 sku: {
5 name: 'Standard_LRS'
6 }
7 kind: 'StorageV2'
8}
Azure Blueprints
Azure Blueprints is a service for orchestrating the deployment of resources and governance policies together.
It is used to define and enforce compliance for multi-resource deployments.
When to Use
Compliance and Governance
If you need to deploy resources with specific policies, resource configurations, and roles as part of a larger, governed deployment.
Enterprise-Level Deployments
If your organization needs to ensure consistent deployment practices across multiple teams or departments.
Azure Storage Explorer
While Azure Storage Explorer is primarily used for managing storage accounts and resources (like blobs, files, etc.), it also allows you to create a storage account directly from the tool if you have the right permissions.
When to Use
If you're already using Azure Storage Explorer to manage Azure storage resources.
For quick tasks where you want to create a storage account and then manage it via the same tool.
Summary of When to Use Each Tool
Azure Portal: Best for beginners or quick, one-off tasks using a GUI.
Azure CLI: Ideal for automation, scripting, and creating resources from the command line.
Azure PowerShell: Best for PowerShell users, automation, and managing resources in Windows environments.
ARM Templates: For repeatable, declarative infrastructure deployment (Infrastructure as Code).
ARM API: For programmatically managing storage accounts via custom applications.
Azure Storage Explorer: Primarily for managing storage but can also create and configure accounts if needed.
Ultimately, the best tool will depend on your team's workflow, your familiarity with scripting, and whether you need a visual or programmatic approach.
Leave a Reply