Description
stringlengths
19
200
IaC
stringlengths
128
8.16k
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"apiversion": "2015-01-01", "type": "microsoft.resources/deployments", "name": "vnet", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('templateurlvnet')]", "contentversion": "1.0.0.0"}, "parameters": {"location": {"value": "[parameters('location')]"}, "vnetname": {"value": "[parameters('existingvnetname')]"}, "vnetresourcegroup": {"value": "[parameters('existingvnetresourcegroup')]"}, "vnetaddressprefix": {"value": "[parameters('vnetaddressprefix')]"}, "subnetserversname": {"value": "[parameters('subnetserversname')]"}, "subnetserversaddressprefix": {"value": "[parameters('subnetserversaddressprefix')]"}, "subnetclientsname": {"value": "[parameters('subnetclientsname')]"}, "subnetclientsaddressprefix": {"value": "[parameters('subnetclientsaddressprefix')]"}}}}{"apiversion": "2015-01-01", "type": "microsoft.resources/deployments", "name": "monitoring", "dependson": ["[concat('microsoft.compute/virtualmachines/", concat(parameters('vmnameprefix'), "oss0", "/extensions/init'))]"], "properties": {"mode": "incremental", "templatelink": {"contentversion": "1.0.0.0", "uri": "[variables('templateurlmonitoring')]"}, "parameters": {"location": {"value": "[parameters('location')]"}, "vmnameprefix": {"value": "[parameters('vmnameprefix')]"}, "osscount": {"value": "[parameters('osscount')]"}, "filesystemname": {"value": "[parameters('filesystemname')]"}, "scripturlmonitoring": {"value": "[variables('scripturlmonitoring')]"}, "mgsip": {"value": "[reference(resourceid('microsoft.network/networkinterfaces", concat(parameters('vmnameprefix'), "mgs'))).ipconfigurations[0].properties.privateipaddress]"}, "mdsip0": {"value": "[reference(resourceid('microsoft.network/networkinterfaces", concat(parameters('vmnameprefix'), "mds'))).ipconfigurations[0].properties.privateipaddress]"}, "ossip0": {"value": "[reference(resourceid('microsoft.network/networkinterfaces", concat(parameters('vmnameprefix'), "oss0'))).ipconfigurations[0].properties.privateipaddress]"}}}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2015-06-15", "type": "microsoft.network/publicipaddresses", "name": "[concat(parameters('vmnameprefix'),"mgs')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic", "idletimeoutinminutes": 4, "dnssettings": {"domainnamelabel": "[concat(parameters('dnsnameprefix'),"')]"}}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2015-06-15", "type": "microsoft.network/publicipaddresses", "name": "[concat(parameters('vmnameprefix'),"mgs')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic", "idletimeoutinminutes": 4, "dnssettings": {"domainnamelabel": "[concat(parameters('dnsnameprefix'),"')]"}}}{"apiversion": "2015-06-15", "type": "microsoft.network/networkinterfaces", "name": "[concat(parameters('vmnameprefix'),"mgs')]", "location": "[parameters('location')]", "dependson": ["[concat('microsoft.resources/deployments/", "vnet')]", "[concat('microsoft.network/publicipaddresses/", concat(parameters('vmnameprefix'),"mgs'))]"], "properties": {"ipconfigurations": [{"name": "ip1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", concat(parameters('vmnameprefix'), "mgs'))]"}, "subnet": {"id": "[variables('subnetserversid')]"}}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2015-06-15", "type": "microsoft.network/publicipaddresses", "name": "[concat(parameters('vmnameprefix'),"mgs')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic", "idletimeoutinminutes": 4, "dnssettings": {"domainnamelabel": "[concat(parameters('dnsnameprefix'),"')]"}}}{"apiversion": "2015-06-15", "type": "microsoft.network/networkinterfaces", "name": "[concat(parameters('vmnameprefix'),"mgs')]", "location": "[parameters('location')]", "dependson": ["[concat('microsoft.resources/deployments/", "vnet')]", "[concat('microsoft.network/publicipaddresses/", concat(parameters('vmnameprefix'),"mgs'))]"], "properties": {"ipconfigurations": [{"name": "ip1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", concat(parameters('vmnameprefix'), "mgs'))]"}, "subnet": {"id": "[variables('subnetserversid')]"}}}]}}{"apiversion": "2015-06-15", "type": "microsoft.network/networkinterfaces", "name": "[concat(parameters('vmnameprefix'),"mds')]", "location": "[parameters('location')]", "dependson": ["[concat('microsoft.resources/deployments/", "vnet')]", "[concat('microsoft.network/networkinterfaces/", parameters('vmnameprefix'), "mgs')]"], "properties": {"ipconfigurations": [{"name": "ip1", "properties": {"privateipallocationmethod": "dynamic", "subnet": {"id": "[variables('subnetserversid')]"}}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2015-06-15", "type": "microsoft.network/publicipaddresses", "name": "[concat(parameters('vmnameprefix'),"mgs')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic", "idletimeoutinminutes": 4, "dnssettings": {"domainnamelabel": "[concat(parameters('dnsnameprefix'),"')]"}}}{"apiversion": "2015-06-15", "type": "microsoft.network/networkinterfaces", "name": "[concat(parameters('vmnameprefix'),"mgs')]", "location": "[parameters('location')]", "dependson": ["[concat('microsoft.resources/deployments/", "vnet')]", "[concat('microsoft.network/publicipaddresses/", concat(parameters('vmnameprefix'),"mgs'))]"], "properties": {"ipconfigurations": [{"name": "ip1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", concat(parameters('vmnameprefix'), "mgs'))]"}, "subnet": {"id": "[variables('subnetserversid')]"}}}]}}{"apiversion": "2015-06-15", "type": "microsoft.network/networkinterfaces", "name": "[concat(parameters('vmnameprefix'),"mds')]", "location": "[parameters('location')]", "dependson": ["[concat('microsoft.resources/deployments/", "vnet')]", "[concat('microsoft.network/networkinterfaces/", parameters('vmnameprefix'), "mgs')]"], "properties": {"ipconfigurations": [{"name": "ip1", "properties": {"privateipallocationmethod": "dynamic", "subnet": {"id": "[variables('subnetserversid')]"}}}]}}{"apiversion": "2015-06-15", "type": "microsoft.network/networkinterfaces", "name": "[concat(parameters('vmnameprefix'), "oss", copyindex())]", "location": "[parameters('location')]", "dependson": ["[concat('microsoft.resources/deployments/", "vnet')]", "[concat('microsoft.network/networkinterfaces/", parameters('vmnameprefix'), "mds')]"], "copy": {"name": "ossniccopy", "count": "[parameters('osscount')]"}, "properties": {"ipconfigurations": [{"name": "ip1", "properties": {"privateipallocationmethod": "dynamic", "subnet": {"id": "[variables('subnetserversid')]"}}}]}}{"apiversion": "2015-06-15", "type": "microsoft.network/publicipaddresses", "name": "[concat(parameters('clientvmnameprefix'),"client0')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic", "idletimeoutinminutes": 4, "dnssettings": {"domainnamelabel": "[concat(parameters('dnsnameprefixforclient'),"')]"}}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2015-06-15", "type": "microsoft.network/publicipaddresses", "name": "[concat(parameters('vmnameprefix'),"mgs')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic", "idletimeoutinminutes": 4, "dnssettings": {"domainnamelabel": "[concat(parameters('dnsnameprefix'),"')]"}}}{"apiversion": "2015-06-15", "type": "microsoft.network/networkinterfaces", "name": "[concat(parameters('vmnameprefix'),"mgs')]", "location": "[parameters('location')]", "dependson": ["[concat('microsoft.resources/deployments/", "vnet')]", "[concat('microsoft.network/publicipaddresses/", concat(parameters('vmnameprefix'),"mgs'))]"], "properties": {"ipconfigurations": [{"name": "ip1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", concat(parameters('vmnameprefix'), "mgs'))]"}, "subnet": {"id": "[variables('subnetserversid')]"}}}]}}{"apiversion": "2015-06-15", "type": "microsoft.network/networkinterfaces", "name": "[concat(parameters('vmnameprefix'),"mds')]", "location": "[parameters('location')]", "dependson": ["[concat('microsoft.resources/deployments/", "vnet')]", "[concat('microsoft.network/networkinterfaces/", parameters('vmnameprefix'), "mgs')]"], "properties": {"ipconfigurations": [{"name": "ip1", "properties": {"privateipallocationmethod": "dynamic", "subnet": {"id": "[variables('subnetserversid')]"}}}]}}{"apiversion": "2015-06-15", "type": "microsoft.network/networkinterfaces", "name": "[concat(parameters('vmnameprefix'), "oss", copyindex())]", "location": "[parameters('location')]", "dependson": ["[concat('microsoft.resources/deployments/", "vnet')]", "[concat('microsoft.network/networkinterfaces/", parameters('vmnameprefix'), "mds')]"], "copy": {"name": "ossniccopy", "count": "[parameters('osscount')]"}, "properties": {"ipconfigurations": [{"name": "ip1", "properties": {"privateipallocationmethod": "dynamic", "subnet": {"id": "[variables('subnetserversid')]"}}}]}}{"apiversion": "2015-06-15", "type": "microsoft.network/publicipaddresses", "name": "[concat(parameters('clientvmnameprefix'),"client0')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic", "idletimeoutinminutes": 4, "dnssettings": {"domainnamelabel": "[concat(parameters('dnsnameprefixforclient'),"')]"}}}{"apiversion": "2015-06-15", "type": "microsoft.network/networkinterfaces", "name": "[concat(parameters('clientvmnameprefix'), "client0')]", "location": "[parameters('location')]", "dependson": ["[concat('microsoft.network/publicipaddresses/", parameters('clientvmnameprefix'), "client0')]"], "properties": {"ipconfigurations": [{"name": "ip1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", concat(parameters('clientvmnameprefix'), "client0'))]"}, "subnet": {"id": "[variables('subnetclientsid1')]"}}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2015-06-15", "type": "microsoft.network/publicipaddresses", "name": "[concat(parameters('vmnameprefix'),"mgs')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic", "idletimeoutinminutes": 4, "dnssettings": {"domainnamelabel": "[concat(parameters('dnsnameprefix'),"')]"}}}{"apiversion": "2015-06-15", "type": "microsoft.network/networkinterfaces", "name": "[concat(parameters('vmnameprefix'),"mgs')]", "location": "[parameters('location')]", "dependson": ["[concat('microsoft.resources/deployments/", "vnet')]", "[concat('microsoft.network/publicipaddresses/", concat(parameters('vmnameprefix'),"mgs'))]"], "properties": {"ipconfigurations": [{"name": "ip1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", concat(parameters('vmnameprefix'), "mgs'))]"}, "subnet": {"id": "[variables('subnetserversid')]"}}}]}}{"apiversion": "2015-06-15", "type": "microsoft.network/networkinterfaces", "name": "[concat(parameters('vmnameprefix'),"mds')]", "location": "[parameters('location')]", "dependson": ["[concat('microsoft.resources/deployments/", "vnet')]", "[concat('microsoft.network/networkinterfaces/", parameters('vmnameprefix'), "mgs')]"], "properties": {"ipconfigurations": [{"name": "ip1", "properties": {"privateipallocationmethod": "dynamic", "subnet": {"id": "[variables('subnetserversid')]"}}}]}}{"apiversion": "2015-06-15", "type": "microsoft.network/networkinterfaces", "name": "[concat(parameters('vmnameprefix'), "oss", copyindex())]", "location": "[parameters('location')]", "dependson": ["[concat('microsoft.resources/deployments/", "vnet')]", "[concat('microsoft.network/networkinterfaces/", parameters('vmnameprefix'), "mds')]"], "copy": {"name": "ossniccopy", "count": "[parameters('osscount')]"}, "properties": {"ipconfigurations": [{"name": "ip1", "properties": {"privateipallocationmethod": "dynamic", "subnet": {"id": "[variables('subnetserversid')]"}}}]}}{"apiversion": "2015-06-15", "type": "microsoft.network/publicipaddresses", "name": "[concat(parameters('clientvmnameprefix'),"client0')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic", "idletimeoutinminutes": 4, "dnssettings": {"domainnamelabel": "[concat(parameters('dnsnameprefixforclient'),"')]"}}}{"apiversion": "2015-06-15", "type": "microsoft.network/networkinterfaces", "name": "[concat(parameters('clientvmnameprefix'), "client0')]", "location": "[parameters('location')]", "dependson": ["[concat('microsoft.network/publicipaddresses/", parameters('clientvmnameprefix'), "client0')]"], "properties": {"ipconfigurations": [{"name": "ip1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", concat(parameters('clientvmnameprefix'), "client0'))]"}, "subnet": {"id": "[variables('subnetclientsid1')]"}}}]}}{"apiversion": "2015-06-15", "type": "microsoft.network/networkinterfaces", "name": "[concat(parameters('clientvmnameprefix'), "client", copyindex(1))]", "location": "[parameters('location')]", "copy": {"name": "clientniccopy", "count": "[sub(parameters('clientcount'),1)]"}, "properties": {"ipconfigurations": [{"name": "ip1", "properties": {"privateipallocationmethod": "dynamic", "subnet": {"id": "[variables('subnetclientsid1')]"}}}]}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2020-12-01", "type": "microsoft.compute/availabilitysets", "name": "[variables('clientavailabilitysetsettings').name]", "location": "[parameters('location')]", "sku": {"name": "aligned"}, "properties": {"platformfaultdomaincount": "[variables('clientavailabilitysetsettings').faultdomaincount]", "platformupdatedomaincount": "[variables('clientavailabilitysetsettings').updatedomaincount]"}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2020-12-01", "type": "microsoft.compute/availabilitysets", "name": "[variables('clientavailabilitysetsettings').name]", "location": "[parameters('location')]", "sku": {"name": "aligned"}, "properties": {"platformfaultdomaincount": "[variables('clientavailabilitysetsettings').faultdomaincount]", "platformupdatedomaincount": "[variables('clientavailabilitysetsettings').updatedomaincount]"}}{"apiversion": "2020-12-01", "type": "microsoft.compute/virtualmachines", "name": "[concat(parameters('vmnameprefix'), "client", copyindex())]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts/", variables('storageaccountname'))]", "[resourceid('microsoft.compute/availabilitysets/", variables('clientavailabilitysetsettings').name)]", "[resourceid('microsoft.network/networkinterfaces/", concat(parameters('vmnameprefix'), "client", copyindex()))]"], "copy": {"name": "clientvmcopy", "count": "[parameters('clientcount')]"}, "tags": {"lustretype": "client"}, "properties": {"availabilityset": {"id": "[resourceid('microsoft.compute/availabilitysets", variables('clientavailabilitysetsettings').name)]"}, "hardwareprofile": {"vmsize": "[parameters('clientvmsize')]"}, "osprofile": {"computername": "[concat(parameters('vmnameprefix'), "client", copyindex())]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": "[variables('ostype')]", "osdisk": {"name": "[concat(parameters('vmnameprefix'), "client", copyindex(),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",concat(parameters('vmnameprefix'), "client", copyindex()))]"}]}}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2020-12-01", "type": "microsoft.compute/availabilitysets", "name": "[variables('clientavailabilitysetsettings').name]", "location": "[parameters('location')]", "sku": {"name": "aligned"}, "properties": {"platformfaultdomaincount": "[variables('clientavailabilitysetsettings').faultdomaincount]", "platformupdatedomaincount": "[variables('clientavailabilitysetsettings').updatedomaincount]"}}{"apiversion": "2020-12-01", "type": "microsoft.compute/virtualmachines", "name": "[concat(parameters('vmnameprefix'), "client", copyindex())]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts/", variables('storageaccountname'))]", "[resourceid('microsoft.compute/availabilitysets/", variables('clientavailabilitysetsettings').name)]", "[resourceid('microsoft.network/networkinterfaces/", concat(parameters('vmnameprefix'), "client", copyindex()))]"], "copy": {"name": "clientvmcopy", "count": "[parameters('clientcount')]"}, "tags": {"lustretype": "client"}, "properties": {"availabilityset": {"id": "[resourceid('microsoft.compute/availabilitysets", variables('clientavailabilitysetsettings').name)]"}, "hardwareprofile": {"vmsize": "[parameters('clientvmsize')]"}, "osprofile": {"computername": "[concat(parameters('vmnameprefix'), "client", copyindex())]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": "[variables('ostype')]", "osdisk": {"name": "[concat(parameters('vmnameprefix'), "client", copyindex(),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",concat(parameters('vmnameprefix'), "client", copyindex()))]"}]}}}{"apiversion": "2020-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmnameprefix'), "client", copyindex(), "/init')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", concat(parameters('vmnameprefix'),"client",copyindex()))]"], "copy": {"name": "clientextensionscopy", "count": "[parameters('clientcount')]"}, "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"fileuris": ["[variables('scripturllustreclient')]"], "commandtoexecute": "[concat('bash lustre_client.sh -n clientcentos", parameters('imagesku'), " -i ", copyindex(), " -d 0", " -m ", parameters('mgsipaddress'), " -l ", reference(resourceid('microsoft.network/networkinterfaces", concat(parameters('vmnameprefix'), "client", copyindex()))).ipconfigurations[0].properties.privateipaddress, " -f ", parameters('filesystemname'))]"}}}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"apiversion": "2021-01-01", "type": "microsoft.storage/storageaccounts", "name": "[variables('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('storageaccounttype')]"}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"apiversion": "2020-12-01", "type": "microsoft.compute/availabilitysets", "name": "[variables('clientavailabilitysetsettings').name]", "location": "[parameters('location')]", "sku": {"name": "aligned"}, "properties": {"platformfaultdomaincount": "[variables('clientavailabilitysetsettings').faultdomaincount]", "platformupdatedomaincount": "[variables('clientavailabilitysetsettings').updatedomaincount]"}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"apiversion": "2020-12-01", "type": "microsoft.compute/availabilitysets", "name": "[variables('clientavailabilitysetsettings').name]", "location": "[parameters('location')]", "sku": {"name": "aligned"}, "properties": {"platformfaultdomaincount": "[variables('clientavailabilitysetsettings').faultdomaincount]", "platformupdatedomaincount": "[variables('clientavailabilitysetsettings').updatedomaincount]"}}{"apiversion": "2020-12-01", "type": "microsoft.compute/virtualmachines", "name": "[concat(parameters('vmnameprefix'), "client", copyindex())]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts/", variables('storageaccountname'))]", "[resourceid('microsoft.compute/availabilitysets/", variables('clientavailabilitysetsettings').name)]", "[resourceid('microsoft.network/networkinterfaces/", concat(parameters('vmnameprefix'), "client", copyindex()))]"], "copy": {"name": "clientvmcopy", "count": "[parameters('clientcount')]"}, "tags": {"lustretype": "client"}, "properties": {"availabilityset": {"id": "[resourceid('microsoft.compute/availabilitysets", variables('clientavailabilitysetsettings').name)]"}, "hardwareprofile": {"vmsize": "[parameters('clientvmsize')]"}, "osprofile": {"computername": "[concat(parameters('vmnameprefix'), "client", copyindex())]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": "[variables('ostype')]", "osdisk": {"name": "[concat(parameters('vmnameprefix'), "client", copyindex(),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",concat(parameters('vmnameprefix'), "client", copyindex()))]"}]}}}
Storage Account with Storage Service Encryption and a blob deletion retention policy
{"apiversion": "2021-01-01", "type": "microsoft.storage/storageaccounts", "name": "[variables('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('storageaccounttype')]"}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-07-01", "type": "microsoft.network/publicipaddresses", "name": "[concat(parameters('vmnameprefix'),"client0')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic", "idletimeoutinminutes": 4, "dnssettings": {"domainnamelabel": "[concat(parameters('dnsnameprefix'),"')]"}}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-07-01", "type": "microsoft.network/publicipaddresses", "name": "[concat(parameters('vmnameprefix'),"client0')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic", "idletimeoutinminutes": 4, "dnssettings": {"domainnamelabel": "[concat(parameters('dnsnameprefix'),"')]"}}}{"apiversion": "2020-07-01", "type": "microsoft.network/networkinterfaces", "name": "[concat(parameters('vmnameprefix'), "client0')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/publicipaddresses/", concat(parameters('vmnameprefix'), "client0'))]"], "properties": {"ipconfigurations": [{"name": "ip1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", concat(parameters('vmnameprefix'), "client0'))]"}, "subnet": {"id": "[resourceid(parameters('existingvnetresourcegroupname'), "microsoft.network/virtualnetworks/subnets", parameters('existingvnetname'), parameters('existingsubnetclientsname'))]"}}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-07-01", "type": "microsoft.network/publicipaddresses", "name": "[concat(parameters('vmnameprefix'),"client0')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic", "idletimeoutinminutes": 4, "dnssettings": {"domainnamelabel": "[concat(parameters('dnsnameprefix'),"')]"}}}{"apiversion": "2020-07-01", "type": "microsoft.network/networkinterfaces", "name": "[concat(parameters('vmnameprefix'), "client0')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/publicipaddresses/", concat(parameters('vmnameprefix'), "client0'))]"], "properties": {"ipconfigurations": [{"name": "ip1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", concat(parameters('vmnameprefix'), "client0'))]"}, "subnet": {"id": "[resourceid(parameters('existingvnetresourcegroupname'), "microsoft.network/virtualnetworks/subnets", parameters('existingvnetname'), parameters('existingsubnetclientsname'))]"}}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/networkinterfaces", "name": "[concat(parameters('vmnameprefix'), "client", copyindex(1))]", "location": "[parameters('location')]", "copy": {"name": "clientniccopy", "count": "[sub(parameters('clientcount'),1)]"}, "properties": {"ipconfigurations": [{"name": "ip1", "properties": {"privateipallocationmethod": "dynamic", "subnet": {"id": "[resourceid(parameters('existingvnetresourcegroupname'), "microsoft.network/virtualnetworks/subnets", parameters('existingvnetname'), parameters('existingsubnetclientsname'))]"}}}]}}
Application Gateway routing Internet traffic to a virtual network (internal mode) API Management instance which services a web API hosted in an Azure Web App.
{"type": "microsoft.web/serverfarms", "apiversion": "2020-06-01", "name": "[parameters('hostingplanlivesite')]", "location": "[parameters('location')]", "tags": {"displayname": "hostingplan"}, "sku": {"name": "[parameters('pricingtierlivesite')]", "capacity": 1}, "properties": {"name": "[parameters('hostingplanlivesite')]"}}
Application Gateway routing Internet traffic to a virtual network (internal mode) API Management instance which services a web API hosted in an Azure Web App.
{"type": "microsoft.web/serverfarms", "apiversion": "2020-06-01", "name": "[parameters('hostingplanlivesite')]", "location": "[parameters('location')]", "tags": {"displayname": "hostingplan"}, "sku": {"name": "[parameters('pricingtierlivesite')]", "capacity": 1}, "properties": {"name": "[parameters('hostingplanlivesite')]"}}{"type": "microsoft.web/sites", "apiversion": "2020-06-01", "name": "[parameters('livesitename')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/serverfarms", parameters('hostingplanlivesite'))]", "[resourceid('microsoft.insights/components", parameters('livesitename'))]"], "tags": {"[format('{0}:{1}", "hidden-related", resourceid('microsoft.web/serverfarms", parameters('hostingplanlivesite')))]": "empty", "displayname": "website"}, "properties": {"name": "[parameters('livesitename')]", "serverfarmid": "[resourceid('microsoft.web/serverfarms", parameters('hostingplanlivesite'))]", "mintlsversion": "1.2", "siteconfig": {"connectionstrings": [{"name": "cmsconnectionstring", "connectionstring": "[if(empty(parameters('connectionstringdatabasename')),"",concat('data source=tcp:", reference(resourceid('microsoft.sql/servers", parameters('sqlservername'))).fullyqualifieddomainname, ",1433;initial catalog=", parameters('connectionstringdatabasename'), ";user id=", parameters('sqladministratorlogin'), "@", parameters('sqlservername'), ";password=", parameters('sqladministratorpassword'), ";'))]", "type": "sqlserver"}], "appsettings": [{"name": "appinsights_instrumentationkey", "value": "[reference(variables('instrumentationkey')).instrumentationkey]"}]}}}
Application Gateway routing Internet traffic to a virtual network (internal mode) API Management instance which services a web API hosted in an Azure Web App.
{"type": "microsoft.web/serverfarms", "apiversion": "2020-06-01", "name": "[parameters('hostingplanlivesite')]", "location": "[parameters('location')]", "tags": {"displayname": "hostingplan"}, "sku": {"name": "[parameters('pricingtierlivesite')]", "capacity": 1}, "properties": {"name": "[parameters('hostingplanlivesite')]"}}{"type": "microsoft.web/sites", "apiversion": "2020-06-01", "name": "[parameters('livesitename')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/serverfarms", parameters('hostingplanlivesite'))]", "[resourceid('microsoft.insights/components", parameters('livesitename'))]"], "tags": {"[format('{0}:{1}", "hidden-related", resourceid('microsoft.web/serverfarms", parameters('hostingplanlivesite')))]": "empty", "displayname": "website"}, "properties": {"name": "[parameters('livesitename')]", "serverfarmid": "[resourceid('microsoft.web/serverfarms", parameters('hostingplanlivesite'))]", "mintlsversion": "1.2", "siteconfig": {"connectionstrings": [{"name": "cmsconnectionstring", "connectionstring": "[if(empty(parameters('connectionstringdatabasename')),"",concat('data source=tcp:", reference(resourceid('microsoft.sql/servers", parameters('sqlservername'))).fullyqualifieddomainname, ",1433;initial catalog=", parameters('connectionstringdatabasename'), ";user id=", parameters('sqladministratorlogin'), "@", parameters('sqlservername'), ";password=", parameters('sqladministratorpassword'), ";'))]", "type": "sqlserver"}], "appsettings": [{"name": "appinsights_instrumentationkey", "value": "[reference(variables('instrumentationkey')).instrumentationkey]"}]}}}{"type": "microsoft.web/serverfarms", "apiversion": "2020-06-01", "name": "[parameters('hostingplanadministration')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('pricingtieradministration')]", "capacity": 1}, "tags": {"displayname": "hostingplan"}, "properties": {"name": "[parameters('hostingplanadministration')]"}}
Application Gateway routing Internet traffic to a virtual network (internal mode) API Management instance which services a web API hosted in an Azure Web App.
{"type": "microsoft.web/serverfarms", "apiversion": "2020-06-01", "name": "[parameters('hostingplanlivesite')]", "location": "[parameters('location')]", "tags": {"displayname": "hostingplan"}, "sku": {"name": "[parameters('pricingtierlivesite')]", "capacity": 1}, "properties": {"name": "[parameters('hostingplanlivesite')]"}}{"type": "microsoft.web/sites", "apiversion": "2020-06-01", "name": "[parameters('livesitename')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/serverfarms", parameters('hostingplanlivesite'))]", "[resourceid('microsoft.insights/components", parameters('livesitename'))]"], "tags": {"[format('{0}:{1}", "hidden-related", resourceid('microsoft.web/serverfarms", parameters('hostingplanlivesite')))]": "empty", "displayname": "website"}, "properties": {"name": "[parameters('livesitename')]", "serverfarmid": "[resourceid('microsoft.web/serverfarms", parameters('hostingplanlivesite'))]", "mintlsversion": "1.2", "siteconfig": {"connectionstrings": [{"name": "cmsconnectionstring", "connectionstring": "[if(empty(parameters('connectionstringdatabasename')),"",concat('data source=tcp:", reference(resourceid('microsoft.sql/servers", parameters('sqlservername'))).fullyqualifieddomainname, ",1433;initial catalog=", parameters('connectionstringdatabasename'), ";user id=", parameters('sqladministratorlogin'), "@", parameters('sqlservername'), ";password=", parameters('sqladministratorpassword'), ";'))]", "type": "sqlserver"}], "appsettings": [{"name": "appinsights_instrumentationkey", "value": "[reference(variables('instrumentationkey')).instrumentationkey]"}]}}}{"type": "microsoft.web/serverfarms", "apiversion": "2020-06-01", "name": "[parameters('hostingplanadministration')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('pricingtieradministration')]", "capacity": 1}, "tags": {"displayname": "hostingplan"}, "properties": {"name": "[parameters('hostingplanadministration')]"}}{"type": "microsoft.web/sites", "apiversion": "2020-06-01", "name": "[parameters('administrationsitename')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/serverfarms", parameters('hostingplanadministration'))]"], "tags": {"[format('{0}:{1}", "hidden-related", resourceid('microsoft.web/serverfarms", parameters('hostingplanadministration')))]": "resource", "displayname": "administration"}, "properties": {"name": "[parameters('administrationsitename')]", "serverfarmid": "[resourceid('microsoft.web/serverfarms", parameters('hostingplanadministration'))]", "mintlsversion": "1.2", "siteconfig": {"connectionstrings": [{"name": "cmsconnectionstring", "connectionstring": "[if(empty(parameters('connectionstringdatabasename')),"",concat('data source=tcp:", reference(resourceid('microsoft.sql/servers/", parameters('sqlservername'))).fullyqualifieddomainname, ",1433;initial catalog=", parameters('connectionstringdatabasename'), ";user id=", parameters('sqladministratorlogin'), "@", parameters('sqlservername'), ";password=", parameters('sqladministratorpassword'), ";'))]", "type": "sqlserver"}]}}}
This template creates a data collection rule defining the data source (Syslog) and the destination workspace.
{"type": "microsoft.insights/autoscalesettings", "apiversion": "2015-04-01", "name": "[concat(parameters('hostingplanlivesite'), "-", resourcegroup().name)]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/serverfarms", parameters('hostingplanlivesite'))]"], "tags": {"[format('{0}:{1}", "hidden-related", resourceid('microsoft.web/serverfarms", parameters('hostingplanlivesite')))]": "resource", "displayname": "autoscalesettings"}, "properties": {"profiles": [{"name": "default", "capacity": {"minimum": 1, "maximum": 2, "default": 1}, "rules": [{"metrictrigger": {"metricname": "cpupercentage", "metricresourceuri": "[resourceid('microsoft.web/serverfarms", parameters('hostingplanlivesite'))]", "timegrain": "pt1m", "statistic": "average", "timewindow": "pt10m", "timeaggregation": "average", "operator": "greaterthan", "threshold": 80.0}, "scaleaction": {"direction": "increase", "type": "changecount", "value": 1, "cooldown": "pt10m"}}, {"metrictrigger": {"metricname": "cpupercentage", "metricresourceuri": "[resourceid('microsoft.web/serverfarms", parameters('hostingplanlivesite'))]", "timegrain": "pt1m", "statistic": "average", "timewindow": "pt1h", "timeaggregation": "average", "operator": "lessthan", "threshold": 60.0}, "scaleaction": {"direction": "decrease", "type": "changecount", "value": 1, "cooldown": "pt1h"}}]}], "enabled": false, "name": "[concat(parameters('hostingplanlivesite'), "-", resourcegroup().name)]", "targetresourceuri": "[resourceid('microsoft.web/serverfarms", parameters('hostingplanlivesite'))]"}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"type": "microsoft.resources/deployments", "apiversion": "2019-09-01", "name": "pid-e3ec0034-3eaf-47a7-bf36-21bcf341b4dd", "properties": {"mode": "incremental", "template": {"$schema": "https://schema.management.azure.com/schemas/2018-05-01/microsoft.resources.json", "contentversion": "1.0.0.0", "resources": []}}}
Deploy an Azure SQL Server with Auditing enabled to write audit logs to a blob storage
{"type": "microsoft.sql/servers", "apiversion": "2020-08-01-preview", "name": "[parameters('sqlservername')]", "location": "[parameters('location')]", "tags": {"displayname": "sqlserver"}, "properties": {"administratorlogin": "[parameters('sqladministratorlogin')]", "administratorloginpassword": "[parameters('sqladministratorpassword')]"}, "resources": [{"type": "firewallrules", "apiversion": "2020-08-01-preview", "name": "allowallwindowsazureips", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.sql/servers", parameters('sqlservername'))]"], "properties": {"endipaddress": "0.0.0.0", "startipaddress": "0.0.0.0"}}]}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"name": "[variables('virtualmachinename')]", "type": "microsoft.compute/virtualmachines", "apiversion": "2019-03-01", "location": "[variables('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces/", variables('networkinterfacename'))]", "[resourceid('microsoft.storage/storageaccounts/", variables('diagnosticsstorageaccountname'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('virtualmachinesize')]"}, "storageprofile": {"osdisk": {"createoption": "fromimage", "manageddisk": {"storageaccounttype": "[variables('osdisktype')]"}}, "imagereference": "[variables('vmimagereferences')[parameters('vmimage')]]"}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('networkinterfacename'))]"}]}, "osprofile": {"computername": "[variables('virtualmachinename')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]", "windowsconfiguration": {"enableautomaticupdates": true, "provisionvmagent": true}}, "licensetype": "windows_client", "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(resourceid('microsoft.storage/storageaccounts", variables('diagnosticsstorageaccountname')), "2021-01-01').primaryendpoints["blob"]]"}}}}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"name": "[variables('diagnosticsstorageaccountname')]", "type": "microsoft.storage/storageaccounts", "apiversion": "2019-04-01", "location": "[variables('location')]", "properties": {}, "kind": "[variables('diagnosticsstorageaccountkind')]", "sku": {"name": "[variables('diagnosticsstorageaccounttype')]"}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"name": "[variables('virtualmachinename')]", "type": "microsoft.compute/virtualmachines", "apiversion": "2019-03-01", "location": "[variables('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces/", variables('networkinterfacename'))]", "[resourceid('microsoft.storage/storageaccounts/", variables('diagnosticsstorageaccountname'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('virtualmachinesize')]"}, "storageprofile": {"osdisk": {"createoption": "fromimage", "manageddisk": {"storageaccounttype": "[variables('osdisktype')]"}}, "imagereference": "[variables('vmimagereferences')[parameters('vmimage')]]"}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('networkinterfacename'))]"}]}, "osprofile": {"computername": "[variables('virtualmachinename')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]", "windowsconfiguration": {"enableautomaticupdates": true, "provisionvmagent": true}}, "licensetype": "windows_client", "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(resourceid('microsoft.storage/storageaccounts", variables('diagnosticsstorageaccountname')), "2021-01-01').primaryendpoints["blob"]]"}}}}
Storage Account with Storage Service Encryption and a blob deletion retention policy
{"name": "[variables('diagnosticsstorageaccountname')]", "type": "microsoft.storage/storageaccounts", "apiversion": "2019-04-01", "location": "[variables('location')]", "properties": {}, "kind": "[variables('diagnosticsstorageaccountkind')]", "sku": {"name": "[variables('diagnosticsstorageaccounttype')]"}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"name": "[concat(variables('virtualmachinename'), "-rosinstall')]", "type": "microsoft.resources/deployments", "apiversion": "2020-06-01", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", variables('virtualmachinename'))]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('extensionurl')]", "contentversion": "1.0.0.0"}, "parameters": {"location": {"value": "[variables('location')]"}, "extensionname": {"value": "cse"}, "vmname": {"value": "[variables('virtualmachinename')]"}, "fileuris": {"value": ["[variables('rosscriptfileuri')]"]}, "commandtoexecute": {"value": "[concat('powershell -executionpolicy unrestricted -file ", "installros.ps1')]"}}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"name": "[concat(variables('virtualmachinename'), "-rosinstall')]", "type": "microsoft.resources/deployments", "apiversion": "2020-06-01", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", variables('virtualmachinename'))]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('extensionurl')]", "contentversion": "1.0.0.0"}, "parameters": {"location": {"value": "[variables('location')]"}, "extensionname": {"value": "cse"}, "vmname": {"value": "[variables('virtualmachinename')]"}, "fileuris": {"value": ["[variables('rosscriptfileuri')]"]}, "commandtoexecute": {"value": "[concat('powershell -executionpolicy unrestricted -file ", "installros.ps1')]"}}}}{"condition": "[contains(parameters('pipelineprovider'), "azurepipelines')]", "name": "[concat(variables('virtualmachinename'), "-vstsagentinstall')]", "type": "microsoft.resources/deployments", "apiversion": "2020-06-01", "dependson": ["[resourceid('microsoft.resources/deployments", concat(variables('virtualmachinename'), "-rosinstall'))]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('extensionurl')]", "contentversion": "1.0.0.0"}, "parameters": {"location": {"value": "[variables('location')]"}, "extensionname": {"value": "cse"}, "vmname": {"value": "[variables('virtualmachinename')]"}, "fileuris": {"value": ["[variables('vstsscriptfileuri')]"]}, "commandtoexecute": {"value": "[concat(\"powershell.exe -executionpolicy unrestricted -command "& {\", \"./\", \"installvstsagent.ps1\", \" \", variables(\"vstsparameters\'), \"}"\')]"}}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"name": "[concat(variables('virtualmachinename'), "-rosinstall')]", "type": "microsoft.resources/deployments", "apiversion": "2020-06-01", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", variables('virtualmachinename'))]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('extensionurl')]", "contentversion": "1.0.0.0"}, "parameters": {"location": {"value": "[variables('location')]"}, "extensionname": {"value": "cse"}, "vmname": {"value": "[variables('virtualmachinename')]"}, "fileuris": {"value": ["[variables('rosscriptfileuri')]"]}, "commandtoexecute": {"value": "[concat('powershell -executionpolicy unrestricted -file ", "installros.ps1')]"}}}}{"condition": "[contains(parameters('pipelineprovider'), "azurepipelines')]", "name": "[concat(variables('virtualmachinename'), "-vstsagentinstall')]", "type": "microsoft.resources/deployments", "apiversion": "2020-06-01", "dependson": ["[resourceid('microsoft.resources/deployments", concat(variables('virtualmachinename'), "-rosinstall'))]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('extensionurl')]", "contentversion": "1.0.0.0"}, "parameters": {"location": {"value": "[variables('location')]"}, "extensionname": {"value": "cse"}, "vmname": {"value": "[variables('virtualmachinename')]"}, "fileuris": {"value": ["[variables('vstsscriptfileuri')]"]}, "commandtoexecute": {"value": "[concat(\"powershell.exe -executionpolicy unrestricted -command "& {\", \"./\", \"installvstsagent.ps1\", \" \", variables(\"vstsparameters\'), \"}"\')]"}}}}{"condition": "[contains(parameters('pipelineprovider'), "githubrunner')]", "name": "[concat(variables('virtualmachinename'), "-githubagentinstall')]", "type": "microsoft.resources/deployments", "apiversion": "2020-06-01", "dependson": ["[resourceid('microsoft.resources/deployments", concat(variables('virtualmachinename'), "-rosinstall'))]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('extensionurl')]", "contentversion": "1.0.0.0"}, "parameters": {"location": {"value": "[variables('location')]"}, "extensionname": {"value": "cse"}, "vmname": {"value": "[variables('virtualmachinename')]"}, "fileuris": {"value": ["[variables('githubscriptfileuri')]"]}, "commandtoexecute": {"value": "[concat(\"powershell.exe -executionpolicy unrestricted -command "& {\", \"./\", \"installgithubagent.ps1\", \" \", variables(\"githubparameters\'), \"}"\')]"}}}}
Establish connection to a VNET via an ExpressRoute circuit
{"name": "[variables('networkinterfacename')]", "type": "microsoft.network/networkinterfaces", "apiversion": "2020-07-01", "location": "[variables('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups/", variables('networksecuritygroupname'))]", "[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]", "[resourceid('microsoft.network/publicipaddresses/", variables('publicipaddressname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"subnet": {"id": "[variables('subnetref')]"}, "privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", variables('publicipaddressname'))]"}}}], "networksecuritygroup": {"id": "[variables('nsgid')]"}}}
Establish connection to a VNET via an ExpressRoute circuit
{"name": "[variables('networkinterfacename')]", "type": "microsoft.network/networkinterfaces", "apiversion": "2020-07-01", "location": "[variables('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups/", variables('networksecuritygroupname'))]", "[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]", "[resourceid('microsoft.network/publicipaddresses/", variables('publicipaddressname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"subnet": {"id": "[variables('subnetref')]"}, "privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", variables('publicipaddressname'))]"}}}], "networksecuritygroup": {"id": "[variables('nsgid')]"}}}{"name": "[variables('networksecuritygroupname')]", "type": "microsoft.network/networksecuritygroups", "apiversion": "2019-02-01", "location": "[variables('location')]", "properties": {"securityrules": "[variables('networksecuritygrouprules')]"}}
Establish connection to a VNET via an ExpressRoute circuit
{"name": "[variables('networkinterfacename')]", "type": "microsoft.network/networkinterfaces", "apiversion": "2020-07-01", "location": "[variables('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups/", variables('networksecuritygroupname'))]", "[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]", "[resourceid('microsoft.network/publicipaddresses/", variables('publicipaddressname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"subnet": {"id": "[variables('subnetref')]"}, "privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", variables('publicipaddressname'))]"}}}], "networksecuritygroup": {"id": "[variables('nsgid')]"}}}{"name": "[variables('networksecuritygroupname')]", "type": "microsoft.network/networksecuritygroups", "apiversion": "2019-02-01", "location": "[variables('location')]", "properties": {"securityrules": "[variables('networksecuritygrouprules')]"}}{"name": "[variables('virtualnetworkname')]", "type": "microsoft.network/virtualnetworks", "apiversion": "2019-04-01", "location": "[variables('location')]", "properties": {"addressspace": {"addressprefixes": "[variables('addressprefixes')]"}, "subnets": "[variables('subnets')]"}}
Establish connection to a VNET via an ExpressRoute circuit
{"name": "[variables('networkinterfacename')]", "type": "microsoft.network/networkinterfaces", "apiversion": "2020-07-01", "location": "[variables('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups/", variables('networksecuritygroupname'))]", "[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]", "[resourceid('microsoft.network/publicipaddresses/", variables('publicipaddressname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"subnet": {"id": "[variables('subnetref')]"}, "privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", variables('publicipaddressname'))]"}}}], "networksecuritygroup": {"id": "[variables('nsgid')]"}}}{"name": "[variables('networksecuritygroupname')]", "type": "microsoft.network/networksecuritygroups", "apiversion": "2019-02-01", "location": "[variables('location')]", "properties": {"securityrules": "[variables('networksecuritygrouprules')]"}}{"name": "[variables('virtualnetworkname')]", "type": "microsoft.network/virtualnetworks", "apiversion": "2019-04-01", "location": "[variables('location')]", "properties": {"addressspace": {"addressprefixes": "[variables('addressprefixes')]"}, "subnets": "[variables('subnets')]"}}{"name": "[variables('publicipaddressname')]", "type": "microsoft.network/publicipaddresses", "apiversion": "2019-02-01", "location": "[variables('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]"}, "sku": {"name": "[variables('publicipaddresssku')]"}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"type": "microsoft.compute/virtualmachines", "apiversion": "2020-12-01", "name": "[variables('virtualmachinename')]", "location": "[variables('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces/", variables('networkinterfacename'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('virtualmachinesize')]"}, "storageprofile": {"osdisk": {"createoption": "fromimage", "manageddisk": {"storageaccounttype": "[variables('osdisktype')]"}}, "imagereference": {"publisher": "canonical", "offer": "ubuntuserver", "sku": "[variables('ubuntuosversion')]", "version": "latest"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('networkinterfacename'))]"}]}, "osprofile": {"computername": "[variables('virtualmachinename')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"type": "microsoft.compute/virtualmachines", "apiversion": "2020-12-01", "name": "[variables('virtualmachinename')]", "location": "[variables('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces/", variables('networkinterfacename'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('virtualmachinesize')]"}, "storageprofile": {"osdisk": {"createoption": "fromimage", "manageddisk": {"storageaccounttype": "[variables('osdisktype')]"}}, "imagereference": {"publisher": "canonical", "offer": "ubuntuserver", "sku": "[variables('ubuntuosversion')]", "version": "latest"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('networkinterfacename'))]"}]}, "osprofile": {"computername": "[variables('virtualmachinename')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"condition": "[contains(parameters('virtualmachinesize'), "standard_nv')]", "name": "nvidia-gpu-driver-linux", "apiversion": "2021-04-01", "type": "microsoft.resources/deployments", "dependson": ["[resourceid('microsoft.resources/deployments", concat(variables('virtualmachinename'), "-rosinstall'))]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('nvidiagpudriverlinuxuri')]"}, "parameters": {"vmname": {"value": "[variables('virtualmachinename')]"}, "location": {"value": "[variables('location')]"}}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"condition": "[contains(parameters('virtualmachinesize'), "standard_nv')]", "name": "nvidia-gpu-driver-linux", "apiversion": "2021-04-01", "type": "microsoft.resources/deployments", "dependson": ["[resourceid('microsoft.resources/deployments", concat(variables('virtualmachinename'), "-rosinstall'))]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('nvidiagpudriverlinuxuri')]"}, "parameters": {"vmname": {"value": "[variables('virtualmachinename')]"}, "location": {"value": "[variables('location')]"}}}}{"name": "[concat(variables('virtualmachinename'), "-rosinstall')]", "type": "microsoft.resources/deployments", "apiversion": "2021-04-01", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", variables('virtualmachinename'))]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('extensionurl')]", "contentversion": "1.0.0.0"}, "parameters": {"location": {"value": "[variables('location')]"}, "extensionname": {"value": "cse"}, "vmname": {"value": "[variables('virtualmachinename')]"}, "fileuris": {"value": ["[variables('rosscriptfileuri')]"]}, "commandtoexecute": {"value": "[concat('bash ", "install-ros.sh')]"}}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"condition": "[contains(parameters('virtualmachinesize'), "standard_nv')]", "name": "nvidia-gpu-driver-linux", "apiversion": "2021-04-01", "type": "microsoft.resources/deployments", "dependson": ["[resourceid('microsoft.resources/deployments", concat(variables('virtualmachinename'), "-rosinstall'))]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('nvidiagpudriverlinuxuri')]"}, "parameters": {"vmname": {"value": "[variables('virtualmachinename')]"}, "location": {"value": "[variables('location')]"}}}}{"name": "[concat(variables('virtualmachinename'), "-rosinstall')]", "type": "microsoft.resources/deployments", "apiversion": "2021-04-01", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", variables('virtualmachinename'))]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('extensionurl')]", "contentversion": "1.0.0.0"}, "parameters": {"location": {"value": "[variables('location')]"}, "extensionname": {"value": "cse"}, "vmname": {"value": "[variables('virtualmachinename')]"}, "fileuris": {"value": ["[variables('rosscriptfileuri')]"]}, "commandtoexecute": {"value": "[concat('bash ", "install-ros.sh')]"}}}}{"condition": "[contains(parameters('pipelineprovider'), "azurepipelines')]", "name": "[concat(variables('virtualmachinename'), "-vstsagentinstall')]", "type": "microsoft.resources/deployments", "apiversion": "2021-04-01", "dependson": ["[resourceid('microsoft.resources/deployments", concat(variables('virtualmachinename'), "-rosinstall'))]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('extensionurl')]", "contentversion": "1.0.0.0"}, "parameters": {"location": {"value": "[variables('location')]"}, "extensionname": {"value": "cse"}, "vmname": {"value": "[variables('virtualmachinename')]"}, "fileuris": {"value": ["[variables('vstsscriptfileuri')]"]}, "commandtoexecute": {"value": "[concat('bash ", "install-vsts.sh ", variables('vstsparameters'))]"}}}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/networkinterfaces", "apiversion": "2020-07-01", "name": "[variables('networkinterfacename')]", "location": "[variables('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups/", variables('networksecuritygroupname'))]", "[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]", "[resourceid('microsoft.network/publicipaddresses/", variables('publicipaddressname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"subnet": {"id": "[variables('subnetref')]"}, "privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('publicipaddressname'))]"}}}], "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/networkinterfaces", "apiversion": "2020-07-01", "name": "[variables('networkinterfacename')]", "location": "[variables('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups/", variables('networksecuritygroupname'))]", "[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]", "[resourceid('microsoft.network/publicipaddresses/", variables('publicipaddressname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"subnet": {"id": "[variables('subnetref')]"}, "privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('publicipaddressname'))]"}}}], "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}}}{"type": "microsoft.network/networksecuritygroups", "apiversion": "2020-07-01", "name": "[variables('networksecuritygroupname')]", "location": "[variables('location')]", "properties": {"securityrules": [{"name": "ssh", "properties": {"priority": 1000, "protocol": "tcp", "access": "allow", "direction": "inbound", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*", "destinationportrange": "22"}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/networkinterfaces", "apiversion": "2020-07-01", "name": "[variables('networkinterfacename')]", "location": "[variables('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups/", variables('networksecuritygroupname'))]", "[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]", "[resourceid('microsoft.network/publicipaddresses/", variables('publicipaddressname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"subnet": {"id": "[variables('subnetref')]"}, "privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('publicipaddressname'))]"}}}], "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}}}{"type": "microsoft.network/networksecuritygroups", "apiversion": "2020-07-01", "name": "[variables('networksecuritygroupname')]", "location": "[variables('location')]", "properties": {"securityrules": [{"name": "ssh", "properties": {"priority": 1000, "protocol": "tcp", "access": "allow", "direction": "inbound", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*", "destinationportrange": "22"}}]}}{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-07-01", "name": "[variables('virtualnetworkname')]", "location": "[variables('location')]", "properties": {"addressspace": {"addressprefixes": "[variables('addressprefixes')]"}, "subnets": "[variables('subnets')]"}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/networkinterfaces", "apiversion": "2020-07-01", "name": "[variables('networkinterfacename')]", "location": "[variables('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups/", variables('networksecuritygroupname'))]", "[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]", "[resourceid('microsoft.network/publicipaddresses/", variables('publicipaddressname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"subnet": {"id": "[variables('subnetref')]"}, "privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('publicipaddressname'))]"}}}], "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}}}{"type": "microsoft.network/networksecuritygroups", "apiversion": "2020-07-01", "name": "[variables('networksecuritygroupname')]", "location": "[variables('location')]", "properties": {"securityrules": [{"name": "ssh", "properties": {"priority": 1000, "protocol": "tcp", "access": "allow", "direction": "inbound", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*", "destinationportrange": "22"}}]}}{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-07-01", "name": "[variables('virtualnetworkname')]", "location": "[variables('location')]", "properties": {"addressspace": {"addressprefixes": "[variables('addressprefixes')]"}, "subnets": "[variables('subnets')]"}}{"type": "microsoft.network/publicipaddresses", "apiversion": "2020-07-01", "name": "[variables('publicipaddressname')]", "location": "[variables('location')]", "properties": {"publicipallocationmethod": "dynamic", "dnssettings": {"domainnamelabel": "[concat('ros-vm-", uniquestring(resourcegroup().id))]"}}, "sku": {"name": "basic"}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"name": "shared-resources", "type": "microsoft.resources/deployments", "apiversion": "2016-09-01", "comments": "azure resources that are shared within the infrastructure environment", "properties": {"mode": "incremental", "templatelink": {"uri": "[concat(parameters('_artifactslocation'),"/nested/", variables('sharedresourcestemplatefilename'),parameters('_artifactslocationsastoken'))]", "contentversion": "1.0.0.0"}, "parameters": {"webnsgname": {"value": "[variables('webnsgname')]"}, "datansgname": {"value": "[variables('datansgname')]"}, "virtualnetworkname": {"value": "[variables('virtualnetworkname')]"}, "datasubnetname": {"value": "[variables('datasubnetname')]"}, "websubnetname": {"value": "[variables('websubnetname')]"}, "addressprefix": {"value": "[variables('addressprefix')]"}, "websubnetprefix": {"value": "[variables('websubnetprefix')]"}, "datasubnetprefix": {"value": "[variables('datasubnetprefix')]"}, "remoteallowedcidr": {"value": "[parameters('remoteallowedcidr')]"}, "netapptags": {"value": "[variables('netapptags')]"}, "quickstarttags": {"value": "[variables('quickstarttags')]"}}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"name": "shared-resources", "type": "microsoft.resources/deployments", "apiversion": "2016-09-01", "comments": "azure resources that are shared within the infrastructure environment", "properties": {"mode": "incremental", "templatelink": {"uri": "[concat(parameters('_artifactslocation'),"/nested/", variables('sharedresourcestemplatefilename'),parameters('_artifactslocationsastoken'))]", "contentversion": "1.0.0.0"}, "parameters": {"webnsgname": {"value": "[variables('webnsgname')]"}, "datansgname": {"value": "[variables('datansgname')]"}, "virtualnetworkname": {"value": "[variables('virtualnetworkname')]"}, "datasubnetname": {"value": "[variables('datasubnetname')]"}, "websubnetname": {"value": "[variables('websubnetname')]"}, "addressprefix": {"value": "[variables('addressprefix')]"}, "websubnetprefix": {"value": "[variables('websubnetprefix')]"}, "datasubnetprefix": {"value": "[variables('datasubnetprefix')]"}, "remoteallowedcidr": {"value": "[parameters('remoteallowedcidr')]"}, "netapptags": {"value": "[variables('netapptags')]"}, "quickstarttags": {"value": "[variables('quickstarttags')]"}}}}{"name": "jump-vm", "type": "microsoft.resources/deployments", "apiversion": "2016-09-01", "comments": "jump server deployment", "dependson": ["microsoft.resources/deployments/shared-resources"], "properties": {"mode": "incremental", "templatelink": {"uri": "[concat(parameters('_artifactslocation'),"/nested/", variables('jumpvmtemplatefilename'),parameters('_artifactslocationsastoken'))]", "contentversion": "1.0.0.0"}, "parameters": {"adminusername": {"value": "[parameters('adminusername')]"}, "adminpassword": {"value": "[parameters('adminpassword')]"}, "vnetid": {"value": "[variables('vnetid')]"}, "websubnetname": {"value": "[variables('websubnetname')]"}, "jumpvmname": {"value": "[variables('jumpvmname')]"}, "jumpvmsize": {"value": "[variables('jumpvmsize')]"}, "jumpvmnicname": {"value": "[variables('jumpvmnicname')]"}, "jumpvmpublicipaddressname": {"value": "[variables('jumpvmpublicipaddressname')]"}, "jumpvmdnsname": {"value": "[variables('jumpvmdnsname')]"}, "netapptags": {"value": "[variables('netapptags')]"}, "quickstarttags": {"value": "[variables('quickstarttags')]"}}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"name": "shared-resources", "type": "microsoft.resources/deployments", "apiversion": "2016-09-01", "comments": "azure resources that are shared within the infrastructure environment", "properties": {"mode": "incremental", "templatelink": {"uri": "[concat(parameters('_artifactslocation'),"/nested/", variables('sharedresourcestemplatefilename'),parameters('_artifactslocationsastoken'))]", "contentversion": "1.0.0.0"}, "parameters": {"webnsgname": {"value": "[variables('webnsgname')]"}, "datansgname": {"value": "[variables('datansgname')]"}, "virtualnetworkname": {"value": "[variables('virtualnetworkname')]"}, "datasubnetname": {"value": "[variables('datasubnetname')]"}, "websubnetname": {"value": "[variables('websubnetname')]"}, "addressprefix": {"value": "[variables('addressprefix')]"}, "websubnetprefix": {"value": "[variables('websubnetprefix')]"}, "datasubnetprefix": {"value": "[variables('datasubnetprefix')]"}, "remoteallowedcidr": {"value": "[parameters('remoteallowedcidr')]"}, "netapptags": {"value": "[variables('netapptags')]"}, "quickstarttags": {"value": "[variables('quickstarttags')]"}}}}{"name": "jump-vm", "type": "microsoft.resources/deployments", "apiversion": "2016-09-01", "comments": "jump server deployment", "dependson": ["microsoft.resources/deployments/shared-resources"], "properties": {"mode": "incremental", "templatelink": {"uri": "[concat(parameters('_artifactslocation'),"/nested/", variables('jumpvmtemplatefilename'),parameters('_artifactslocationsastoken'))]", "contentversion": "1.0.0.0"}, "parameters": {"adminusername": {"value": "[parameters('adminusername')]"}, "adminpassword": {"value": "[parameters('adminpassword')]"}, "vnetid": {"value": "[variables('vnetid')]"}, "websubnetname": {"value": "[variables('websubnetname')]"}, "jumpvmname": {"value": "[variables('jumpvmname')]"}, "jumpvmsize": {"value": "[variables('jumpvmsize')]"}, "jumpvmnicname": {"value": "[variables('jumpvmnicname')]"}, "jumpvmpublicipaddressname": {"value": "[variables('jumpvmpublicipaddressname')]"}, "jumpvmdnsname": {"value": "[variables('jumpvmdnsname')]"}, "netapptags": {"value": "[variables('netapptags')]"}, "quickstarttags": {"value": "[variables('quickstarttags')]"}}}}{"name": "sql-vm", "type": "microsoft.resources/deployments", "apiversion": "2016-09-01", "comments": "sql server deployment", "dependson": ["microsoft.resources/deployments/shared-resources"], "properties": {"mode": "incremental", "templatelink": {"uri": "[concat(parameters('_artifactslocation'),"/nested/", variables('sqlvmtemplatefilename'),parameters('_artifactslocationsastoken'))]", "contentversion": "1.0.0.0"}, "parameters": {"adminusername": {"value": "[parameters('adminusername')]"}, "adminpassword": {"value": "[parameters('adminpassword')]"}, "vnetid": {"value": "[variables('vnetid')]"}, "datasubnetname": {"value": "[variables('datasubnetname')]"}, "sqlvmname": {"value": "[variables('sqlvmname')]"}, "sqlvmnicname": {"value": "[variables('sqlvmnicname')]"}, "sqlvmsize": {"value": "[variables('sqlvmsize')]"}, "_artifactslocation": {"value": "[parameters('_artifactslocation')]"}, "_artifactslocationsastoken": {"value": "[parameters('_artifactslocationsastoken')]"}, "netapptags": {"value": "[variables('netapptags')]"}, "quickstarttags": {"value": "[variables('quickstarttags')]"}}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"name": "shared-resources", "type": "microsoft.resources/deployments", "apiversion": "2016-09-01", "comments": "azure resources that are shared within the infrastructure environment", "properties": {"mode": "incremental", "templatelink": {"uri": "[concat(parameters('_artifactslocation'),"/nested/", variables('sharedresourcestemplatefilename'),parameters('_artifactslocationsastoken'))]", "contentversion": "1.0.0.0"}, "parameters": {"webnsgname": {"value": "[variables('webnsgname')]"}, "datansgname": {"value": "[variables('datansgname')]"}, "virtualnetworkname": {"value": "[variables('virtualnetworkname')]"}, "datasubnetname": {"value": "[variables('datasubnetname')]"}, "websubnetname": {"value": "[variables('websubnetname')]"}, "addressprefix": {"value": "[variables('addressprefix')]"}, "websubnetprefix": {"value": "[variables('websubnetprefix')]"}, "datasubnetprefix": {"value": "[variables('datasubnetprefix')]"}, "remoteallowedcidr": {"value": "[parameters('remoteallowedcidr')]"}, "netapptags": {"value": "[variables('netapptags')]"}, "quickstarttags": {"value": "[variables('quickstarttags')]"}}}}{"name": "jump-vm", "type": "microsoft.resources/deployments", "apiversion": "2016-09-01", "comments": "jump server deployment", "dependson": ["microsoft.resources/deployments/shared-resources"], "properties": {"mode": "incremental", "templatelink": {"uri": "[concat(parameters('_artifactslocation'),"/nested/", variables('jumpvmtemplatefilename'),parameters('_artifactslocationsastoken'))]", "contentversion": "1.0.0.0"}, "parameters": {"adminusername": {"value": "[parameters('adminusername')]"}, "adminpassword": {"value": "[parameters('adminpassword')]"}, "vnetid": {"value": "[variables('vnetid')]"}, "websubnetname": {"value": "[variables('websubnetname')]"}, "jumpvmname": {"value": "[variables('jumpvmname')]"}, "jumpvmsize": {"value": "[variables('jumpvmsize')]"}, "jumpvmnicname": {"value": "[variables('jumpvmnicname')]"}, "jumpvmpublicipaddressname": {"value": "[variables('jumpvmpublicipaddressname')]"}, "jumpvmdnsname": {"value": "[variables('jumpvmdnsname')]"}, "netapptags": {"value": "[variables('netapptags')]"}, "quickstarttags": {"value": "[variables('quickstarttags')]"}}}}{"name": "sql-vm", "type": "microsoft.resources/deployments", "apiversion": "2016-09-01", "comments": "sql server deployment", "dependson": ["microsoft.resources/deployments/shared-resources"], "properties": {"mode": "incremental", "templatelink": {"uri": "[concat(parameters('_artifactslocation'),"/nested/", variables('sqlvmtemplatefilename'),parameters('_artifactslocationsastoken'))]", "contentversion": "1.0.0.0"}, "parameters": {"adminusername": {"value": "[parameters('adminusername')]"}, "adminpassword": {"value": "[parameters('adminpassword')]"}, "vnetid": {"value": "[variables('vnetid')]"}, "datasubnetname": {"value": "[variables('datasubnetname')]"}, "sqlvmname": {"value": "[variables('sqlvmname')]"}, "sqlvmnicname": {"value": "[variables('sqlvmnicname')]"}, "sqlvmsize": {"value": "[variables('sqlvmsize')]"}, "_artifactslocation": {"value": "[parameters('_artifactslocation')]"}, "_artifactslocationsastoken": {"value": "[parameters('_artifactslocationsastoken')]"}, "netapptags": {"value": "[variables('netapptags')]"}, "quickstarttags": {"value": "[variables('quickstarttags')]"}}}}{"name": "netapp-oncommand-cloudmanager", "type": "microsoft.resources/deployments", "apiversion": "2016-09-01", "comments": "netapp oncommand manager deployment", "dependson": ["microsoft.resources/deployments/shared-resources"], "properties": {"mode": "incremental", "templatelink": {"uri": "[concat(parameters('_artifactslocation'),"/nested/", variables('netapponcommandcloudmanagervmtemplatefilename'),parameters('_artifactslocationsastoken'))]", "contentversion": "1.0.0.0"}, "parameters": {"adminusername": {"value": "[parameters('adminusername')]"}, "adminpassword": {"value": "[parameters('adminpassword')]"}, "vnetid": {"value": "[variables('vnetid')]"}, "websubnetname": {"value": "[variables('websubnetname')]"}, "oncommandcloudmanagervmname": {"value": "[variables('oncommandcloudmanagervmname')]"}, "oncommandcloudmanagervmsize": {"value": "[variables('oncommandcloudmanagervmsize')]"}, "oncommandcloudmanagervmnicname": {"value": "[variables('oncommandcloudmanagervmnicname')]"}, "oncommandcloudmanagerpublicipaddressname": {"value": "[variables('oncommandcloudmanagerpublicipaddressname')]"}, "oncommandcloudmanagerdnsname": {"value": "[variables('oncommandcloudmanagerdnsname')]"}, "netapptags": {"value": "[variables('netapptags')]"}, "quickstarttags": {"value": "[variables('quickstarttags')]"}}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"name": "shared-resources", "type": "microsoft.resources/deployments", "apiversion": "2016-09-01", "comments": "azure resources that are shared within the infrastructure environment", "properties": {"mode": "incremental", "templatelink": {"uri": "[concat(parameters('_artifactslocation'),"/nested/", variables('sharedresourcestemplatefilename'),parameters('_artifactslocationsastoken'))]", "contentversion": "1.0.0.0"}, "parameters": {"webnsgname": {"value": "[variables('webnsgname')]"}, "datansgname": {"value": "[variables('datansgname')]"}, "virtualnetworkname": {"value": "[variables('virtualnetworkname')]"}, "datasubnetname": {"value": "[variables('datasubnetname')]"}, "websubnetname": {"value": "[variables('websubnetname')]"}, "addressprefix": {"value": "[variables('addressprefix')]"}, "websubnetprefix": {"value": "[variables('websubnetprefix')]"}, "datasubnetprefix": {"value": "[variables('datasubnetprefix')]"}, "remoteallowedcidr": {"value": "[parameters('remoteallowedcidr')]"}, "netapptags": {"value": "[variables('netapptags')]"}, "quickstarttags": {"value": "[variables('quickstarttags')]"}}}}{"name": "jump-vm", "type": "microsoft.resources/deployments", "apiversion": "2016-09-01", "comments": "jump server deployment", "dependson": ["microsoft.resources/deployments/shared-resources"], "properties": {"mode": "incremental", "templatelink": {"uri": "[concat(parameters('_artifactslocation'),"/nested/", variables('jumpvmtemplatefilename'),parameters('_artifactslocationsastoken'))]", "contentversion": "1.0.0.0"}, "parameters": {"adminusername": {"value": "[parameters('adminusername')]"}, "adminpassword": {"value": "[parameters('adminpassword')]"}, "vnetid": {"value": "[variables('vnetid')]"}, "websubnetname": {"value": "[variables('websubnetname')]"}, "jumpvmname": {"value": "[variables('jumpvmname')]"}, "jumpvmsize": {"value": "[variables('jumpvmsize')]"}, "jumpvmnicname": {"value": "[variables('jumpvmnicname')]"}, "jumpvmpublicipaddressname": {"value": "[variables('jumpvmpublicipaddressname')]"}, "jumpvmdnsname": {"value": "[variables('jumpvmdnsname')]"}, "netapptags": {"value": "[variables('netapptags')]"}, "quickstarttags": {"value": "[variables('quickstarttags')]"}}}}{"name": "sql-vm", "type": "microsoft.resources/deployments", "apiversion": "2016-09-01", "comments": "sql server deployment", "dependson": ["microsoft.resources/deployments/shared-resources"], "properties": {"mode": "incremental", "templatelink": {"uri": "[concat(parameters('_artifactslocation'),"/nested/", variables('sqlvmtemplatefilename'),parameters('_artifactslocationsastoken'))]", "contentversion": "1.0.0.0"}, "parameters": {"adminusername": {"value": "[parameters('adminusername')]"}, "adminpassword": {"value": "[parameters('adminpassword')]"}, "vnetid": {"value": "[variables('vnetid')]"}, "datasubnetname": {"value": "[variables('datasubnetname')]"}, "sqlvmname": {"value": "[variables('sqlvmname')]"}, "sqlvmnicname": {"value": "[variables('sqlvmnicname')]"}, "sqlvmsize": {"value": "[variables('sqlvmsize')]"}, "_artifactslocation": {"value": "[parameters('_artifactslocation')]"}, "_artifactslocationsastoken": {"value": "[parameters('_artifactslocationsastoken')]"}, "netapptags": {"value": "[variables('netapptags')]"}, "quickstarttags": {"value": "[variables('quickstarttags')]"}}}}{"name": "netapp-oncommand-cloudmanager", "type": "microsoft.resources/deployments", "apiversion": "2016-09-01", "comments": "netapp oncommand manager deployment", "dependson": ["microsoft.resources/deployments/shared-resources"], "properties": {"mode": "incremental", "templatelink": {"uri": "[concat(parameters('_artifactslocation'),"/nested/", variables('netapponcommandcloudmanagervmtemplatefilename'),parameters('_artifactslocationsastoken'))]", "contentversion": "1.0.0.0"}, "parameters": {"adminusername": {"value": "[parameters('adminusername')]"}, "adminpassword": {"value": "[parameters('adminpassword')]"}, "vnetid": {"value": "[variables('vnetid')]"}, "websubnetname": {"value": "[variables('websubnetname')]"}, "oncommandcloudmanagervmname": {"value": "[variables('oncommandcloudmanagervmname')]"}, "oncommandcloudmanagervmsize": {"value": "[variables('oncommandcloudmanagervmsize')]"}, "oncommandcloudmanagervmnicname": {"value": "[variables('oncommandcloudmanagervmnicname')]"}, "oncommandcloudmanagerpublicipaddressname": {"value": "[variables('oncommandcloudmanagerpublicipaddressname')]"}, "oncommandcloudmanagerdnsname": {"value": "[variables('oncommandcloudmanagerdnsname')]"}, "netapptags": {"value": "[variables('netapptags')]"}, "quickstarttags": {"value": "[variables('quickstarttags')]"}}}}{"name": "netapp-ontap-cloud", "type": "microsoft.resources/deployments", "apiversion": "2016-09-01", "comments": "netapp ontap cloud env deployment", "dependson": ["microsoft.resources/deployments/netapp-oncommand-cloudmanager"], "properties": {"mode": "incremental", "templatelink": {"uri": "[concat(parameters('_artifactslocation'),"/nested/", variables('netappontapcloudtemplatefilename'),parameters('_artifactslocationsastoken'))]", "contentversion": "1.0.0.0"}, "parameters": {"adminemailaddress": {"value": "[parameters('adminemailaddress')]"}, "adminpassword": {"value": "[parameters('adminpassword')]"}, "otcpassword": {"value": "[variables('otcpassword')]"}, "datansgname": {"value": "[variables('datansgname')]"}, "vnetid": {"value": "[variables('vnetid')]"}, "cidr": {"value": "[variables('addressprefix')]"}, "datasubnetname": {"value": "[variables('datasubnetname')]"}, "oncommandcloudmanagervmname": {"value": "[variables('oncommandcloudmanagervmname')]"}, "azureadapplicationid": {"value": "[parameters('azureadapplicationid')]"}, "azureadapplicationsecret": {"value": "[parameters('azureadapplicationsecret')]"}, "netappontapcloudlicense": {"value": "[variables(concat('netappontapcloudlicense",parameters('netappontapcloudlicensetype')))]"}, "netappontapversion": {"value": "[variables('netappontapversion')]"}, "_artifactslocation": {"value": "[parameters('_artifactslocation')]"}, "_artifactslocationsastoken": {"value": "[parameters('_artifactslocationsastoken')]"}, "netapptags": {"value": "[variables('netapptags')]"}, "quickstarttags": {"value": "[variables('quickstarttags')]"}}}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"type": "microsoft.compute/virtualmachines", "apiversion": "2020-12-01", "name": "[concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))))]", "location": "[parameters('location')]", "copy": {"name": "vmcopy", "count": "[add(add(length(variables('vminfo')),length(variables('siteinfo'))),length(variables('clientrole')))]"}, "dependson": ["[resourceid('microsoft.network/networkinterfaces/",concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))),"-ni'))]"], "properties": {"osprofile": {"computername": "[concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))))]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]", "windowsconfiguration": {"provisionvmagent": true, "timezone": "[variables('timezone')]"}}, "hardwareprofile": {"vmsize": "[if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].size,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].size,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].size))]"}, "storageprofile": {"imagereference": "[if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].imagereference,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].imagereference,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].imagereference))]", "osdisk": {"ostype": "windows", "name": "[concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))),"-osdisk')]", "createoption": "fromimage", "caching": "readwrite", "manageddisk": {"storageaccounttype": "[if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].disktype,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].disktype,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].disktype))]"}, "disksizegb": 150}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ni'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": false}}}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"type": "microsoft.compute/virtualmachines", "apiversion": "2020-12-01", "name": "[concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))))]", "location": "[parameters('location')]", "copy": {"name": "vmcopy", "count": "[add(add(length(variables('vminfo')),length(variables('siteinfo'))),length(variables('clientrole')))]"}, "dependson": ["[resourceid('microsoft.network/networkinterfaces/",concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))),"-ni'))]"], "properties": {"osprofile": {"computername": "[concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))))]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]", "windowsconfiguration": {"provisionvmagent": true, "timezone": "[variables('timezone')]"}}, "hardwareprofile": {"vmsize": "[if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].size,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].size,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].size))]"}, "storageprofile": {"imagereference": "[if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].imagereference,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].imagereference,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].imagereference))]", "osdisk": {"ostype": "windows", "name": "[concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))),"-osdisk')]", "createoption": "fromimage", "caching": "readwrite", "manageddisk": {"storageaccounttype": "[if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].disktype,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].disktype,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].disktype))]"}, "disksizegb": 150}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ni'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": false}}}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-05-01", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('networksettings').virtualnetworkaddressprefix]"]}, "subnets": [{"name": "default", "properties": {"addressprefix": "[variables('networksettings').subnetaddressprefix]"}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-05-01", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('networksettings').virtualnetworkaddressprefix]"]}, "subnets": [{"name": "default", "properties": {"addressprefix": "[variables('networksettings').subnetaddressprefix]"}}]}}{"type": "microsoft.network/networkinterfaces", "name": "[concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ni')]", "apiversion": "2020-05-01", "location": "[parameters('location')]", "copy": {"name": "nivmcopy", "count": "[add(add(length(variables('vminfo')),length(variables('siteinfo'))),length(variables('clientrole')))]"}, "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]", "[resourceid('microsoft.network/publicipaddresses/", concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ip'))]", "[resourceid('microsoft.network/networksecuritygroups/", concat(tolower(tolower(parameters('prefix'))), "-nsg'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"subnet": {"id": "[variables('networksettings').subnetref]"}, "privateipallocationmethod": "[variables('networksettings').privateipallocationmethod]", "privateipaddress": "[concat(variables('networksettings').virtualmachinesipaddress,add(copyindex(),int('4')))]", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ip'))]"}}}], "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", concat(tolower(parameters('prefix')), "-nsg'))]"}}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-05-01", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('networksettings').virtualnetworkaddressprefix]"]}, "subnets": [{"name": "default", "properties": {"addressprefix": "[variables('networksettings').subnetaddressprefix]"}}]}}{"type": "microsoft.network/networkinterfaces", "name": "[concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ni')]", "apiversion": "2020-05-01", "location": "[parameters('location')]", "copy": {"name": "nivmcopy", "count": "[add(add(length(variables('vminfo')),length(variables('siteinfo'))),length(variables('clientrole')))]"}, "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]", "[resourceid('microsoft.network/publicipaddresses/", concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ip'))]", "[resourceid('microsoft.network/networksecuritygroups/", concat(tolower(tolower(parameters('prefix'))), "-nsg'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"subnet": {"id": "[variables('networksettings').subnetref]"}, "privateipallocationmethod": "[variables('networksettings').privateipallocationmethod]", "privateipaddress": "[concat(variables('networksettings').virtualmachinesipaddress,add(copyindex(),int('4')))]", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ip'))]"}}}], "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", concat(tolower(parameters('prefix')), "-nsg'))]"}}}{"type": "microsoft.network/publicipaddresses", "apiversion": "2020-05-01", "name": "[concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ip')]", "location": "[parameters('location')]", "copy": {"name": "ipvmcopy", "count": "[add(add(length(variables('vminfo')),length(variables('siteinfo'))),length(variables('clientrole')))]"}, "properties": {"publicipallocationmethod": "[variables('networksettings').publicipallocationmethod]"}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-05-01", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('networksettings').virtualnetworkaddressprefix]"]}, "subnets": [{"name": "default", "properties": {"addressprefix": "[variables('networksettings').subnetaddressprefix]"}}]}}{"type": "microsoft.network/networkinterfaces", "name": "[concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ni')]", "apiversion": "2020-05-01", "location": "[parameters('location')]", "copy": {"name": "nivmcopy", "count": "[add(add(length(variables('vminfo')),length(variables('siteinfo'))),length(variables('clientrole')))]"}, "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]", "[resourceid('microsoft.network/publicipaddresses/", concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ip'))]", "[resourceid('microsoft.network/networksecuritygroups/", concat(tolower(tolower(parameters('prefix'))), "-nsg'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"subnet": {"id": "[variables('networksettings').subnetref]"}, "privateipallocationmethod": "[variables('networksettings').privateipallocationmethod]", "privateipaddress": "[concat(variables('networksettings').virtualmachinesipaddress,add(copyindex(),int('4')))]", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ip'))]"}}}], "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", concat(tolower(parameters('prefix')), "-nsg'))]"}}}{"type": "microsoft.network/publicipaddresses", "apiversion": "2020-05-01", "name": "[concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ip')]", "location": "[parameters('location')]", "copy": {"name": "ipvmcopy", "count": "[add(add(length(variables('vminfo')),length(variables('siteinfo'))),length(variables('clientrole')))]"}, "properties": {"publicipallocationmethod": "[variables('networksettings').publicipallocationmethod]"}}{"type": "microsoft.network/networksecuritygroups", "apiversion": "2020-05-01", "name": "[concat(tolower(parameters('prefix')), "-nsg')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "[variables('securitygrouprulename')]", "properties": "[variables('securitygrouprule')]"}]}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"type": "microsoft.compute/virtualmachines", "apiversion": "2019-12-01", "name": "[concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))))]", "location": "[parameters('location')]", "copy": {"name": "vmcopy", "count": "[add(add(length(variables('vminfo')),length(variables('siteinfo'))),length(variables('clientrole')))]"}, "dependson": ["[resourceid('microsoft.network/networkinterfaces/",concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))),"-ni'))]"], "properties": {"osprofile": {"computername": "[concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))))]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]", "windowsconfiguration": {"provisionvmagent": true, "timezone": "[variables('timezone')]"}}, "hardwareprofile": {"vmsize": "[if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].size,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].size,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].size))]"}, "storageprofile": {"imagereference": "[if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].imagereference,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].imagereference,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].imagereference))]", "osdisk": {"ostype": "windows", "name": "[concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))),"-osdisk')]", "createoption": "fromimage", "caching": "readwrite", "manageddisk": {"storageaccounttype": "[if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].disktype,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].disktype,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].disktype))]"}, "disksizegb": 150}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ni'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": false}}}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"type": "microsoft.compute/virtualmachines", "apiversion": "2019-12-01", "name": "[concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))))]", "location": "[parameters('location')]", "copy": {"name": "vmcopy", "count": "[add(add(length(variables('vminfo')),length(variables('siteinfo'))),length(variables('clientrole')))]"}, "dependson": ["[resourceid('microsoft.network/networkinterfaces/",concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))),"-ni'))]"], "properties": {"osprofile": {"computername": "[concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))))]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]", "windowsconfiguration": {"provisionvmagent": true, "timezone": "[variables('timezone')]"}}, "hardwareprofile": {"vmsize": "[if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].size,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].size,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].size))]"}, "storageprofile": {"imagereference": "[if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].imagereference,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].imagereference,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].imagereference))]", "osdisk": {"ostype": "windows", "name": "[concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))),"-osdisk')]", "createoption": "fromimage", "caching": "readwrite", "manageddisk": {"storageaccounttype": "[if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].disktype,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].disktype,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].disktype))]"}, "disksizegb": 150}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ni'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": false}}}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-05-01", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('networksettings').virtualnetworkaddressprefix]"]}, "subnets": [{"name": "default", "properties": {"addressprefix": "[variables('networksettings').subnetaddressprefix]"}}]}}{"type": "microsoft.network/networkinterfaces", "name": "[concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ni')]", "apiversion": "2020-05-01", "location": "[parameters('location')]", "copy": {"name": "nicopy", "count": "[add(add(length(variables('vminfo')),length(variables('siteinfo'))),length(variables('clientrole')))]"}, "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]", "[resourceid('microsoft.network/publicipaddresses/", concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ip'))]", "[resourceid('microsoft.network/networksecuritygroups/", concat(tolower(tolower(parameters('prefix'))), "-nsg'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"subnet": {"id": "[variables('networksettings').subnetref]"}, "privateipallocationmethod": "[variables('networksettings').privateipallocationmethod]", "privateipaddress": "[concat(variables('networksettings').virtualmachinesipaddress,add(copyindex(),int('4')))]", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ip'))]"}}}], "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", concat(tolower(parameters('prefix')), "-nsg'))]"}}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-05-01", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('networksettings').virtualnetworkaddressprefix]"]}, "subnets": [{"name": "default", "properties": {"addressprefix": "[variables('networksettings').subnetaddressprefix]"}}]}}{"type": "microsoft.network/networkinterfaces", "name": "[concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ni')]", "apiversion": "2020-05-01", "location": "[parameters('location')]", "copy": {"name": "nicopy", "count": "[add(add(length(variables('vminfo')),length(variables('siteinfo'))),length(variables('clientrole')))]"}, "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]", "[resourceid('microsoft.network/publicipaddresses/", concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ip'))]", "[resourceid('microsoft.network/networksecuritygroups/", concat(tolower(tolower(parameters('prefix'))), "-nsg'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"subnet": {"id": "[variables('networksettings').subnetref]"}, "privateipallocationmethod": "[variables('networksettings').privateipallocationmethod]", "privateipaddress": "[concat(variables('networksettings').virtualmachinesipaddress,add(copyindex(),int('4')))]", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ip'))]"}}}], "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", concat(tolower(parameters('prefix')), "-nsg'))]"}}}{"type": "microsoft.network/publicipaddresses", "apiversion": "2020-05-01", "name": "[concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ip')]", "location": "[parameters('location')]", "copy": {"name": "ipcopy", "count": "[add(add(length(variables('vminfo')),length(variables('siteinfo'))),length(variables('clientrole')))]"}, "properties": {"publicipallocationmethod": "[variables('networksettings').publicipallocationmethod]"}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-05-01", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('networksettings').virtualnetworkaddressprefix]"]}, "subnets": [{"name": "default", "properties": {"addressprefix": "[variables('networksettings').subnetaddressprefix]"}}]}}{"type": "microsoft.network/networkinterfaces", "name": "[concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ni')]", "apiversion": "2020-05-01", "location": "[parameters('location')]", "copy": {"name": "nicopy", "count": "[add(add(length(variables('vminfo')),length(variables('siteinfo'))),length(variables('clientrole')))]"}, "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]", "[resourceid('microsoft.network/publicipaddresses/", concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ip'))]", "[resourceid('microsoft.network/networksecuritygroups/", concat(tolower(tolower(parameters('prefix'))), "-nsg'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"subnet": {"id": "[variables('networksettings').subnetref]"}, "privateipallocationmethod": "[variables('networksettings').privateipallocationmethod]", "privateipaddress": "[concat(variables('networksettings').virtualmachinesipaddress,add(copyindex(),int('4')))]", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ip'))]"}}}], "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", concat(tolower(parameters('prefix')), "-nsg'))]"}}}{"type": "microsoft.network/publicipaddresses", "apiversion": "2020-05-01", "name": "[concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ip')]", "location": "[parameters('location')]", "copy": {"name": "ipcopy", "count": "[add(add(length(variables('vminfo')),length(variables('siteinfo'))),length(variables('clientrole')))]"}, "properties": {"publicipallocationmethod": "[variables('networksettings').publicipallocationmethod]"}}{"type": "microsoft.network/networksecuritygroups", "apiversion": "2020-05-01", "name": "[concat(tolower(parameters('prefix')), "-nsg')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "[variables('securitygrouprulename')]", "properties": "[variables('securitygrouprule')]"}]}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[variables('vmname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces/", variables('nicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[parameters('ubuntuosversion')]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "[variables('diskstoragetype')]"}}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[variables('vmname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces/", variables('nicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[parameters('ubuntuosversion')]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "[variables('diskstoragetype')]"}}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(variables('vmname'),"/", variables('extensionname'))]", "apiversion": "2019-12-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", variables('vmname'))]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "dockerextension", "typehandlerversion": "1.0", "autoupgrademinorversion": true}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[variables('vmname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces/", variables('nicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[parameters('ubuntuosversion')]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "[variables('diskstoragetype')]"}}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-06-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[parameters('dnsnameforpublicip')]"}}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-06-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[parameters('dnsnameforpublicip')]"}}}{"comments": "default network security group for template", "type": "microsoft.network/networksecuritygroups", "apiversion": "2020-06-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "default-allow-22", "properties": {"priority": 1000, "access": "allow", "direction": "inbound", "destinationportrange": "22", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-06-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[parameters('dnsnameforpublicip')]"}}}{"comments": "default network security group for template", "type": "microsoft.network/networksecuritygroups", "apiversion": "2020-06-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "default-allow-22", "properties": {"priority": 1000, "access": "allow", "direction": "inbound", "destinationportrange": "22", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"apiversion": "2020-06-01", "type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"], "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "[variables('subnetprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-06-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[parameters('dnsnameforpublicip')]"}}}{"comments": "default network security group for template", "type": "microsoft.network/networksecuritygroups", "apiversion": "2020-06-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "default-allow-22", "properties": {"priority": 1000, "access": "allow", "direction": "inbound", "destinationportrange": "22", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"apiversion": "2020-06-01", "type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"], "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "[variables('subnetprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}}}]}}{"apiversion": "2020-06-01", "type": "microsoft.network/networkinterfaces", "name": "[variables('nicname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/publicipaddresses/", variables('publicipaddressname'))]", "[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('publicipaddressname'))]"}, "subnet": {"id": "[variables('subnetref')]"}}}]}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "safekitcluster", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('cltemplate')]", "contentversion": "1.0.0.0"}, "parameters": {"os": {"value": "[parameters('os')]"}, "clusternodes": {"value": "[variables('clusternodes')]"}, "vmsize": {"value": "[parameters('vmsize')]"}, "adminuser": {"value": "[parameters('adminuser')]"}, "adminpassword": {"value": "[parameters('adminpassword')]"}, "moduleurl": {"value": "[variables('mirrorurl')[variables('ostype')]]"}, "modulename": {"value": "[variables('modulename')]"}, "vipdnslabel": {"value": "[parameters('vipdnslabel')]"}, "vmdnsprefix": {"value": "[parameters('vmdnsprefix')]"}, "loadbalancer": {"value": "external"}, "location": {"value": "[parameters('location')]"}, "safekitfileuri": {"value": "[if(equals(parameters('safekitfileuri'),"default'),variables('safekitpkgurl')[variables('ostype')],parameters('safekitfileuri'))]"}, "_artifactslocation": {"value": "[parameters('_artifactslocation')]"}, "_artifactslocationsastoken": {"value": "[parameters('_artifactslocationsastoken')]"}}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "safekitcluster", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('cltemplate')]", "contentversion": "1.0.0.0"}, "parameters": {"os": {"value": "[parameters('os')]"}, "clusternodes": {"value": "[variables('clusternodes')]"}, "vmsize": {"value": "[parameters('vmsize')]"}, "adminuser": {"value": "[parameters('adminuser')]"}, "adminpassword": {"value": "[parameters('adminpassword')]"}, "moduleurl": {"value": "[variables('mirrorurl')[variables('ostype')]]"}, "modulename": {"value": "[variables('modulename')]"}, "vipdnslabel": {"value": "[parameters('vipdnslabel')]"}, "vmdnsprefix": {"value": "[parameters('vmdnsprefix')]"}, "loadbalancer": {"value": "external"}, "location": {"value": "[parameters('location')]"}, "safekitfileuri": {"value": "[if(equals(parameters('safekitfileuri'),"default'),variables('safekitpkgurl')[variables('ostype')],parameters('safekitfileuri'))]"}, "_artifactslocation": {"value": "[parameters('_artifactslocation')]"}, "_artifactslocationsastoken": {"value": "[parameters('_artifactslocationsastoken')]"}}}}{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "safekitmoduleconfig", "dependson": ["safekitcluster"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('skcfgmoduletemplate')]", "contentversion": "1.0.0.0"}, "parameters": {"vmname": {"value": "[variables('vmname')]"}, "ostype": {"value": "[variables('ostype')]"}, "modulename": {"value": "[variables('modulename')]"}, "location": {"value": "[parameters('location')]"}, "_artifactslocation": {"value": "[parameters('_artifactslocation')]"}, "_artifactslocationsastoken": {"value": "[parameters('_artifactslocationsastoken')]"}}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"type": "microsoft.resources/deployments", "apiversion": "2021-01-01", "name": "safekitcluster", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('cltemplate')]", "contentversion": "1.0.0.0"}, "parameters": {"os": {"value": "[parameters('os')]"}, "clusternodes": {"value": "[variables('clusternodes')]"}, "vmsize": {"value": "[parameters('vmsize')]"}, "adminuser": {"value": "[parameters('adminuser')]"}, "adminpassword": {"value": "[parameters('adminpassword')]"}, "moduleurl": {"value": "[variables('farmurl')[variables('ostype')]]"}, "modulename": {"value": "[variables('modulename')]"}, "vipdnslabel": {"value": "[parameters('vipdnslabel')]"}, "vmdnsprefix": {"value": "[parameters('vmdnsprefix')]"}, "loadbalancer": {"value": "external"}, "location": {"value": "[parameters('location')]"}, "safekitfileuri": {"value": "[if(equals(parameters('safekitfileuri'),"default'),variables('safekitpkgurl')[variables('ostype')],parameters('safekitfileuri'))]"}, "_artifactslocation": {"value": "[parameters('_artifactslocation')]"}, "_artifactslocationsastoken": {"value": "[parameters('_artifactslocationsastoken')]"}}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"type": "microsoft.resources/deployments", "apiversion": "2021-01-01", "name": "safekitcluster", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('cltemplate')]", "contentversion": "1.0.0.0"}, "parameters": {"os": {"value": "[parameters('os')]"}, "clusternodes": {"value": "[variables('clusternodes')]"}, "vmsize": {"value": "[parameters('vmsize')]"}, "adminuser": {"value": "[parameters('adminuser')]"}, "adminpassword": {"value": "[parameters('adminpassword')]"}, "moduleurl": {"value": "[variables('farmurl')[variables('ostype')]]"}, "modulename": {"value": "[variables('modulename')]"}, "vipdnslabel": {"value": "[parameters('vipdnslabel')]"}, "vmdnsprefix": {"value": "[parameters('vmdnsprefix')]"}, "loadbalancer": {"value": "external"}, "location": {"value": "[parameters('location')]"}, "safekitfileuri": {"value": "[if(equals(parameters('safekitfileuri'),"default'),variables('safekitpkgurl')[variables('ostype')],parameters('safekitfileuri'))]"}, "_artifactslocation": {"value": "[parameters('_artifactslocation')]"}, "_artifactslocationsastoken": {"value": "[parameters('_artifactslocationsastoken')]"}}}}{"type": "microsoft.resources/deployments", "apiversion": "2018-05-01", "name": "safekitmoduleconfig", "dependson": ["safekitcluster"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('skcfgmoduletemplate')]", "contentversion": "1.0.0.0"}, "parameters": {"vmname": {"value": "[variables('vmname')]"}, "ostype": {"value": "[variables('ostype')]"}, "modulename": {"value": "[variables('modulename')]"}, "location": {"value": "[parameters('location')]"}, "_artifactslocation": {"value": "[parameters('_artifactslocation')]"}, "_artifactslocationsastoken": {"value": "[parameters('_artifactslocationsastoken')]"}}}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2020-06-01", "type": "microsoft.compute/virtualmachines", "name": "[concat(parameters('vmnameprefix'), copyindex())]", "location": "[parameters('location')]", "copy": {"name": "vmloop", "count": "[parameters('scalenumber')]"}, "dependson": ["nicloop"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[concat(parameters('vmnameprefix'), copyindex())]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": "[variables('imagereference')[parameters('hostos')]]", "osdisk": {"name": "[concat(parameters('vmnameprefix'), copyindex(), "_osdisk')]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "standardssd_lrs"}}, "datadisks": [{"name": "[concat(parameters('vmnameprefix'), copyindex(), "_datadisk1')]", "disksizegb": "[parameters('disksize')]", "lun": 0, "createoption": "empty"}, {"name": "[concat(parameters('vmnameprefix'), copyindex(), "_datadisk2')]", "disksizegb": "[parameters('disksize')]", "lun": 1, "createoption": "empty"}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", concat(variables('nicname'), copyindex()))]"}]}}, "resources": [{"type": "extensions", "name": "gfs-config", "apiversion": "2020-06-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines", concat(parameters('vmnameprefix'), copyindex()))]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"fileuris": ["[variables('customscriptfilepath')]"], "commandtoexecute": "[concat(variables('customscriptcommandtoexecute'), " ", parameters('vmnameprefix'), " ", variables('vmipprefix'), " ", parameters('volumename'), " ", copyindex(), " ", parameters('scalenumber'))]"}}}]}
Establish connection to a VNET via an ExpressRoute circuit
{"condition": "[equals(parameters('virtualnetworkneworexisting'), "new')]", "type": "microsoft.network/networksecuritygroups", "apiversion": "2020-06-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "default-allow-22", "properties": {"priority": 1000, "access": "allow", "direction": "inbound", "destinationportrange": "22", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"condition": "[equals(parameters('virtualnetworkneworexisting'), "new')]", "type": "microsoft.network/networksecuritygroups", "apiversion": "2020-06-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "default-allow-22", "properties": {"priority": 1000, "access": "allow", "direction": "inbound", "destinationportrange": "22", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"condition": "[equals(parameters('virtualnetworkneworexisting'), "new')]", "type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"], "properties": {"addressspace": {"addressprefixes": ["[parameters('virtualnetworkaddressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetaddressprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"condition": "[equals(parameters('virtualnetworkneworexisting'), "new')]", "type": "microsoft.network/networksecuritygroups", "apiversion": "2020-06-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "default-allow-22", "properties": {"priority": 1000, "access": "allow", "direction": "inbound", "destinationportrange": "22", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"condition": "[equals(parameters('virtualnetworkneworexisting'), "new')]", "type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"], "properties": {"addressspace": {"addressprefixes": ["[parameters('virtualnetworkaddressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetaddressprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}}}]}}{"apiversion": "2020-06-01", "type": "microsoft.network/publicipaddresses", "name": "[concat(variables('pipname'), copyindex())]", "location": "[parameters('location')]", "copy": {"name": "piploop", "count": "[parameters('scalenumber')]"}, "properties": {"publicipallocationmethod": "dynamic"}}
Establish connection to a VNET via an ExpressRoute circuit
{"condition": "[equals(parameters('virtualnetworkneworexisting'), "new')]", "type": "microsoft.network/networksecuritygroups", "apiversion": "2020-06-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "default-allow-22", "properties": {"priority": 1000, "access": "allow", "direction": "inbound", "destinationportrange": "22", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"condition": "[equals(parameters('virtualnetworkneworexisting'), "new')]", "type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"], "properties": {"addressspace": {"addressprefixes": ["[parameters('virtualnetworkaddressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetaddressprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}}}]}}{"apiversion": "2020-06-01", "type": "microsoft.network/publicipaddresses", "name": "[concat(variables('pipname'), copyindex())]", "location": "[parameters('location')]", "copy": {"name": "piploop", "count": "[parameters('scalenumber')]"}, "properties": {"publicipallocationmethod": "dynamic"}}{"apiversion": "2020-06-01", "type": "microsoft.network/networkinterfaces", "name": "[concat(variables('nicname'), copyindex())]", "location": "[parameters('location')]", "copy": {"name": "nicloop", "count": "[parameters('scalenumber')]"}, "dependson": ["[parameters('virtualnetworkname')]", "piploop"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", concat(variables('pipname'), copyindex()))]"}, "privateipallocationmethod": "static", "privateipaddress": "[concat(variables('vmipprefix'), copyindex())]", "subnet": {"id": "[variables('gfssubnetref')]"}}}]}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"type": "microsoft.compute/virtualmachines", "name": "[concat('tableau", copyindex(1))]", "apiversion": "2020-12-01", "location": "[parameters('location')]", "copy": {"name": "virtualmachineloop", "count": "[variables('numberofinstances')]"}, "dependson": ["nicloop"], "properties": {"hardwareprofile": {"vmsize": "[variables('virtualmachinesize')]"}, "osprofile": {"computername": "[concat('tableauvm", copyindex(1))]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": "[variables('imagereference')[parameters('os')]]", "osdisk": {"caching": "readwrite", "createoption": "fromimage"}, "copy": [{"name": "datadisks", "count": 1, "input": {"disksizegb": 64, "lun": "[copyindex('datadisks')]", "createoption": "empty"}}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",concat('tabnic", copyindex(1)))]"}]}}, "resources": [{"condition": "[equals(parameters('accept_eula'), "yes')]", "name": "[concat('tableau", copyindex(1),"/customscript')]", "type": "microsoft.compute/virtualmachines/extensions", "location": "[parameters('location')]", "apiversion": "2020-12-01", "dependson": ["[resourceid('microsoft.compute/virtualmachines", concat('tableau", copyindex(1)))]"], "tags": {"displayname": "customscriptextension"}, "properties": "[if(variables('os_is_linux'),variables('lin_cse_properties'),variables('win_cse_properties'))]"}]}
Create a VM from a Windows Image with 4 Empty Data Disks
{"type": "microsoft.compute/virtualmachines", "name": "[concat('tableau", copyindex(1))]", "apiversion": "2020-12-01", "location": "[parameters('location')]", "copy": {"name": "virtualmachineloop", "count": "[variables('numberofinstances')]"}, "dependson": ["nicloop"], "properties": {"hardwareprofile": {"vmsize": "[variables('virtualmachinesize')]"}, "osprofile": {"computername": "[concat('tableauvm", copyindex(1))]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": "[variables('imagereference')[parameters('os')]]", "osdisk": {"caching": "readwrite", "createoption": "fromimage"}, "copy": [{"name": "datadisks", "count": 1, "input": {"disksizegb": 64, "lun": "[copyindex('datadisks')]", "createoption": "empty"}}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",concat('tabnic", copyindex(1)))]"}]}}, "resources": [{"condition": "[equals(parameters('accept_eula'), "yes')]", "name": "[concat('tableau", copyindex(1),"/customscript')]", "type": "microsoft.compute/virtualmachines/extensions", "location": "[parameters('location')]", "apiversion": "2020-12-01", "dependson": ["[resourceid('microsoft.compute/virtualmachines", concat('tableau", copyindex(1)))]"], "tags": {"displayname": "customscriptextension"}, "properties": "[if(variables('os_is_linux'),variables('lin_cse_properties'),variables('win_cse_properties'))]"}]}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"apiversion": "2020-10-01", "name": "pid-6c922c23-cc65-4b76-8290-74feb0f3c476", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "template": {"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymenttemplate.json#", "contentversion": "1.0.0.0", "resources": []}}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "apiversion": "2020-07-01", "location": "[parameters('location')]", "dependson": ["[variables('nsgname')]"], "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnet1name')]", "properties": {"addressprefix": "[variables('subnet1prefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups",variables('nsgname'))]"}}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "apiversion": "2020-07-01", "location": "[parameters('location')]", "dependson": ["[variables('nsgname')]"], "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnet1name')]", "properties": {"addressprefix": "[variables('subnet1prefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups",variables('nsgname'))]"}}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('nsgname')]", "location": "[parameters('location')]", "tags": {"displayname": "[variables('nsgname')]"}, "properties": {"securityrules": "[if(variables('os_is_linux'),variables('linuxsecurityrules'),variables('windowssecurityrules'))]"}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "apiversion": "2020-07-01", "location": "[parameters('location')]", "dependson": ["[variables('nsgname')]"], "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnet1name')]", "properties": {"addressprefix": "[variables('subnet1prefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups",variables('nsgname'))]"}}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('nsgname')]", "location": "[parameters('location')]", "tags": {"displayname": "[variables('nsgname')]"}, "properties": {"securityrules": "[if(variables('os_is_linux'),variables('linuxsecurityrules'),variables('windowssecurityrules'))]"}}{"type": "microsoft.network/publicipaddresses", "name": "[concat('tabpip", copyindex(1))]", "apiversion": "2020-07-01", "location": "[parameters('location')]", "copy": {"name": "piploop", "count": "[variables('numberofinstances')]"}, "dependson": ["[variables('virtualnetworkname')]"], "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[concat('a", variables('publicipname'), copyindex(1))]"}}}{"type": "microsoft.network/networkinterfaces", "name": "[concat('tabnic", copyindex(1))]", "apiversion": "2020-07-01", "location": "[parameters('location')]", "copy": {"name": "nicloop", "count": "[variables('numberofinstances')]"}, "dependson": ["[variables('virtualnetworkname')]", "piploop"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses/", concat('tabpip", copyindex(1)))]"}, "privateipallocationmethod": "dynamic", "subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets",variables('virtualnetworkname'),variables('subnet1name'))]"}}}]}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"type": "microsoft.compute/virtualmachines", "name": "[concat(variables('vmname'))]", "dependson": ["[resourceid('microsoft.network/networkinterfaces/", variables('nicname'))]"], "apiversion": "2017-12-01", "location": "[parameters('location')]", "properties": {"hardwareprofile": {"vmsize": "[variables('sizes')[parameters('sapsystemsize')][parameters('dbtype')].vmsize]"}, "osprofile": {"computername": "[parameters('computername')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[variables('images')[parameters('ostype')].publisher]", "offer": "[variables('images')[parameters('ostype')].offer]", "sku": "[variables('images')[parameters('ostype')].sku]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'), "-osdisk')]", "caching": "readwrite", "createoption": "fromimage", "disksizegb": "[variables('images')[parameters('ostype')].osdisksize]", "manageddisk": {"storageaccounttype": "premium_lrs"}}, "datadisks": "[if(parameters('deployemptytarget'), json('[]'), variables('sizes')[parameters('sapsystemsize')][parameters('dbtype')].disks)]"}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('nicname'))]"}]}}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"type": "microsoft.compute/virtualmachines", "name": "[concat(variables('vmname'))]", "dependson": ["[resourceid('microsoft.network/networkinterfaces/", variables('nicname'))]"], "apiversion": "2017-12-01", "location": "[parameters('location')]", "properties": {"hardwareprofile": {"vmsize": "[variables('sizes')[parameters('sapsystemsize')][parameters('dbtype')].vmsize]"}, "osprofile": {"computername": "[parameters('computername')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[variables('images')[parameters('ostype')].publisher]", "offer": "[variables('images')[parameters('ostype')].offer]", "sku": "[variables('images')[parameters('ostype')].sku]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'), "-osdisk')]", "caching": "readwrite", "createoption": "fromimage", "disksizegb": "[variables('images')[parameters('ostype')].osdisksize]", "manageddisk": {"storageaccounttype": "premium_lrs"}}, "datadisks": "[if(parameters('deployemptytarget'), json('[]'), variables('sizes')[parameters('sapsystemsize')][parameters('dbtype')].disks)]"}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('nicname'))]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(variables('vmname'), "/", variables('cseextname'))]", "apiversion": "2017-12-01", "location": "[parameters('location')]", "condition": "[not(parameters('deployemptytarget'))]", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", variables('vmname'))]"], "properties": {"publisher": "[variables('cseextpublisher')]", "type": "[variables('cseextname')]", "typehandlerversion": "[variables('cseextversion')]", "autoupgrademinorversion": true, "settings": {"fileuris": ["[variables('csextensionscript')]"]}, "protectedsettings": {"commandtoexecute": "[concat(variables('csextensionscriptcall'), " ", variables('sizes')[parameters('sapsystemsize')][parameters('dbtype')].scriptarguments[variables('internalostype')])]"}}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"type": "microsoft.compute/virtualmachines", "name": "[concat(variables('vmname'))]", "dependson": ["[resourceid('microsoft.network/networkinterfaces/", variables('nicname'))]"], "apiversion": "2017-12-01", "location": "[parameters('location')]", "properties": {"hardwareprofile": {"vmsize": "[variables('sizes')[parameters('sapsystemsize')][parameters('dbtype')].vmsize]"}, "osprofile": {"computername": "[parameters('computername')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[variables('images')[parameters('ostype')].publisher]", "offer": "[variables('images')[parameters('ostype')].offer]", "sku": "[variables('images')[parameters('ostype')].sku]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'), "-osdisk')]", "caching": "readwrite", "createoption": "fromimage", "disksizegb": "[variables('images')[parameters('ostype')].osdisksize]", "manageddisk": {"storageaccounttype": "premium_lrs"}}, "datadisks": "[if(parameters('deployemptytarget'), json('[]'), variables('sizes')[parameters('sapsystemsize')][parameters('dbtype')].disks)]"}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('nicname'))]"}]}}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"type": "microsoft.compute/virtualmachines", "name": "[concat(variables('vmname'))]", "dependson": ["[resourceid('microsoft.network/networkinterfaces/", variables('nicname'))]"], "apiversion": "2017-12-01", "location": "[parameters('location')]", "properties": {"hardwareprofile": {"vmsize": "[variables('sizes')[parameters('sapsystemsize')][parameters('dbtype')].vmsize]"}, "osprofile": {"computername": "[parameters('computername')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[variables('images')[parameters('ostype')].publisher]", "offer": "[variables('images')[parameters('ostype')].offer]", "sku": "[variables('images')[parameters('ostype')].sku]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'), "-osdisk')]", "caching": "readwrite", "createoption": "fromimage", "disksizegb": "[variables('images')[parameters('ostype')].osdisksize]", "manageddisk": {"storageaccounttype": "premium_lrs"}}, "datadisks": "[if(parameters('deployemptytarget'), json('[]'), variables('sizes')[parameters('sapsystemsize')][parameters('dbtype')].disks)]"}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('nicname'))]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(variables('vmname'), "/", variables('cseextname'))]", "apiversion": "2017-12-01", "location": "[parameters('location')]", "condition": "[not(parameters('deployemptytarget'))]", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", variables('vmname'))]"], "properties": {"publisher": "[variables('cseextpublisher')]", "type": "[variables('cseextname')]", "typehandlerversion": "[variables('cseextversion')]", "autoupgrademinorversion": true, "settings": {"fileuris": ["[variables('csextensionscript')]"]}, "protectedsettings": {"commandtoexecute": "[concat(variables('csextensionscriptcall'), " ", variables('sizes')[parameters('sapsystemsize')][parameters('dbtype')].scriptarguments[variables('internalostype')])]"}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"apiversion": "2018-02-01", "name": "[concat(deployment().name, "-installsaphostagent')]", "type": "microsoft.resources/deployments", "condition": "[greater(length(parameters('saphostagentarchivefilename')), 0)]", "dependson": ["[resourceid('microsoft.compute/virtualmachines/extensions", variables('vmname'), variables('cseextname'))]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'), concat('nestedtemplates/installhostagent.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"vmname": {"value": "[variables('vmname')]"}, "cseextname": {"value": "[variables('cseextname')]"}, "cseextpublisher": {"value": "[variables('cseextpublisher')]"}, "cseextversion": {"value": "[variables('cseextversion')]"}, "sapartifactslocation": {"value": "[parameters('sapartifactslocation')]"}, "sapartifactslocationsastoken": {"value": "[parameters('sapartifactslocationsastoken')]"}, "sapcarfilename": {"value": "[parameters('sapcarfilename')]"}, "saphostagentarchivefilename": {"value": "[parameters('saphostagentarchivefilename')]"}, "sapacextarchivefilename": {"value": "[parameters('sapacextarchivefilename')]"}, "vcredistfilename": {"value": "[parameters('vcredistfilename')]"}, "sapadmpassword": {"value": "[parameters('sapadmpassword')]"}, "sapadmid": {"value": "[parameters('sapadmid')]"}, "sapsysgid": {"value": "[parameters('sapsysgid')]"}, "ostype": {"value": "[variables('internalostype')]"}, "location": {"value": "[parameters('location')]"}}}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/networksecuritygroups", "name": "[concat(variables('nsgname'))]", "apiversion": "2020-07-01", "location": "[parameters('location')]", "condition": "[equals(length(parameters('subnetid')), 0)]", "properties": {"securityrules": "[variables('selectedsecurityrules')]"}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/networksecuritygroups", "name": "[concat(variables('nsgname'))]", "apiversion": "2020-07-01", "location": "[parameters('location')]", "condition": "[equals(length(parameters('subnetid')), 0)]", "properties": {"securityrules": "[variables('selectedsecurityrules')]"}}{"type": "microsoft.network/virtualnetworks", "name": "[variables('vnetname')]", "apiversion": "2018-04-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups/", variables('nsgname'))]"], "condition": "[equals(length(parameters('subnetid')), 0)]", "properties": {"addressspace": {"addressprefixes": ["10.0.0.0/16"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "10.0.0.0/24", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('nsgname'))]"}}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/networksecuritygroups", "name": "[concat(variables('nsgname'))]", "apiversion": "2020-07-01", "location": "[parameters('location')]", "condition": "[equals(length(parameters('subnetid')), 0)]", "properties": {"securityrules": "[variables('selectedsecurityrules')]"}}{"type": "microsoft.network/virtualnetworks", "name": "[variables('vnetname')]", "apiversion": "2018-04-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups/", variables('nsgname'))]"], "condition": "[equals(length(parameters('subnetid')), 0)]", "properties": {"addressspace": {"addressprefixes": ["10.0.0.0/16"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "10.0.0.0/24", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('nsgname'))]"}}}]}}{"type": "microsoft.network/networkinterfaces", "name": "[variables('nicname')]", "apiversion": "2017-06-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('vnetname'))]"], "properties": {"ipconfigurations": "[variables('selectedipconfig')]"}}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"type": "microsoft.storage/storageaccounts", "name": "[variables('storageaccountname')]", "apiversion": "2021-01-01", "location": "[parameters('location')]", "sku": {"name": "[variables('internalstoragetype')]"}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(variables('vmname'),"/", variables('cseextname'))]", "apiversion": "2015-06-15", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.resources/deployments/", variables('nesteddeploymentname'))]"], "properties": {"publisher": "[variables('cseextpublisher')]", "type": "[variables('cseextname')]", "typehandlerversion": "[variables('cseextversion')]", "autoupgrademinorversion": true, "settings": {"fileuris": ["[variables('csextension')[variables('internalostype')].script]"], "commandtoexecute": "[concat(variables(\"csextension\')[variables(\"internalostype\')].scriptcall, \" -dbdataluns "\", reference(variables(\"nesteddeploymentname\')).outputs.dbdataluns.value , \"" -dblogluns "\", reference(variables(\"nesteddeploymentname\')).outputs.dblogluns.value, \""\')]"}}}
Storage Account with Storage Service Encryption and a blob deletion retention policy
{"type": "microsoft.storage/storageaccounts", "name": "[variables('storageaccountname')]", "apiversion": "2021-01-01", "location": "[parameters('location')]", "sku": {"name": "[variables('internalstoragetype')]"}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"apiversion": "2021-04-01", "name": "[variables('nesteddeploymentnamevnet')]", "type": "microsoft.resources/deployments", "properties": {"hardwareprofile": {"vmsize": "[variables('vmsize')]"}, "mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'), concat('shared/", parameters('neworexistingsubnet'), "vnet.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"vnetname": {"value": "[variables('vnetname')]"}, "addressprefix": {"value": "[variables('addressprefix')]"}, "subnetname": {"value": "[variables('subnetname')]"}, "subnetprefix": {"value": "[variables('subnetprefix')]"}, "location": {"value": "[parameters('location')]"}}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"apiversion": "2021-04-01", "name": "[variables('nesteddeploymentnamevnet')]", "type": "microsoft.resources/deployments", "properties": {"hardwareprofile": {"vmsize": "[variables('vmsize')]"}, "mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'), concat('shared/", parameters('neworexistingsubnet'), "vnet.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"vnetname": {"value": "[variables('vnetname')]"}, "addressprefix": {"value": "[variables('addressprefix')]"}, "subnetname": {"value": "[variables('subnetname')]"}, "subnetprefix": {"value": "[variables('subnetprefix')]"}, "location": {"value": "[parameters('location')]"}}}}{"apiversion": "2021-04-01", "name": "[variables('nesteddeploymentnamenic')]", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'), concat('shared/nic-config.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"vnetname": {"value": "[variables('vnetname')]"}, "subnetname": {"value": "[variables('subnetname')]"}, "publicipname": {"value": "[variables('publicipname')]"}, "nsgname": {"value": "[variables('nsgname')]"}, "neworexistingsubnet": {"value": "[parameters('neworexistingsubnet')]"}, "subnetid": {"value": "[parameters('subnetid')]"}}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"apiversion": "2021-04-01", "name": "[variables('nesteddeploymentnamevnet')]", "type": "microsoft.resources/deployments", "properties": {"hardwareprofile": {"vmsize": "[variables('vmsize')]"}, "mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'), concat('shared/", parameters('neworexistingsubnet'), "vnet.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"vnetname": {"value": "[variables('vnetname')]"}, "addressprefix": {"value": "[variables('addressprefix')]"}, "subnetname": {"value": "[variables('subnetname')]"}, "subnetprefix": {"value": "[variables('subnetprefix')]"}, "location": {"value": "[parameters('location')]"}}}}{"apiversion": "2021-04-01", "name": "[variables('nesteddeploymentnamenic')]", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'), concat('shared/nic-config.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"vnetname": {"value": "[variables('vnetname')]"}, "subnetname": {"value": "[variables('subnetname')]"}, "publicipname": {"value": "[variables('publicipname')]"}, "nsgname": {"value": "[variables('nsgname')]"}, "neworexistingsubnet": {"value": "[parameters('neworexistingsubnet')]"}, "subnetid": {"value": "[parameters('subnetid')]"}}}}{"apiversion": "2021-04-01", "name": "[variables('nesteddeploymentnameprof')]", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'), concat('shared/os-disk-parts.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"imagesku": {"value": "[variables('imagesku')]"}, "imagepublisher": {"value": "[variables('imagepublisher')]"}, "imageoffer": {"value": "[variables('imageoffer')]"}, "userimagevhduri": {"value": ""}, "userimagestorageaccount": {"value": ""}, "osdiskvhduri": {"value": ""}, "osdisktype": {"value": "[variables('osdisktype')]"}, "ostype": {"value": "[variables('internalostype')]"}, "sidlower": {"value": "[variables('sidlower')]"}, "vmname": {"value": "[variables('vmname')]"}, "storageaccounturi": {"value": "[reference(variables('storageaccountname'), "2021-01-01').primaryendpoints["blob"]]"}}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"apiversion": "2021-04-01", "name": "[variables('nesteddeploymentnamevnet')]", "type": "microsoft.resources/deployments", "properties": {"hardwareprofile": {"vmsize": "[variables('vmsize')]"}, "mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'), concat('shared/", parameters('neworexistingsubnet'), "vnet.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"vnetname": {"value": "[variables('vnetname')]"}, "addressprefix": {"value": "[variables('addressprefix')]"}, "subnetname": {"value": "[variables('subnetname')]"}, "subnetprefix": {"value": "[variables('subnetprefix')]"}, "location": {"value": "[parameters('location')]"}}}}{"apiversion": "2021-04-01", "name": "[variables('nesteddeploymentnamenic')]", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'), concat('shared/nic-config.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"vnetname": {"value": "[variables('vnetname')]"}, "subnetname": {"value": "[variables('subnetname')]"}, "publicipname": {"value": "[variables('publicipname')]"}, "nsgname": {"value": "[variables('nsgname')]"}, "neworexistingsubnet": {"value": "[parameters('neworexistingsubnet')]"}, "subnetid": {"value": "[parameters('subnetid')]"}}}}{"apiversion": "2021-04-01", "name": "[variables('nesteddeploymentnameprof')]", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'), concat('shared/os-disk-parts.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"imagesku": {"value": "[variables('imagesku')]"}, "imagepublisher": {"value": "[variables('imagepublisher')]"}, "imageoffer": {"value": "[variables('imageoffer')]"}, "userimagevhduri": {"value": ""}, "userimagestorageaccount": {"value": ""}, "osdiskvhduri": {"value": ""}, "osdisktype": {"value": "[variables('osdisktype')]"}, "ostype": {"value": "[variables('internalostype')]"}, "sidlower": {"value": "[variables('sidlower')]"}, "vmname": {"value": "[variables('vmname')]"}, "storageaccounturi": {"value": "[reference(variables('storageaccountname'), "2021-01-01').primaryendpoints["blob"]]"}}}}{"apiversion": "2021-04-01", "name": "[variables('nesteddeploymentnamepip')]", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'), concat('shared/", parameters('neworexistingsubnet'), "pip.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"publicipname": {"value": "[variables('publicipname')]"}, "publicipaddresstype": {"value": "[variables('publicipaddresstype')]"}, "location": {"value": "[parameters('location')]"}}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"apiversion": "2021-04-01", "name": "[variables('nesteddeploymentnamevnet')]", "type": "microsoft.resources/deployments", "properties": {"hardwareprofile": {"vmsize": "[variables('vmsize')]"}, "mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'), concat('shared/", parameters('neworexistingsubnet'), "vnet.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"vnetname": {"value": "[variables('vnetname')]"}, "addressprefix": {"value": "[variables('addressprefix')]"}, "subnetname": {"value": "[variables('subnetname')]"}, "subnetprefix": {"value": "[variables('subnetprefix')]"}, "location": {"value": "[parameters('location')]"}}}}{"apiversion": "2021-04-01", "name": "[variables('nesteddeploymentnamenic')]", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'), concat('shared/nic-config.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"vnetname": {"value": "[variables('vnetname')]"}, "subnetname": {"value": "[variables('subnetname')]"}, "publicipname": {"value": "[variables('publicipname')]"}, "nsgname": {"value": "[variables('nsgname')]"}, "neworexistingsubnet": {"value": "[parameters('neworexistingsubnet')]"}, "subnetid": {"value": "[parameters('subnetid')]"}}}}{"apiversion": "2021-04-01", "name": "[variables('nesteddeploymentnameprof')]", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'), concat('shared/os-disk-parts.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"imagesku": {"value": "[variables('imagesku')]"}, "imagepublisher": {"value": "[variables('imagepublisher')]"}, "imageoffer": {"value": "[variables('imageoffer')]"}, "userimagevhduri": {"value": ""}, "userimagestorageaccount": {"value": ""}, "osdiskvhduri": {"value": ""}, "osdisktype": {"value": "[variables('osdisktype')]"}, "ostype": {"value": "[variables('internalostype')]"}, "sidlower": {"value": "[variables('sidlower')]"}, "vmname": {"value": "[variables('vmname')]"}, "storageaccounturi": {"value": "[reference(variables('storageaccountname'), "2021-01-01').primaryendpoints["blob"]]"}}}}{"apiversion": "2021-04-01", "name": "[variables('nesteddeploymentnamepip')]", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'), concat('shared/", parameters('neworexistingsubnet'), "pip.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"publicipname": {"value": "[variables('publicipname')]"}, "publicipaddresstype": {"value": "[variables('publicipaddresstype')]"}, "location": {"value": "[parameters('location')]"}}}}{"apiversion": "2021-04-01", "name": "[variables('nesteddeploymentnamensg')]", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'), concat('shared/", parameters('neworexistingsubnet'), "nsg.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"nsgname": {"value": "[variables('nsgname')]"}, "location": {"value": "[parameters('location')]"}, "ostype": {"value": "[variables('internalostype')]"}}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"apiversion": "2021-04-01", "name": "[variables('nesteddeploymentnamevnet')]", "type": "microsoft.resources/deployments", "properties": {"hardwareprofile": {"vmsize": "[variables('vmsize')]"}, "mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'), concat('shared/", parameters('neworexistingsubnet'), "vnet.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"vnetname": {"value": "[variables('vnetname')]"}, "addressprefix": {"value": "[variables('addressprefix')]"}, "subnetname": {"value": "[variables('subnetname')]"}, "subnetprefix": {"value": "[variables('subnetprefix')]"}, "location": {"value": "[parameters('location')]"}}}}{"apiversion": "2021-04-01", "name": "[variables('nesteddeploymentnamenic')]", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'), concat('shared/nic-config.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"vnetname": {"value": "[variables('vnetname')]"}, "subnetname": {"value": "[variables('subnetname')]"}, "publicipname": {"value": "[variables('publicipname')]"}, "nsgname": {"value": "[variables('nsgname')]"}, "neworexistingsubnet": {"value": "[parameters('neworexistingsubnet')]"}, "subnetid": {"value": "[parameters('subnetid')]"}}}}{"apiversion": "2021-04-01", "name": "[variables('nesteddeploymentnameprof')]", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'), concat('shared/os-disk-parts.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"imagesku": {"value": "[variables('imagesku')]"}, "imagepublisher": {"value": "[variables('imagepublisher')]"}, "imageoffer": {"value": "[variables('imageoffer')]"}, "userimagevhduri": {"value": ""}, "userimagestorageaccount": {"value": ""}, "osdiskvhduri": {"value": ""}, "osdisktype": {"value": "[variables('osdisktype')]"}, "ostype": {"value": "[variables('internalostype')]"}, "sidlower": {"value": "[variables('sidlower')]"}, "vmname": {"value": "[variables('vmname')]"}, "storageaccounturi": {"value": "[reference(variables('storageaccountname'), "2021-01-01').primaryendpoints["blob"]]"}}}}{"apiversion": "2021-04-01", "name": "[variables('nesteddeploymentnamepip')]", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'), concat('shared/", parameters('neworexistingsubnet'), "pip.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"publicipname": {"value": "[variables('publicipname')]"}, "publicipaddresstype": {"value": "[variables('publicipaddresstype')]"}, "location": {"value": "[parameters('location')]"}}}}{"apiversion": "2021-04-01", "name": "[variables('nesteddeploymentnamensg')]", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'), concat('shared/", parameters('neworexistingsubnet'), "nsg.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"nsgname": {"value": "[variables('nsgname')]"}, "location": {"value": "[parameters('location')]"}, "ostype": {"value": "[variables('internalostype')]"}}}}{"apiversion": "2021-04-01", "name": "[variables('nesteddeploymentname')]", "type": "microsoft.resources/deployments", "dependson": ["[resourceid('microsoft.storage/storageaccounts/", variables('storageaccountname'))]", "[resourceid('microsoft.resources/deployments/", variables('nesteddeploymentnameprof'))]", "[resourceid('microsoft.network/networkinterfaces/", variables('nicname'))]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'), concat('shared/cs-server-", variables('vmsize'), "_multinic_no.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"imagereference": {"value": "[reference(variables('nesteddeploymentnameprof')).outputs.imagereference.value]"}, "osdisk": {"value": "[reference(variables('nesteddeploymentnameprof')).outputs.osdisk.value]"}, "osdisktype": {"value": "[variables('osdisktype')]"}, "sidlower": {"value": "[variables('sidlower')]"}, "vmname": {"value": "[variables('vmname')]"}, "vmsize": {"value": "[variables('vmsize')]"}, "adminusername": {"value": "[parameters('adminusername')]"}, "adminpassword": {"value": "[parameters('adminpassword')]"}, "storageaccounturi": {"value": "[reference(variables('storageaccountname'), "2021-01-01').primaryendpoints["blob"]]"}, "nicname": {"value": "[variables('nicname')]"}, "location": {"value": "[parameters('location')]"}}}}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"type": "microsoft.storage/storageaccounts", "apiversion": "2021-02-01", "name": "[parameters('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('storageskuname')]", "tier": "[parameters('storageskutier')]"}, "kind": "[parameters('storagekind')]", "properties": {"accesstier": "[parameters('accesstier')]", "allowsharedkeyaccess": false, "supportshttpstrafficonly": true, "allowblobpublicaccess": false, "minimumtlsversion": "tls1_2"}}