Friday, September 9, 2016

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": {



}

}

No comments:

Post a Comment

Azure Policy support for remediating tags for existing resources

Use Azure policy to remediate tags for existing resources. https://azure.microsoft.com/en-us/updates/azure-provides-at-scale-tags-managem...