MihaiIonascu/Azure_IaC_test huggingface dataset:
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.storage/storageaccounts/", variables('newstorageaccountname'))]", "[resourceid('microsoft.network/networkinterfaces/", variables('nicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmname')]", "adminusername": "[parameters('vmadminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[variables('ubuntuosversion')]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(variables('vmname'),"/newuserscript')]", "apiversion": "2019-12-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", variables('vmname'))]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"fileuris": ["[uri(parameters('_artifactslocation'), concat(variables('installscriptname'), parameters('_artifactslocationsastoken')))]", "[uri(parameters('_artifactslocation'), concat('forcetls.ldif", parameters('_artifactslocationsastoken')))]", "[uri(parameters('_artifactslocation'), concat('settlsconfig.ldif", parameters('_artifactslocationsastoken')))]"]}, "protectedsettings": {"commandtoexecute": "[variables('installcommand')]"}}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.

{"type": "microsoft.compute/virtualmachines", "apiversion": "2019-07-01", "name": "[parameters('vm_name')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces", parameters('nic_name'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "storageprofile": {"imagereference": {"publisher": "[variables('vmimagepublisher')]", "offer": "[variables('vmimageoffer')]", "sku": "[variables('sku')]", "version": "latest"}, "osdisk": {"ostype": "windows", "name": "[concat(parameters('vm_name'), "_osdisk')]", "createoption": "fromimage", "caching": "readwrite"}}, "osprofile": {"computername": "[parameters('vm_name')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", parameters('nic_name'))]"}]}}}{"name": "[concat(parameters('vm_name'),"/gpudrivers')]", "type": "microsoft.compute/virtualmachines/extensions", "location": "[parameters('location')]", "apiversion": "2019-07-01", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", parameters('vm_name'))]", "[resourceid('microsoft.compute/virtualmachines/extensions", parameters('vm_name'), "setupchocolatey')]"], "tags": {"displayname": "gpu-nvidia-drivers"}, "properties": {"publisher": "microsoft.hpccompute", "type": "nvidiagpudriverwindows", "typehandlerversion": "1.2", "autoupgrademinorversion": true}}{"name": "[concat(parameters('vm_name'),"/setupchocolatey')]", "apiversion": "2019-07-01", "type": "microsoft.compute/virtualmachines/extensions", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", parameters('vm_name'))]"], "tags": {"displayname": "config-choco"}, "properties": {"publisher": "microsoft.compute", "type": "customscriptextension", "typehandlerversion": "1.10", "autoupgrademinorversion": true, "settings": {"fileuris": ["[variables('setupscriptlocation')]"], "commandtoexecute": "[concat('powershell -executionpolicy bypass -file ", parameters('setupchocolateyscriptfilename')," -chocopackages ",parameters('chocopackages'))]"}}}
Deploy an empty edge node and add it to an existing HDInsight cluster

{"name": "[concat(parameters('clustername'),"/", variables('applicationname'))]", "type": "microsoft.hdinsight/clusters/applications", "apiversion": "2021-06-01", "properties": {"marketplaceidentifier": "emptynode", "computeprofile": {"roles": [{"name": "edgenode", "targetinstancecount": 1, "hardwareprofile": {"vmsize": "[parameters('edgenodevirtualmachinesize')]"}}]}, "installscriptactions": [{"name": "[concat('emptynode","-" ,uniquestring(variables('applicationname')))]", "uri": "[uri(parameters('_artifactslocation'), concat(parameters('installscriptactionfolder'), "/", parameters('installscriptaction'), parameters('_artifactslocationsastoken')))]", "roles": ["edgenode"]}], "sshendpoints": [{"location": "[concat(variables('applicationname'),".",parameters('clustername'),"-ssh.azurehdinsight.net')]", "destinationport": 22, "publicport": 22}], "applicationtype": "customapplication"}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.

{"apiversion": "2017-03-30", "type": "microsoft.compute/virtualmachines", "name": "[variables('vmname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts/", variables('storageaccountname'))]", "[resourceid('microsoft.network/networkinterfaces/", concat(variables('vmname'), "-nic'))]"], "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('osimagepublisher')]", "offer": "[variables('osimageoffer')]", "sku": "[variables('osimagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",concat(variables('vmname'), "-nic'))]"}]}}}{"apiversion": "2015-06-15", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(variables('vmname'), "/installscript')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", variables('vmname'))]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"fileuris": ["[concat(variables('scriptdownloaduri'), variables('installscript'))]", "[concat(variables('scriptdownloaduri'), "server-vars.yml')]"], "commandtoexecute": "[variables('installcommand')]"}}}
Establish connection to a VNET via an ExpressRoute circuit

{"type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "apiversion": "2020-08-01", "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "[variables('subnetprefix')]"}}, {"name": "[variables('appgwsubnetname')]", "properties": {"addressprefix": "[variables('appgwsubnetprefix')]"}}]}}
This module creates a key resource in an existing KeyVault with apiVersion 2019-09-01.

{"type": "microsoft.keyvault/vaults", "apiversion": "2021-04-01-preview", "name": "[parameters('keyvaultname')]", "location": "[parameters('location')]", "properties": {"enabledfordeployment": "[parameters('enabledfordeployment')]", "enabledfordiskencryption": "[parameters('enabledfordiskencryption')]", "enabledfortemplatedeployment": "[parameters('enabledfortemplatedeployment')]", "enablerbacauthorization": true, "tenantid": "[parameters('tenantid')]", "sku": {"name": "[parameters('skuname')]", "family": "a"}, "networkacls": {"defaultaction": "allow", "bypass": "azureservices"}}}{"type": "microsoft.keyvault/vaults/secrets", "apiversion": "2021-04-01-preview", "name": "[format('{0}/{1}", parameters('keyvaultname'), parameters('secretname'))]", "properties": {"value": "[parameters('secretvalue')]"}, "dependson": ["[resourceid('microsoft.keyvault/vaults", parameters('keyvaultname'))]"]}
Establish connection to a VNET via an ExpressRoute circuit

{"type": "microsoft.network/networksecuritygroups", "apiversion": "2021-05-01", "name": "[parameters('networksecuritygroupname')]", "location": "[parameters('location')]"}{"type": "microsoft.network/virtualnetworks", "apiversion": "2021-05-01", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('addressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('addressprefix')]"}}]}}
Storage Account with Storage Service Encryption and a blob deletion retention policy

{"apiversion": "2021-08-01", "type": "microsoft.storage/storageaccounts", "name": "[parameters('blobstorageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storagev2"}
Establish connection to a VNET via an ExpressRoute circuit

{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-04-01", "name": "[parameters('virtualnetwork_name')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('virtualnetwork_cidr')]"]}}}{"type": "microsoft.network/virtualnetworks/subnets", "apiversion": "2020-04-01", "name": "[concat(parameters('virtualnetwork_name'),"/", parameters('subnet1_name'))]", "dependson": ["[resourceid('microsoft.network/virtualnetworks", parameters('virtualnetwork_name'))]"], "properties": {"addressprefix": "[parameters('subnet1_cidr')]", "privateendpointnetworkpolicies": "disabled"}}{"type": "microsoft.network/privateendpoints", "apiversion": "2019-04-01", "name": "[parameters('privateendpoint_name')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/sites", parameters('site_name'))]", "[resourceid('microsoft.network/virtualnetworks/subnets", parameters('virtualnetwork_name'), parameters('subnet1_name'))]"], "properties": {"subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", parameters('virtualnetwork_name'), parameters('subnet1_name'))]"}, "privatelinkserviceconnections": [{"name": "[parameters('privatelinkconnection_name')]", "properties": {"privatelinkserviceid": "[resourceid('microsoft.web/sites", parameters('site_name'))]", "groupids": ["sites"]}}]}}
Establish connection to a VNET via an ExpressRoute circuit

{"apiversion": "2019-08-01", "type": "microsoft.network/publicipaddresses", "name": "publicip", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic", "dnssettings": {"domainnamelabel": "[parameters('publicdnsname')]"}}}{"apiversion": "2019-08-01", "type": "microsoft.network/publicipaddresses", "name": "vmsqlip", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic"}}{"comments": "simple network security group for subnet [subnet]", "type": "microsoft.network/networksecuritygroups", "apiversion": "2019-08-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {}}
Establish connection to a VNET via an ExpressRoute circuit

{"type": "microsoft.network/publicipaddresses", "apiversion": "2020-06-01", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic", "dnssettings": {"domainnamelabel": "[parameters('dnslabelprefix')]"}}}
Storage Account with Storage Service Encryption and a blob deletion retention policy

{"name": "[concat(variables('storageaccountnameprefix')[copyindex()],uniquestring(resourcegroup().id))]", "type": "microsoft.storage/storageaccounts", "location": "[parameters('location')]", "apiversion": "2021-01-01", "copy": {"count": "[length(variables('storageaccounttype'))]", "name": "storageaccountcopy"}, "tags": {"displayname": "[concat(variables('storageaccountnameprefix')[copyindex()],uniquestring(resourcegroup().id))]"}, "sku": {"name": "[variables('storageaccounttype')[copyindex()]]"}}
This module creates a storageAccount resource with apiVersion 2021-01-01.

{"type": "microsoft.storage/storageaccounts", "apiversion": "2019-06-01", "name": "[parameters('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storagev2", "properties": {"encryption": {"services": {"blob": {"enabled": true}, "file": {"enabled": true}}, "keysource": "microsoft.storage"}, "supportshttpstrafficonly": true}}
Deploy an Azure SQL Server with Threat Detection enabled and a user-defined number of Azure SQL Databases with Threat Detection enabled, with an email address to receive alerts for each database.

{"type": "microsoft.sql/servers", "apiversion": "2020-02-02-preview", "location": "[variables('databaseserverlocation')]", "name": "[variables('databaseservername')]", "properties": {"administratorlogin": "[variables('databaseserveradminlogin')]", "administratorloginpassword": "[variables('databaseserveradminloginpassword')]", "version": "12.0"}, "tags": {"displayname": "[variables('databaseservername')]"}}{"apiversion": "2020-02-02-preview", "type": "microsoft.sql/servers/databases", "sku": {"name": "s0", "tier": "standard"}, "kind": "v12.0,user", "location": "[variables('databaseserverlocation')]", "name": "[concat(string(variables('databaseservername')), "/", string(variables('databasenames')[copyindex()]))]", "dependson": ["[resourceid('microsoft.sql/servers", variables('databaseservername'))]"], "tags": {"displayname": "[variables('databaseservername')]"}, "copy": {"name": "databasecopy", "count": "[length(variables('databasenames'))]"}, "properties": {}, "resources": [{"apiversion": "2020-02-02-preview", "type": "securityalertpolicies", "name": "default", "dependson": ["[resourceid('microsoft.sql/servers/databases", variables('databaseservername'), variables('databasenames')[copyindex()])]"], "properties": {"state": "enabled"}}]}
Storage Account with Storage Service Encryption and a blob deletion retention policy

{"type": "microsoft.storage/storageaccounts", "name": "[variables('vhdstoragenamers')]", "apiversion": "2021-01-01", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storage", "tags": {"displayname": "datastorageaccountrs"}, "properties": {}}{"type": "microsoft.storage/storageaccounts", "name": "[variables('vhdstoragenamecatalog')]", "apiversion": "2021-01-01", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storage", "tags": {"displayname": "datastorageaccountcatalog"}, "properties": {}}{"name": "[variables('diagnosticsstorageaccountname')]", "type": "microsoft.storage/storageaccounts", "location": "[parameters('location')]", "apiversion": "2021-01-01", "sku": {"name": "standard_lrs"}, "kind": "storage", "tags": {"displayname": "diagnosticsstorageaccount"}, "properties": {}}
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 an Azure Security Center Automation which will be triggered by any Security Center Recommendation and state

{"apiversion": "2019-01-01-preview", "location": "[parameters('location')]", "name": "[parameters('automationname')]", "type": "microsoft.security/automations", "properties": {"description": "[format(variables('automationdescription'),"{0}", parameters('subscriptionid'))]", "isenabled": true, "actions": [{"actiontype": "logicapp", "logicappresourceid": "[resourceid('microsoft.logic/workflows", parameters('logicappname'))]", "uri": "[listcallbackurl(resourceid(parameters('subscriptionid'), parameters('logicappresourcegroupname'), "microsoft.logic/workflows/triggers", parameters('logicappname'), "manual'), "2019-05-01').value]"}], "scopes": [{"description": "[format(variables('scopedescription'),"{0}", parameters('subscriptionid'))]", "scopepath": "[subscription().id]"}], "sources": [{"eventsource": "assessments", "eventversiontype": "api", "copy": [{"name": "rulesets", "count": "[length(parameters('assessmentsettings').assessmentseveritymapping)]", "input": {"rules": [{"propertyjpath": "[parameters('assessmentsettings').assessmentseveritymapping[copyindex('rulesets')].jpath]", "propertytype": "string", "expectedvalue": "[parameters('assessmentsettings').assessmentseveritymapping[copyindex('rulesets')].assessmentname]", "operator": "[parameters('assessmentsettings').assessmentseveritymapping[copyindex('rulesets')].operator]"}, {"propertyjpath": "properties.status.code", "propertytype": "string", "expectedvalue": "[parameters('assessmentsettings').assessmentseveritymapping[copyindex('rulesets')].state]", "operator": "contains"}]}}]}]}}
Establish connection to a VNET via an ExpressRoute circuit

{"apiversion": "2019-06-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "sku": {"name": "basic"}, "properties": {"publicipallocationmethod": "dynamic"}}
Storage Account with Storage Service Encryption and a blob deletion retention policy

{"type": "microsoft.storage/storageaccounts", "apiversion": "2021-02-01", "name": "[variables('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storage", "properties": {}}
Establish connection to a VNET via an ExpressRoute circuit

{"apiversion": "2020-05-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]"}}{"comments": "default network security group for template", "type": "microsoft.network/networksecuritygroups", "apiversion": "2020-05-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-05-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'))]"}}}]}}
This module creates a storageAccount resource with apiVersion 2021-01-01.

{"name": "[tolower(parameters('storageaccountname'))]", "type": "microsoft.storage/storageaccounts", "apiversion": "2019-06-01", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storagev2"}
This module creates a storageAccount resource with apiVersion 2021-01-01.

{"type": "microsoft.storage/storageaccounts", "name": "[variables('storageaccountname')]", "apiversion": "2016-01-01", "location": "[parameters('location')]", "sku": {"name": "[variables('storageaccounttype')]"}, "kind": "storage", "properties": {}}
This module creates a storageAccount resource with apiVersion 2021-01-01.

{"type": "microsoft.storage/storageaccounts", "name": "[parameters('newstorageaccountname')]", "apiversion": "2019-06-01", "location": "[parameters('location')]", "sku": {"name": "[variables('storageaccounttype')]"}, "kind": "storagev2"}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.

{"apiversion": "2021-07-01", "type": "microsoft.compute/virtualmachines", "name": "[variables('vmname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts/", variables('storageaccountname'))]", "[resourceid('microsoft.network/networkinterfaces/", concat(variables('vmname'), "-nic'))]"], "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('osimagepublisher')]", "offer": "[variables('osimageoffer')]", "sku": "[variables('osimagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",concat(variables('vmname'), "-nic'))]"}]}}}
Establish connection to a VNET via an ExpressRoute circuit

{"type": "microsoft.network/publicipaddresses", "apiversion": "2020-04-01", "location": "[variables('location')]", "name": "[variables('agentipaddressname')]", "properties": {"dnssettings": {"domainnamelabel": "[variables('agentendpointdnsnameprefix')]"}, "publicipallocationmethod": "dynamic"}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.

{"name": "nodes", "type": "microsoft.resources/deployments", "apiversion": "2016-02-01", "dependson": ["[concat('microsoft.network/virtualnetworks/", variables('vnetname'))]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('nodestemplateurl')]", "contentversion": "1.0.0.0"}, "parameters": {"location": {"value": "[variables('location')]"}, "uniquestring": {"value": "[variables('uniquestring')]"}, "adminusername": {"value": "[parameters('adminusername')]"}, "nodecount": {"value": "[parameters('nodecount')]"}, "vmsize": {"value": "[parameters('vmsize')]"}, "ossettings": {"value": "[variables('ossettings')]"}, "vnetname": {"value": "[variables('vnetname')]"}, "subnetname": {"value": "[variables('subnetname')]"}, "namespace": {"value": "dc0"}, "authenticationtype": {"value": "[parameters('authenticationtype')]"}, "adminpasswordorkey": {"value": "[parameters('adminpasswordorkey')]"}}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.

{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "dependson": ["microsoft.resources/deployments/networktemplate"], "name": "dbtemplate", "properties": {"mode": "incremental", "parameters": {"maharacommon": {"value": "[variables('maharacommon')]"}, "lbpubip": {"value": "[reference('networktemplate').outputs.lbpubip.value]"}, "ctlrpubip": {"value": "[reference('networktemplate').outputs.ctlrpubip.value]"}, "dbloginpassword": {"value": "[parameters('dbloginpassword')]"}}, "templatelink": {"uri": "[concat(variables('maharacommon').basetemplateurl, parameters('dbservertype'), ".json", parameters('_artifactslocationsastoken'))]"}}}{"condition": "[parameters('azurebackupswitch')]", "type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "recoverytemplate", "properties": {"mode": "incremental", "parameters": {"maharacommon": {"value": "[variables('maharacommon')]"}}, "templatelink": {"uri": "[concat(variables('maharacommon').basetemplateurl,"recoveryservices.json",parameters('_artifactslocationsastoken'))]"}}}{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "networktemplate", "properties": {"mode": "incremental", "parameters": {"maharacommon": {"value": "[variables('maharacommon')]"}}, "templatelink": {"uri": "[concat(variables('maharacommon').basetemplateurl,"network.json",parameters('_artifactslocationsastoken'))]"}}}{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "dependson": ["microsoft.resources/deployments/networktemplate", "microsoft.resources/deployments/recoverytemplate"], "name": "searchtemplate", "properties": {"mode": "incremental", "templatelink": {"uri": "[concat(variables('maharacommon').basetemplateurl, parameters('searchtype'), "-search.json", parameters('_artifactslocationsastoken'))]"}}}
Establish connection to a VNET via an ExpressRoute circuit

{"apiversion": "2021-02-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('lbpublicipname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "static", "dnssettings": {"domainnamelabel": "[parameters('dnsname')]"}}}{"apiversion": "2015-06-15", "type": "microsoft.network/virtualnetworks", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('vnetaddressprefix')]"]}, "subnets": [{"name": "[parameters('dbsubnetname')]", "properties": {"addressprefix": "[parameters('dbsubnetaddressprefix')]"}}]}}{"apiversion": "2015-06-15", "type": "microsoft.network/networkinterfaces", "name": "[variables('nicname1')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks/", parameters('virtualnetworkname'))]", "[resourceid('microsoft.network/loadbalancers/", variables('lbname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "static", "privateipaddress": "[parameters('vmip1')]", "subnet": {"id": "[variables('dbsubnetref')]"}, "loadbalancerbackendaddresspools": [{"id": "[variables('ilbbackendaddresspoolid')]"}], "loadbalancerinboundnatrules": [{"id": "[variables('sshnatruleid1')]"}]}}]}}{"apiversion": "2015-06-15", "type": "microsoft.network/networkinterfaces", "name": "[variables('nicname2')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks/", parameters('virtualnetworkname'))]", "[resourceid('microsoft.network/loadbalancers/", variables('lbname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "static", "privateipaddress": "[parameters('vmip2')]", "subnet": {"id": "[variables('dbsubnetref')]"}, "loadbalancerbackendaddresspools": [{"id": "[variables('ilbbackendaddresspoolid')]"}], "loadbalancerinboundnatrules": [{"id": "[variables('sshnatruleid2')]"}]}}]}}{"apiversion": "2015-06-15", "type": "microsoft.network/networkinterfaces", "name": "[variables('nicname3')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks/", parameters('virtualnetworkname'))]", "[resourceid('microsoft.network/loadbalancers/", variables('lbname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "static", "privateipaddress": "[parameters('vmip3')]", "subnet": {"id": "[variables('dbsubnetref')]"}, "loadbalancerbackendaddresspools": [{"id": "[variables('ilbbackendaddresspoolid')]"}], "loadbalancerinboundnatrules": [{"id": "[variables('sshnatruleid3')]"}]}}]}}
Template for deploying VMSS with Public IP Prefix

{"type": "microsoft.compute/virtualmachinescalesets", "apiversion": "2020-06-01", "name": "[parameters('vmssname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('vmsku')]", "tier": "standard", "capacity": "[parameters('instancecount')]"}, "properties": {"overprovision": false, "upgradepolicy": {"mode": "manual"}, "virtualmachineprofile": {"storageprofile": {"osdisk": {"caching": "readonly", "createoption": "fromimage"}, "imagereference": "[variables('imagereference')]"}, "osprofile": {"computernameprefix": "[parameters('vmssname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "networkprofile": {"networkinterfaceconfigurations": [{"name": "[variables('nicname')]", "properties": {"primary": true, "ipconfigurations": [{"name": "[variables('ipconfigname')]", "properties": {"subnet": {"id": "[format('{0}/subnets/{1}", resourceid('microsoft.network/virtualnetworks", variables('virtualnetworkname')), variables('subnetname'))]"}, "publicipaddressconfiguration": {"name": "pub1", "properties": {"idletimeoutinminutes": 15, "publicipprefix": {"id": "[resourceid('microsoft.network/publicipprefixes", variables('publicipprefixname'))]"}}}, "loadbalancerbackendaddresspools": [{"id": "[format('{0}/backendaddresspools/{1}", resourceid('microsoft.network/loadbalancers", variables('loadbalancername')), variables('bepoolname'))]"}], "loadbalancerinboundnatpools": [{"id": "[format('{0}/inboundnatpools/{1}", resourceid('microsoft.network/loadbalancers", variables('loadbalancername')), variables('natpoolname'))]"}]}}]}}]}}}, "dependson": ["[resourceid('microsoft.network/loadbalancers", variables('loadbalancername'))]", "[resourceid('microsoft.network/publicipprefixes", variables('publicipprefixname'))]", "[resourceid('microsoft.network/virtualnetworks", variables('virtualnetworkname'))]"]}
Create a VM from a Windows Image with 4 Empty Data Disks

{"type": "microsoft.compute/availabilitysets", "name": "[variables('availabilitysetname')]", "apiversion": "2019-12-01", "location": "[parameters('location')]", "sku": {"name": "aligned"}, "properties": {"platformfaultdomaincount": 2, "platformupdatedomaincount": 2}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[concat(variables('vmname'), copyindex())]", "copy": {"name": "virtualmachineloop", "count": "[variables('numberofinstances')]"}, "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts", variables('newstorageaccountname'))]", "[resourceid('microsoft.compute/availabilitysets", variables('availabilitysetname'))]"], "properties": {"availabilityset": {"id": "[resourceid('microsoft.compute/availabilitysets", variables('availabilitysetname'))]"}, "hardwareprofile": {"vmsize": "[parameters('windowsvmsize')]"}, "osprofile": {"computername": "[concat(variables('vmname'), copyindex())]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[parameters('windowsvmsku')]", "version": "latest"}, "osdisk": {"createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", concat(variables('vmname'),copyindex()))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('newstorageaccountname')).primaryendpoints.blob]"}}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "vmsql", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts", variables('newstorageaccountname'))]", "[resourceid('microsoft.network/networkinterfaces", variables('nicsql'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('sqlvmsize')]"}, "osprofile": {"computername": "[concat(variables('vmname'), "sql')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "[variables('sqlimagepublisher')]", "offer": "[parameters('sqlvmoffer')]", "sku": "[parameters('sqlvmsku')]", "version": "latest"}, "osdisk": {"createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicsql'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('newstorageaccountname')).primaryendpoints.blob]"}}}}
Establish connection to a VNET via an ExpressRoute circuit

{"name": "[variables('virtualnetworkname')]", "type": "microsoft.network/virtualnetworks", "location": "[parameters('location')]", "apiversion": "2020-11-01", "dependson": ["[resourceid('microsoft.network/networksecuritygroups/", variables('networksecuritygroupname'))]"], "tags": {"displayname": "[variables('virtualnetworkname')]"}, "properties": {"addressspace": {"addressprefixes": ["[variables('virtualnetworkprefix')]"]}, "subnets": [{"name": "[variables('virtualnetworksubnetname')]", "properties": {"addressprefix": "[variables('virtualnetworksubnetprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}}}]}}{"type": "microsoft.network/networksecuritygroups", "name": "[variables('networksecuritygroupname')]", "apiversion": "2020-11-01", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "default-allow-ssh", "properties": {"description": "allow secure shell connections", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "22", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 1000, "direction": "inbound"}}, {"name": "neo4j-allow-bolt", "properties": {"description": "allow bolt protocol connections", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "7687", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 1010, "direction": "inbound"}}, {"name": "neo4j-allow-http", "properties": {"description": "allow http connections", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "7474", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 1020, "direction": "inbound"}}, {"name": "neo4j-allow-https", "properties": {"description": "allow https connections", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "7473", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 1030, "direction": "inbound"}}]}}{"name": "[variables('networkinterfacename')]", "type": "microsoft.network/networkinterfaces", "location": "[parameters('location')]", "apiversion": "2020-11-01", "dependson": ["[resourceid('microsoft.network/virtualnetworks", variables('virtualnetworkname'))]", "[resourceid('microsoft.network/publicipaddresses", variables('publicipaddressname'))]"], "tags": {"displayname": "[variables('networkinterfacename')]"}, "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "subnet": {"id": "[variables('networkinterfacesubnetref')]"}, "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", variables('publicipaddressname'))]"}}}]}}{"name": "[variables('publicipaddressname')]", "type": "microsoft.network/publicipaddresses", "location": "[parameters('location')]", "apiversion": "2020-11-01", "tags": {"displayname": "[variables('publicipaddressname')]"}, "properties": {"publicipallocationmethod": "dynamic", "dnssettings": {"domainnamelabel": "[parameters('publicipaddressdns')]"}}}
Create a VM from a Windows Image with 4 Empty Data Disks

{"type": "microsoft.compute/virtualmachines", "apiversion": "2020-12-01", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces", variables('nicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[parameters('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": "[variables('imagesku')]", "version": "latest"}, "osdisk": {"caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('nicname'))]"}]}}}
Establish connection to a VNET via an ExpressRoute circuit

{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('vnetaddressprefix')]"]}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.

{"name": "shared", "type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('sharedtemplateurl')]", "contentversion": "1.0.0.0"}, "parameters": {"networksettings": {"value": "[variables('networksettings')]"}, "namespace": {"value": "[variables('namespace')]"}, "location": {"value": "[parameters('location')]"}}}}{"name": "[concat('webnode", copyindex())]", "type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "dependson": ["[resourceid('microsoft.resources/deployments/", "shared')]"], "copy": {"name": "vmloop", "count": "[parameters('webnodecount')]"}, "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('webtemplateurl')]", "contentversion": "1.0.0.0"}, "parameters": {"adminusername": {"value": "[parameters('adminusername')]"}, "mysqlpassword": {"value": "[parameters('mysqlpassword')]"}, "namespace": {"value": "[variables('namespace')]"}, "vmbasename": {"value": "[concat('web", copyindex())]"}, "subnet": {"value": "[variables('networksettings').subnet.web]"}, "sizeofdatadiskingb": {"value": "[variables('sizeofdatadiskingb')]"}, "vmsize": {"value": "[parameters('webnodevmsize')]"}, "zabbixserveripaddress": {"value": "[parameters('zabbixserveripaddress')]"}, "ossettings": {"value": "[variables('webossettings')]"}, "authenticationtype": {"value": "[parameters('authenticationtype')]"}, "adminpasswordorkey": {"value": "[parameters('adminpasswordorkey')]"}, "location": {"value": "[parameters('location')]"}}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.

{"apiversion": "2020-06-01", "name": "deploy", "type": "microsoft.resources/deployments", "resourcegroup": "[parameters('virtualnetworkresourcegroupname')]", "dependson": ["new-nsg"], "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'), concat('nested/updatesubnet.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"virtualnetworkname": {"value": "[parameters('virtualnetworkname')]"}, "subnetname": {"value": "[parameters('subnetname')]"}, "subnetaddressprefix": {"value": "[reference(resourceid(parameters('virtualnetworkresourcegroupname'), "microsoft.network/virtualnetworks/subnets", parameters('virtualnetworkname'), parameters('subnetname')), "2020-08-01').addressprefix]"}, "nsgid": {"value": "[resourceid('microsoft.network/networksecuritygroups", "new-nsg')]"}, "location": {"value": "[parameters('location')]"}}}}
This template creates a metric alert rule that monitors the CPU Percentage metric of a virtual machine using a static threshold condition type.

{"name": "[parameters('alertname')]", "type": "microsoft.insights/metricalerts", "location": "global", "apiversion": "2018-03-01", "properties": {"description": "[parameters('alertdescription')]", "severity": "[parameters('alertseverity')]", "enabled": "[parameters('isenabled')]", "scopes": ["[parameters('resourceid')]"], "evaluationfrequency": "[parameters('evaluationfrequency')]", "windowsize": "[parameters('windowsize')]", "criteria": {"odata.type": "microsoft.azure.monitor.singleresourcemultiplemetriccriteria", "allof": [{"name": "1st criterion", "metricname": "[parameters('metricname')]", "operator": "[parameters('operator')]", "threshold": "[parameters('threshold')]", "timeaggregation": "[parameters('timeaggregation')]"}]}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.

{"apiversion": "2018-05-01", "name": "deploy-ddos-attack-oms-resource", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('omstemplateuri')]"}, "parameters": {"omsworkspacename": {"value": "[variables('omsworkspacename')]"}, "omssolutionsname": {"value": "[variables('omssolutions')]"}, "sku": {"value": "[parameters('omssku')]"}, "location": {"value": "[parameters('location')]"}, "tags": {"value": "[variables('tags')]"}}}}{"apiversion": "2018-05-01", "name": "[concat(parameters('vnetname'),"-","-resource')]", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('vnettemplateuri')]"}, "parameters": {"vnetname": {"value": "[parameters('vnetname')]"}, "addressprefix": {"value": "[parameters('vnetaddressspace')]"}, "subnets": {"value": "[variables('subnets')]"}, "location": {"value": "[parameters('location')]"}, "tags": {"value": "[variables('tags')]"}}}}{"apiversion": "2018-05-01", "name": "[concat(variables('nsgname'),"-","-resource')]", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('nsgtemplateuri')]"}, "parameters": {"nsgname": {"value": "[variables('nsgname')]"}, "securityrules": {"value": "[variables('nsgsecurityrules')]"}, "location": {"value": "[parameters('location')]"}, "tags": {"value": "[variables('tags')]"}}}}{"apiversion": "2018-05-01", "name": "[concat(variables('vmname'),"-pip","-resource')]", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('piptemplateuri')]"}, "parameters": {"publicipaddressname": {"value": "[concat(variables('vmname'),"-pip')]"}, "publicipaddresstype": {"value": "[parameters('pipaddresstype')]"}, "dnsnameforpublicip": {"value": "[concat(variables('vmname'),uniquestring(resourcegroup().id, "pip'),"-pip')]"}, "location": {"value": "[parameters('location')]"}, "tags": {"value": "[variables('tags')]"}}}}
Establish connection to a VNET via an ExpressRoute circuit

{"condition": "[parameters('rebuildvnet')]", "apiversion": "2020-05-01", "type": "microsoft.network/virtualnetworks", "name": "[parameters('vnetname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('vnetaddressprefix')]"]}}, "resources": [{"condition": "[parameters('rebuildvnet')]", "apiversion": "2020-05-01", "type": "subnets", "location": "[parameters('location')]", "name": "[parameters('subnet1name')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks", parameters('vnetname'))]"], "properties": {"addressprefix": "[parameters('subnet1prefix')]", "delegations": [{"name": "integrationserviceenvironments", "properties": {"servicename": "microsoft.logic/integrationserviceenvironments"}}]}}, {"condition": "[parameters('rebuildvnet')]", "apiversion": "2020-05-01", "type": "subnets", "location": "[parameters('location')]", "name": "[parameters('subnet2name')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks/", parameters('vnetname'))]", "[resourceid('microsoft.network/virtualnetworks/subnets", parameters('vnetname'), parameters('subnet1name'))]"], "properties": {"addressprefix": "[parameters('subnet2prefix')]"}}, {"condition": "[parameters('rebuildvnet')]", "apiversion": "2020-05-01", "type": "subnets", "location": "[parameters('location')]", "name": "[parameters('subnet3name')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks/", parameters('vnetname'))]", "[resourceid('microsoft.network/virtualnetworks/subnets", parameters('vnetname'), parameters('subnet2name'))]"], "properties": {"addressprefix": "[parameters('subnet3prefix')]"}}, {"condition": "[parameters('rebuildvnet')]", "apiversion": "2020-05-01", "type": "subnets", "location": "[parameters('location')]", "name": "[parameters('subnet4name')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks/", parameters('vnetname'))]", "[resourceid('microsoft.network/virtualnetworks/subnets", parameters('vnetname'), parameters('subnet3name'))]"], "properties": {"addressprefix": "[parameters('subnet4prefix')]"}}]}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.

{"apiversion": "2019-03-01", "type": "microsoft.compute/virtualmachines", "name": "[concat(variables('vmname'), copyindex())]", "location": "[parameters('location')]", "copy": {"name": "vmloop", "count": "[parameters('numberofvms')]"}, "dependson": ["[variables('storageaccountname')]", "nicloop"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[concat(variables('vmname'), copyindex())]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "microsoftwindowsserver", "offer": "windowsserver", "sku": "[parameters('windowsosversion')]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'), copyindex(),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}, "copy": [{"name": "datadisks", "count": "[parameters('numdatadisks')]", "input": {"caching": "readwrite", "disksizegb": "[parameters('sizeofdatadisksingb')]", "lun": "[copyindex('datadisks')]", "name": "[concat(variables('vmname'), "-datadisk",copyindex(), copyindex('datadisks'))]", "createoption": "empty"}}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", concat(variables('nicname'), copyindex()))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('storageaccountname')).primaryendpoints.blob]"}}}}