ARM Template to Build vNet and Storage Account

{
“$schema”: http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#”,

“contentVersion”: “1.0.0.0”,

“parameters”: {

“storagetemplateType”: {

“type”: “string”,

“defaultValue”: “Standard_LRS”,

“allowedValues”: [

“Standard_LRS”,

“Standard_ZRS”,

“Standard_GRS”,

“Standard_RAGRS”,

“Premium_LRS”

]


},

“storagetemplatePrefixType”: {

“type”: “string”,

“minLength”: 1,

“defaultValue”: “tempstorage”
}

},
“variables”: {

“vnet-templatePrefix”: “10.0.0.0/16”,

“vnet-templateSubnet1Name”: “Subnet-1”,

“vnet-templateSubnet1Prefix”: “10.0.0.0/24”,

“vnet-templateSubnet2Name”: “Subnet-2”,

“vnet-templateSubnet2Prefix”: “10.0.1.0/24”,

“storagetemplateName”: “[concat(parameters(‘storagetemplateprefixtype’), uniqueString(resourceGroup().id))]”

},

“resources”: [

{
“name”: “vnet-template”,

“type”: “Microsoft.Network/virtualNetworks”,

“location”: “[resourceGroup().location]”,

“apiVersion”: “2015-06-15”,

“dependsOn”: [ ],

“tags”: {

“displayName”: “vnet-template”


},
“properties”: {

“addressSpace”: {

“addressPrefixes”: [

“[variables(‘vnet-templatePrefix’)]”

]

},
“subnets”: [

{
“name”: “[variables(‘vnet-templateSubnet1Name’)]”,

“properties”: {

“addressPrefix”: “[variables(‘vnet-templateSubnet1Prefix’)]”

}
},
{
“name”: “[variables(‘vnet-templateSubnet2Name’)]”,

“properties”: {

“addressPrefix”: “[variables(‘vnet-templateSubnet2Prefix’)]”

}

}

]

}

},

{
“name”: “[variables(‘storagetemplateName’)]”,

“type”: “Microsoft.Storage/storageAccounts”,

“location”: “[resourceGroup().location]”,

“apiVersion”: “2015-06-15”,

“dependsOn”: [ ],

“tags”: {

“displayName”: “[variables(‘storagetemplateName’)]”


},
“properties”: {

“accountType”: “[parameters(‘storagetemplateType’)]”


}

}

],
“outputs”: {



}

}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s