Skip to content

Commit 4375e14

Browse files
committed
[storage] add a section for creating storage account by using ARM
1 parent e9ee519 commit 4375e14

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

articles/storage/common/storage-quickstart-create-account.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ The button launches an interactive shell that you can use to run the steps in th
5151

5252
You can also install and use the Azure CLI locally. This quickstart requires that you are running the Azure CLI version 2.0.4 or later. Run `az --version` to find the version. If you need to install or upgrade, see [Install the Azure CLI](/cli/azure/install-azure-cli).
5353

54+
# [Template](#tab/template)
55+
56+
None.
57+
5458
---
5559

5660
## Log in to Azure
@@ -77,6 +81,10 @@ To log into your local installation of the CLI, run the login command:
7781
az login
7882
```
7983

84+
# [Template](#tab/template)
85+
86+
N/A
87+
8088
---
8189

8290
## Create a storage account
@@ -166,6 +174,27 @@ To create a general-purpose v2 storage account with zone-redundant storage (ZRS
166174
|Geo-redundant storage (GRS) |Standard_GRS |
167175
|Read-access geo-redundant storage (GRS) |Standard_RAGRS |
168176

177+
# [Template](#tab/template)
178+
179+
You can use either Azure Powershell or Azure CLI to deploy a template to create a storage account. The template used in this quickstart is from [Azure Quickstart templates](https://azure.microsoft.com/resources/templates/101-storage-account-create/). To run the scripts, select **Try it** to open Azure Cloud shell. To paste the script, right-click the shell, and then select **Paste**.
180+
181+
```azurepowershell-interactive
182+
$resourceGroupName = Read-Host -Prompt "Enter the Resource Group name"
183+
$location = Read-Host -Prompt "Enter the location (i.e. centralus)"
184+
185+
New-AzResourceGroup -Name $resourceGroupName -Location "$location"
186+
New-AzResourceGroupDeployment -ResourceGroupName $resourceGroupName -TemplateUri "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-storage-account-create/azuredeploy.json"
187+
```
188+
189+
```azurecli-interactive
190+
echo "Enter the Resource Group name:" &&
191+
read resourceGroupName &&
192+
echo "Enter the location (i.e. centralus):" &&
193+
read location &&
194+
az group create --name $resourceGroupName --location "$location" &&
195+
az group deployment create --resource-group $resourceGroupName --template-file "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-storage-account-create/azuredeploy.json"
196+
```
197+
169198
---
170199

171200
For more information about available replication options, see [Storage replication options](storage-redundancy.md).
@@ -198,6 +227,21 @@ To remove the resource group and its associated resources, including the new sto
198227
az group delete --name storage-quickstart-resource-group
199228
```
200229

230+
# [Template](#tab/template)
231+
232+
To remove the resource group and its associated resources, including the new storage account, use either Azure PowerShell or Azure CLI.
233+
234+
```azurepowershell-interactive
235+
$resourceGroupName = Read-Host -Prompt "Enter the Resource Group name"
236+
Remove-AzResourceGroup -Name $resourceGroupName
237+
```
238+
239+
```azurecli-interactive
240+
echo "Enter the Resource Group name:" &&
241+
read resourceGroupName &&
242+
az group delete --name $resourceGroupName
243+
```
244+
201245
---
202246

203247
## Next steps

0 commit comments

Comments
 (0)