Description
stringlengths
19
200
IaC
stringlengths
128
8.16k
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"type": "microsoft.resources/deployments", "name": "clustersubnetroleassignmentdeployment", "apiversion": "2019-10-01", "resourcegroup": "[parameters('existingvirtualnetworkresourcegroup')]", "properties": {"mode": "incremental", "template": {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymenttemplate.json#", "contentversion": "1.0.0.0", "resources": [{"type": "microsoft.network/virtualnetworks/subnets/providers/roleassignments", "apiversion": "2020-04-01-preview", "name": "[concat(parameters('existingvirtualnetworkname'), "/", parameters('existingsubnetname'), "/microsoft.authorization/", guid(resourcegroup().id, deployment().name))]", "properties": {"roledefinitionid": "[variables('builtinrole')[parameters('builtinroletype')]]", "principalid": "[parameters('existingserviceprincipalobjectid')]", "scope": "[variables('vnetsubnetid')]"}}]}}}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"type": "microsoft.storage/storageaccounts", "name": "[parameters('storageaccountname')]", "apiversion": "2019-06-01", "location": "[parameters('location')]", "sku": {"name": "[parameters('storageaccounttype')]"}, "kind": "storagev2"}
Storage Account with Storage Service Encryption and a blob deletion retention policy
{"type": "microsoft.storage/storageaccounts", "name": "[parameters('storageaccountname')]", "apiversion": "2019-06-01", "location": "[parameters('location')]", "sku": {"name": "[parameters('storageaccounttype')]"}, "kind": "storagev2"}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"type": "microsoft.resources/deployments", "name": "clustersubnetroleassignmentdeployment", "apiversion": "2017-05-10", "resourcegroup": "[parameters('existingvirtualnetworkresourcegroup')]", "properties": {"mode": "incremental", "template": {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymenttemplate.json#", "contentversion": "1.0.0.0", "parameters": {}, "variables": {}, "resources": [{"type": "microsoft.network/virtualnetworks/subnets/providers/roleassignments", "apiversion": "2017-05-01", "name": "[parameters('existingsubnetroleassignmentname')]", "properties": {"roledefinitionid": "[concat('/subscriptions/", subscription().subscriptionid, "/providers/microsoft.authorization/roledefinitions/", "4d97b98b-1d4f-4787-a291-c67834d212e7')]", "principalid": "[parameters('existingserviceprincipalobjectid')]", "scope": "[variables('vnetsubnetid')]"}}]}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"type": "microsoft.resources/deployments", "name": "pid-18f281fe-d1e1-502c-8b87-d945383dc75b", "apiversion": "2019-09-01", "properties": {"mode": "incremental", "template": {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymenttemplate.json#", "contentversion": "1.0.0.0", "resources": []}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"name": "provisionconfiguration", "type": "microsoft.resources/deployments", "apiversion": "2020-06-01", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('provisionconfigurationurl')]", "contentversion": "1.0.0.0"}, "parameters": {"_artifactslocation": {"value": "[parameters('_artifactslocation')]"}, "_artifactslocationsastoken": {"value": "[parameters('_artifactslocationsastoken')]"}, "automationaccountname": {"value": "[variables('automationaccountname')]"}, "adminusername": {"value": "[parameters('adminusername')]"}, "adminpassword": {"value": "[parameters('adminpassword')]"}, "domainname": {"value": "[parameters('domainname')]"}, "location": {"value": "[parameters('location')]"}, "compilename": {"value": "[parameters('compilename')]"}, "devopsstoragepackagesbase": {"value": "[parameters('devopsstoragepackagesbase')]"}}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"name": "provisionconfiguration", "type": "microsoft.resources/deployments", "apiversion": "2020-06-01", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('provisionconfigurationurl')]", "contentversion": "1.0.0.0"}, "parameters": {"_artifactslocation": {"value": "[parameters('_artifactslocation')]"}, "_artifactslocationsastoken": {"value": "[parameters('_artifactslocationsastoken')]"}, "automationaccountname": {"value": "[variables('automationaccountname')]"}, "adminusername": {"value": "[parameters('adminusername')]"}, "adminpassword": {"value": "[parameters('adminpassword')]"}, "domainname": {"value": "[parameters('domainname')]"}, "location": {"value": "[parameters('location')]"}, "compilename": {"value": "[parameters('compilename')]"}, "devopsstoragepackagesbase": {"value": "[parameters('devopsstoragepackagesbase')]"}}}}{"name": "provisionnetwork", "type": "microsoft.resources/deployments", "apiversion": "2020-06-01", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('provisionnetworkurl')]", "contentversion": "1.0.0.0"}, "parameters": {"location": {"value": "[parameters('location')]"}, "virtualnetworkname": {"value": "[variables('virtualnetworkname')]"}, "virtualnetworkaddressrange": {"value": "[parameters('virtualnetworkaddressrange')]"}, "virtualnetworksubnets": {"value": "[variables('virtualnetworksubnets')]"}, "nicname": {"value": "[variables('nicname')]"}, "nicipaddress": {"value": "[parameters('nicipaddress')]"}, "nicsubnetref": {"value": "[variables('nicsubnetref')]"}, "publicipaddressname": {"value": "[variables('publicipaddressname')]"}, "publicipaddresstype": {"value": "[variables('publicipaddresstype')]"}}}}{"name": "provisionserver", "type": "microsoft.resources/deployments", "apiversion": "2020-06-01", "dependson": ["provisionnetwork", "provisionconfiguration"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('provisionserverurl')]", "contentversion": "1.0.0.0"}, "parameters": {"location": {"value": "[parameters('location')]"}, "vmname": {"value": "[variables('vmname')]"}, "vmsize": {"value": "[parameters('vmsize')]"}, "adminusername": {"value": "[parameters('adminusername')]"}, "adminpassword": {"value": "[parameters('adminpassword')]"}, "nicname": {"value": "[variables('nicname')]"}, "automationaccountname": {"value": "[variables('automationaccountname')]"}}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"name": "provisionconfiguration", "type": "microsoft.resources/deployments", "apiversion": "2020-06-01", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('provisionconfigurationurl')]", "contentversion": "1.0.0.0"}, "parameters": {"_artifactslocation": {"value": "[parameters('_artifactslocation')]"}, "_artifactslocationsastoken": {"value": "[parameters('_artifactslocationsastoken')]"}, "automationaccountname": {"value": "[variables('automationaccountname')]"}, "adminusername": {"value": "[parameters('adminusername')]"}, "adminpassword": {"value": "[parameters('adminpassword')]"}, "domainname": {"value": "[parameters('domainname')]"}, "location": {"value": "[parameters('location')]"}, "compilename": {"value": "[parameters('compilename')]"}, "devopsstoragepackagesbase": {"value": "[parameters('devopsstoragepackagesbase')]"}}}}{"name": "provisionnetwork", "type": "microsoft.resources/deployments", "apiversion": "2020-06-01", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('provisionnetworkurl')]", "contentversion": "1.0.0.0"}, "parameters": {"location": {"value": "[parameters('location')]"}, "virtualnetworkname": {"value": "[variables('virtualnetworkname')]"}, "virtualnetworkaddressrange": {"value": "[parameters('virtualnetworkaddressrange')]"}, "virtualnetworksubnets": {"value": "[variables('virtualnetworksubnets')]"}, "nicname": {"value": "[variables('nicname')]"}, "nicipaddress": {"value": "[parameters('nicipaddress')]"}, "nicsubnetref": {"value": "[variables('nicsubnetref')]"}, "publicipaddressname": {"value": "[variables('publicipaddressname')]"}, "publicipaddresstype": {"value": "[variables('publicipaddresstype')]"}}}}{"name": "provisionserver", "type": "microsoft.resources/deployments", "apiversion": "2020-06-01", "dependson": ["provisionnetwork", "provisionconfiguration"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('provisionserverurl')]", "contentversion": "1.0.0.0"}, "parameters": {"location": {"value": "[parameters('location')]"}, "vmname": {"value": "[variables('vmname')]"}, "vmsize": {"value": "[parameters('vmsize')]"}, "adminusername": {"value": "[parameters('adminusername')]"}, "adminpassword": {"value": "[parameters('adminpassword')]"}, "nicname": {"value": "[variables('nicname')]"}, "automationaccountname": {"value": "[variables('automationaccountname')]"}}}}{"name": "provisiondns", "type": "microsoft.resources/deployments", "apiversion": "2020-06-01", "dependson": ["provisionserver"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('provisiondnsurl')]", "contentversion": "1.0.0.0"}, "parameters": {"location": {"value": "[parameters('location')]"}, "virtualnetworkname": {"value": "[variables('virtualnetworkname')]"}, "virtualnetworkaddressrange": {"value": "[parameters('virtualnetworkaddressrange')]"}, "virtualnetworksubnets": {"value": "[variables('virtualnetworksubnets')]"}, "dnsaddress": {"value": ["[parameters('nicipaddress')]"]}}}}
This template creates a data collection rule defining the data source (Syslog) and the destination workspace.
{"condition": "[parameters('enablediagnostics')]", "type": "microsoft.insights/diagnosticsettings", "apiversion": "2021-05-01-preview", "scope": "[format('microsoft.containerregistry/registries/{0}", parameters('acrname'))]", "name": "[variables('diagnosticsname')]", "properties": {"workspaceid": "[if(empty(parameters('loganalyticsworkspaceid')), null(), parameters('loganalyticsworkspaceid'))]", "storageaccountid": "[if(empty(parameters('diagnosticstorageaccountid')), null(), parameters('diagnosticstorageaccountid'))]", "logs": [{"category": "containerregistryrepositoryevents", "enabled": true}, {"category": "containerregistryloginevents", "enabled": true}], "metrics": [{"category": "allmetrics", "enabled": true}]}, "dependson": ["[resourceid('microsoft.containerregistry/registries", parameters('acrname'))]"]}
This template uses Azure Managed Identity to assign access to Azure Maps. See more at https://aka.ms/amauth
{"condition": "[parameters('enabledeletelock')]", "type": "microsoft.authorization/locks", "apiversion": "2020-05-01", "scope": "[format('microsoft.containerregistry/registries/{0}", parameters('acrname'))]", "name": "[variables('lockname')]", "properties": {"level": "cannotdelete"}, "dependson": ["[resourceid('microsoft.containerregistry/registries", parameters('acrname'))]"]}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"type": "microsoft.storage/storageaccounts", "apiversion": "2017-06-01", "name": "[variables('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "[variables('storageaccounttype')]"}, "kind": "storage", "properties": {}}
Storage Account with Storage Service Encryption and a blob deletion retention policy
{"type": "microsoft.storage/storageaccounts", "apiversion": "2017-06-01", "name": "[variables('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "[variables('storageaccounttype')]"}, "kind": "storage", "properties": {}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"type": "microsoft.compute/virtualmachines", "apiversion": "2020-06-01", "name": "[variables('vmname')]", "location": "[parameters('location')]", "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "microsoftwindowsserver", "offer": "windowsserver", "sku": "[parameters('windowsosversion')]", "version": "latest"}, "osdisk": {"createoption": "fromimage"}, "datadisks": [{"disksizegb": 1023, "lun": 0, "createoption": "empty"}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('networkinterfacename'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(resourceid('microsoft.storage/storageaccounts", variables('storageaccountname'))).primaryendpoints.blob]"}}}, "dependson": ["[resourceid('microsoft.network/networkinterfaces", variables('networkinterfacename'))]", "[resourceid('microsoft.storage/storageaccounts", variables('storageaccountname'))]"]}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"type": "microsoft.storage/storageaccounts", "apiversion": "2021-06-01", "name": "[variables('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storage", "properties": {}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"type": "microsoft.compute/virtualmachines", "apiversion": "2020-06-01", "name": "[variables('vmname')]", "location": "[parameters('location')]", "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "microsoftwindowsserver", "offer": "windowsserver", "sku": "[parameters('windowsosversion')]", "version": "latest"}, "osdisk": {"createoption": "fromimage"}, "datadisks": [{"disksizegb": 1023, "lun": 0, "createoption": "empty"}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('networkinterfacename'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(resourceid('microsoft.storage/storageaccounts", variables('storageaccountname'))).primaryendpoints.blob]"}}}, "dependson": ["[resourceid('microsoft.network/networkinterfaces", variables('networkinterfacename'))]", "[resourceid('microsoft.storage/storageaccounts", variables('storageaccountname'))]"]}
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')]"}}}
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')]"}}}{"type": "microsoft.network/networksecuritygroups", "apiversion": "2020-06-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "default-allow-3389", "properties": {"priority": 1000, "access": "allow", "direction": "inbound", "destinationportrange": "3389", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}
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')]"}}}{"type": "microsoft.network/networksecuritygroups", "apiversion": "2020-06-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "default-allow-3389", "properties": {"priority": 1000, "access": "allow", "direction": "inbound", "destinationportrange": "3389", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[variables('vnetname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('vnetaddressprefix')]"]}, "subnets": [{"name": "[variables('vnetsubnetname')]", "properties": {"addressprefix": "[variables('vnetsubnetaddressprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}}}]}, "dependson": ["[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"]}
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')]"}}}{"type": "microsoft.network/networksecuritygroups", "apiversion": "2020-06-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "default-allow-3389", "properties": {"priority": 1000, "access": "allow", "direction": "inbound", "destinationportrange": "3389", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[variables('vnetname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('vnetaddressprefix')]"]}, "subnets": [{"name": "[variables('vnetsubnetname')]", "properties": {"addressprefix": "[variables('vnetsubnetaddressprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}}}]}, "dependson": ["[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"]}{"type": "microsoft.network/networkinterfaces", "apiversion": "2020-06-01", "name": "[variables('networkinterfacename')]", "location": "[parameters('location')]", "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", variables('publicipaddressname'))]"}, "subnet": {"id": "[format('{0}/subnets/{1}", resourceid('microsoft.network/virtualnetworks", variables('vnetname')), variables('vnetsubnetname'))]"}}}]}, "dependson": ["[resourceid('microsoft.network/publicipaddresses", variables('publicipaddressname'))]", "[resourceid('microsoft.network/virtualnetworks", variables('vnetname'))]"]}
This template creates a data collection rule defining the data source (Syslog) and the destination workspace.
{"condition": "[parameters('enablediagnostics')]", "type": "microsoft.insights/diagnosticsettings", "apiversion": "2017-05-01-preview", "scope": "[format('microsoft.recoveryservices/vaults/{0}", parameters('vaultname'))]", "name": "[variables('diagnosticsname')]", "properties": {"workspaceid": "[parameters('loganalyticsworkspaceid')]", "storageaccountid": "[parameters('diagnosticstorageaccountid')]", "logs": [{"category": "azurebackupreport", "enabled": true}, {"category": "azuresiterecoveryjobs", "enabled": true}, {"category": "azuresiterecoveryevents", "enabled": true}, {"category": "azuresiterecoveryreplicateditems", "enabled": true}, {"category": "azuresiterecoveryreplicationstats", "enabled": true}, {"category": "azuresiterecoveryrecoverypoints", "enabled": true}, {"category": "azuresiterecoveryreplicationdatauploadrate", "enabled": true}, {"category": "azuresiterecoveryprotecteddiskdatachurn", "enabled": true}, {"category": "coreazurebackup", "enabled": true}, {"category": "coreazurebackup", "enabled": true}, {"category": "addonazurebackupjobs", "enabled": true}, {"category": "addonazurebackupalerts", "enabled": true}, {"category": "addonazurebackuppolicy", "enabled": true}, {"category": "addonazurebackupstorage", "enabled": true}, {"category": "addonazurebackupprotectedinstance", "enabled": true}], "metrics": [{"category": "health", "enabled": true}]}, "dependson": ["[resourceid('microsoft.recoveryservices/vaults", parameters('vaultname'))]"]}
This template uses Azure Managed Identity to assign access to Azure Maps. See more at https://aka.ms/amauth
{"condition": "[parameters('enabledeletelock')]", "type": "microsoft.authorization/locks", "apiversion": "2016-09-01", "scope": "[format('microsoft.recoveryservices/vaults/{0}", parameters('vaultname'))]", "name": "[variables('lockname')]", "properties": {"level": "cannotdelete"}, "dependson": ["[resourceid('microsoft.recoveryservices/vaults", parameters('vaultname'))]"]}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"type": "microsoft.storage/storageaccounts", "apiversion": "2021-04-01", "name": "[variables('storageaccountname')]", "location": "[parameters('location')]", "kind": "storagev2", "sku": {"name": "standard_lrs"}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"type": "microsoft.compute/disks", "apiversion": "2019-11-01", "name": "[concat(parameters('virtualmachinename'),"-datadisk-ultrassd-",copyindex())]", "location": "[parameters('location')]", "sku": {"name": "ultrassd_lrs"}, "zones": ["[parameters('zone')]"], "properties": {"creationdata": {"createoption": "empty"}, "disksizegb": "[parameters('sqllogultrassddisksizeingb')]", "diskiopsreadwrite": "[parameters('sqllogultrassddiskiopsreadwrite')]", "diskmbpsreadwrite": "[parameters('sqllogultrassddiskmbpsreadwrite')]"}, "copy": {"name": "ultrassdloop", "count": 1}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"type": "microsoft.compute/disks", "apiversion": "2019-11-01", "name": "[concat(parameters('virtualmachinename'),"-datadisk-ultrassd-",copyindex())]", "location": "[parameters('location')]", "sku": {"name": "ultrassd_lrs"}, "zones": ["[parameters('zone')]"], "properties": {"creationdata": {"createoption": "empty"}, "disksizegb": "[parameters('sqllogultrassddisksizeingb')]", "diskiopsreadwrite": "[parameters('sqllogultrassddiskiopsreadwrite')]", "diskmbpsreadwrite": "[parameters('sqllogultrassddiskmbpsreadwrite')]"}, "copy": {"name": "ultrassdloop", "count": 1}}{"type": "microsoft.compute/disks", "apiversion": "2019-11-01", "name": "[concat(parameters('virtualmachinename'),"-datadisk-",copyindex())]", "location": "[parameters('location')]", "sku": {"name": "premium_lrs"}, "zones": ["[parameters('zone')]"], "properties": {"creationdata": {"createoption": "empty"}, "disksizegb": "[variables('datadisks').disksizegb]"}, "copy": {"name": "premiumssdloop", "count": "[parameters('sqldatadiskscount')]"}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"type": "microsoft.compute/disks", "apiversion": "2019-11-01", "name": "[concat(parameters('virtualmachinename'),"-datadisk-ultrassd-",copyindex())]", "location": "[parameters('location')]", "sku": {"name": "ultrassd_lrs"}, "zones": ["[parameters('zone')]"], "properties": {"creationdata": {"createoption": "empty"}, "disksizegb": "[parameters('sqllogultrassddisksizeingb')]", "diskiopsreadwrite": "[parameters('sqllogultrassddiskiopsreadwrite')]", "diskmbpsreadwrite": "[parameters('sqllogultrassddiskmbpsreadwrite')]"}, "copy": {"name": "ultrassdloop", "count": 1}}{"type": "microsoft.compute/disks", "apiversion": "2019-11-01", "name": "[concat(parameters('virtualmachinename'),"-datadisk-",copyindex())]", "location": "[parameters('location')]", "sku": {"name": "premium_lrs"}, "zones": ["[parameters('zone')]"], "properties": {"creationdata": {"createoption": "empty"}, "disksizegb": "[variables('datadisks').disksizegb]"}, "copy": {"name": "premiumssdloop", "count": "[parameters('sqldatadiskscount')]"}}{"type": "microsoft.compute/virtualmachines", "apiversion": "2019-12-01", "name": "[parameters('virtualmachinename')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces/", variables('networkinterfacename'))]", "ultrassdloop", "premiumssdloop"], "zones": ["[parameters('zone')]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('virtualmachinesize')]"}, "additionalcapabilities": {"ultrassdenabled": "true"}, "storageprofile": {"osdisk": {"createoption": "fromimage", "manageddisk": {"storageaccounttype": "premium_lrs"}}, "imagereference": {"publisher": "microsoftsqlserver", "offer": "[parameters('imageoffer')]", "sku": "[parameters('sqlsku')]", "version": "latest"}, "copy": [{"name": "datadisks", "count": "[add(parameters('sqldatadiskscount'), 1)]", "input": {"lun": "[copyindex('datadisks')]", "createoption": "attach", "caching": "[if(greaterorequals(copyindex('datadisks'), parameters('sqldatadiskscount')), "none", variables('datadisks').caching)]", "manageddisk": {"id": "[if(greaterorequals(copyindex('datadisks'), parameters('sqldatadiskscount')), resourceid('microsoft.compute/disks/", concat(parameters('virtualmachinename'),"-datadisk-ultrassd-0')), resourceid('microsoft.compute/disks/", concat(parameters('virtualmachinename'),"-datadisk-",copyindex('datadisks'))))]"}}}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('networkinterfacename'))]"}]}, "osprofile": {"computername": "[parameters('virtualmachinename')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]", "windowsconfiguration": {"enableautomaticupdates": true, "provisionvmagent": true}}}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"type": "microsoft.compute/disks", "apiversion": "2019-11-01", "name": "[concat(parameters('virtualmachinename'),"-datadisk-ultrassd-",copyindex())]", "location": "[parameters('location')]", "sku": {"name": "ultrassd_lrs"}, "zones": ["[parameters('zone')]"], "properties": {"creationdata": {"createoption": "empty"}, "disksizegb": "[parameters('sqllogultrassddisksizeingb')]", "diskiopsreadwrite": "[parameters('sqllogultrassddiskiopsreadwrite')]", "diskmbpsreadwrite": "[parameters('sqllogultrassddiskmbpsreadwrite')]"}, "copy": {"name": "ultrassdloop", "count": 1}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"type": "microsoft.compute/disks", "apiversion": "2019-11-01", "name": "[concat(parameters('virtualmachinename'),"-datadisk-ultrassd-",copyindex())]", "location": "[parameters('location')]", "sku": {"name": "ultrassd_lrs"}, "zones": ["[parameters('zone')]"], "properties": {"creationdata": {"createoption": "empty"}, "disksizegb": "[parameters('sqllogultrassddisksizeingb')]", "diskiopsreadwrite": "[parameters('sqllogultrassddiskiopsreadwrite')]", "diskmbpsreadwrite": "[parameters('sqllogultrassddiskmbpsreadwrite')]"}, "copy": {"name": "ultrassdloop", "count": 1}}{"type": "microsoft.compute/disks", "apiversion": "2019-11-01", "name": "[concat(parameters('virtualmachinename'),"-datadisk-",copyindex())]", "location": "[parameters('location')]", "sku": {"name": "premium_lrs"}, "zones": ["[parameters('zone')]"], "properties": {"creationdata": {"createoption": "empty"}, "disksizegb": "[variables('datadisks').disksizegb]"}, "copy": {"name": "premiumssdloop", "count": "[parameters('sqldatadiskscount')]"}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"type": "microsoft.compute/disks", "apiversion": "2019-11-01", "name": "[concat(parameters('virtualmachinename'),"-datadisk-ultrassd-",copyindex())]", "location": "[parameters('location')]", "sku": {"name": "ultrassd_lrs"}, "zones": ["[parameters('zone')]"], "properties": {"creationdata": {"createoption": "empty"}, "disksizegb": "[parameters('sqllogultrassddisksizeingb')]", "diskiopsreadwrite": "[parameters('sqllogultrassddiskiopsreadwrite')]", "diskmbpsreadwrite": "[parameters('sqllogultrassddiskmbpsreadwrite')]"}, "copy": {"name": "ultrassdloop", "count": 1}}{"type": "microsoft.compute/disks", "apiversion": "2019-11-01", "name": "[concat(parameters('virtualmachinename'),"-datadisk-",copyindex())]", "location": "[parameters('location')]", "sku": {"name": "premium_lrs"}, "zones": ["[parameters('zone')]"], "properties": {"creationdata": {"createoption": "empty"}, "disksizegb": "[variables('datadisks').disksizegb]"}, "copy": {"name": "premiumssdloop", "count": "[parameters('sqldatadiskscount')]"}}{"type": "microsoft.compute/virtualmachines", "apiversion": "2019-12-01", "name": "[parameters('virtualmachinename')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces/", variables('networkinterfacename'))]", "ultrassdloop", "premiumssdloop"], "zones": ["[parameters('zone')]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('virtualmachinesize')]"}, "additionalcapabilities": {"ultrassdenabled": "true"}, "storageprofile": {"osdisk": {"createoption": "fromimage", "manageddisk": {"storageaccounttype": "premium_lrs"}}, "imagereference": {"publisher": "microsoftsqlserver", "offer": "[parameters('imageoffer')]", "sku": "[parameters('sqlsku')]", "version": "latest"}, "copy": [{"name": "datadisks", "count": "[add(parameters('sqldatadiskscount'), 1)]", "input": {"lun": "[copyindex('datadisks')]", "createoption": "attach", "caching": "[if(greaterorequals(copyindex('datadisks'), parameters('sqldatadiskscount')), "none", variables('datadisks').caching)]", "manageddisk": {"id": "[if(greaterorequals(copyindex('datadisks'), parameters('sqldatadiskscount')), resourceid('microsoft.compute/disks/", concat(parameters('virtualmachinename'),"-datadisk-ultrassd-0')), resourceid('microsoft.compute/disks/", concat(parameters('virtualmachinename'),"-datadisk-",copyindex('datadisks'))))]"}}}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('networkinterfacename'))]"}]}, "osprofile": {"computername": "[parameters('virtualmachinename')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]", "windowsconfiguration": {"enableautomaticupdates": true, "provisionvmagent": true}}}}
Deploy an Azure SQL Server with Auditing enabled to write audit logs to a blob storage
{"type": "microsoft.sqlvirtualmachine/sqlvirtualmachines", "apiversion": "2017-03-01-preview", "name": "[parameters('virtualmachinename')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines", parameters('virtualmachinename'))]"], "properties": {"virtualmachineresourceid": "[resourceid('microsoft.compute/virtualmachines", parameters('virtualmachinename'))]", "sqlmanagement": "full", "sqlserverlicensetype": "payg", "storageconfigurationsettings": {"diskconfigurationtype": "[variables('diskconfigurationtype')]", "storageworkloadtype": "[parameters('storageworkloadtype')]", "sqldatasettings": {"luns": "[variables('datadisksluns')]", "defaultfilepath": "[parameters('datapath')]"}, "sqllogsettings": {"luns": "[variables('logdisksluns')]", "defaultfilepath": "[parameters('logpath')]"}, "sqltempdbsettings": {"defaultfilepath": "[variables('tempdbpath')]"}}}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/publicipaddresses", "apiversion": "2020-05-01", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "sku": {"name": "[variables('publicipaddresssku')]"}, "zones": ["[parameters('zone')]"], "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]"}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/publicipaddresses", "apiversion": "2020-05-01", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "sku": {"name": "[variables('publicipaddresssku')]"}, "zones": ["[parameters('zone')]"], "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]"}}{"type": "microsoft.network/networksecuritygroups", "apiversion": "2020-05-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": "[variables('networksecuritygrouprules')]"}}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"type": "microsoft.storage/storageaccounts", "apiversion": "2018-07-01", "name": "[parameters('cloudwitnessname')]", "sku": {"name": "standard_lrs"}, "kind": "storagev2", "location": "[parameters('location')]", "properties": {"accesstier": "hot", "supportshttpstrafficonly": true}}
Storage Account with Storage Service Encryption and a blob deletion retention policy
{"type": "microsoft.storage/storageaccounts", "apiversion": "2018-07-01", "name": "[parameters('cloudwitnessname')]", "sku": {"name": "standard_lrs"}, "kind": "storagev2", "location": "[parameters('location')]", "properties": {"accesstier": "hot", "supportshttpstrafficonly": true}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"type": "microsoft.resources/deployments", "apiversion": "2019-03-01", "name": "joincluster", "dependson": ["[parameters('failoverclustername')]", "[parameters('cloudwitnessname')]", "sqlvirtualmachineloop"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('joinclustertemplateurl')]", "contentversion": "1.0.0.0"}, "parameters": {"existingvirtualmachinenames": {"value": "[variables('existingvmlistarray')]"}, "location": {"value": "[parameters('location')]"}, "sqlserverlicensetype": {"value": "[parameters('sqlserverlicensetype')]"}, "existingvmresourcegroup": {"value": "[parameters('existingvmresourcegroup')]"}, "groupresourceid": {"value": "[variables('groupresourceid')]"}, "domainaccountpassword": {"value": "[parameters('domainaccountpassword')]"}, "sqlservicepassword": {"value": "[parameters('sqlservicepassword')]"}}}}
Deploy an Azure SQL Server with Auditing enabled to write audit logs to a blob storage
{"type": "microsoft.sqlvirtualmachine/sqlvirtualmachines", "apiversion": "2017-03-01-preview", "name": "[trim(variables('existingvmlistarray')[copyindex()])]", "location": "[parameters('location')]", "copy": {"name": "sqlvirtualmachineloop", "count": "[length(variables('existingvmlistarray'))]"}, "properties": {"virtualmachineresourceid": "[resourceid(parameters('existingvmresourcegroup'), "microsoft.compute/virtualmachines", trim(variables('existingvmlistarray')[copyindex()]))]", "sqlserverlicensetype": "[parameters('sqlserverlicensetype')]"}}
Deploy an Azure SQL Server with Auditing enabled to write audit logs to a blob storage
{"type": "microsoft.sqlvirtualmachine/sqlvirtualmachines", "apiversion": "2017-03-01-preview", "name": "[trim(variables('existingvmlistarray')[copyindex()])]", "location": "[parameters('location')]", "copy": {"name": "sqlvirtualmachineloop", "count": "[length(variables('existingvmlistarray'))]"}, "properties": {"virtualmachineresourceid": "[resourceid(parameters('existingvmresourcegroup'), "microsoft.compute/virtualmachines", trim(variables('existingvmlistarray')[copyindex()]))]", "sqlserverlicensetype": "[parameters('sqlserverlicensetype')]"}}{"type": "microsoft.sqlvirtualmachine/sqlvirtualmachinegroups", "apiversion": "2017-03-01-preview", "name": "[parameters('failoverclustername')]", "location": "[parameters('location')]", "properties": {"sqlimageoffer": "[parameters('sqlserverimagetype')]", "sqlimagesku": "enterprise", "wsfcdomainprofile": {"domainfqdn": "[parameters('existingfullyqualifieddomainname')]", "oupath": "[parameters('existingoupath')]", "clusterbootstrapaccount": "[parameters('existingdomainaccount')]", "clusteroperatoraccount": "[parameters('existingdomainaccount')]", "sqlserviceaccount": "[parameters('existingsqlserviceaccount')]", "storageaccounturl": "[reference(resourceid('microsoft.storage/storageaccounts", parameters('cloudwitnessname')), "2018-07-01').primaryendpoints["blob"]]", "storageaccountprimarykey": "[listkeys(resourceid('microsoft.storage/storageaccounts", parameters('cloudwitnessname')), "2018-07-01').keys[0].value]"}}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"type": "microsoft.compute/virtualmachines", "apiversion": "2020-06-01", "name": "[parameters('virtualmachinename')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces/", variables('networkinterfacename'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('virtualmachinesize')]"}, "storageprofile": {"osdisk": {"createoption": "fromimage", "manageddisk": {"storageaccounttype": "premium_lrs"}}, "imagereference": {"publisher": "microsoftsqlserver", "offer": "[parameters('imageoffer')]", "sku": "[parameters('sqlsku')]", "version": "latest"}, "copy": [{"name": "datadisks", "count": "[add(parameters('sqldatadiskscount'), parameters('sqllogdiskscount'))]", "input": {"lun": "[copyindex('datadisks')]", "createoption": "[variables('datadisks').createoption]", "caching": "[if(greaterorequals(copyindex('datadisks'), parameters('sqldatadiskscount')) ,"none", variables('datadisks').caching )]", "writeacceleratorenabled": "[variables('datadisks').writeacceleratorenabled]", "disksizegb": "[variables('datadisks').disksizegb]", "manageddisk": {"storageaccounttype": "[variables('datadisks').storageaccounttype]"}}}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('networkinterfacename'))]"}]}, "osprofile": {"computername": "[parameters('virtualmachinename')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]", "windowsconfiguration": {"enableautomaticupdates": true, "provisionvmagent": true}}}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"type": "microsoft.compute/virtualmachines", "apiversion": "2020-06-01", "name": "[parameters('virtualmachinename')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces/", variables('networkinterfacename'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('virtualmachinesize')]"}, "storageprofile": {"osdisk": {"createoption": "fromimage", "manageddisk": {"storageaccounttype": "premium_lrs"}}, "imagereference": {"publisher": "microsoftsqlserver", "offer": "[parameters('imageoffer')]", "sku": "[parameters('sqlsku')]", "version": "latest"}, "copy": [{"name": "datadisks", "count": "[add(parameters('sqldatadiskscount'), parameters('sqllogdiskscount'))]", "input": {"lun": "[copyindex('datadisks')]", "createoption": "[variables('datadisks').createoption]", "caching": "[if(greaterorequals(copyindex('datadisks'), parameters('sqldatadiskscount')) ,"none", variables('datadisks').caching )]", "writeacceleratorenabled": "[variables('datadisks').writeacceleratorenabled]", "disksizegb": "[variables('datadisks').disksizegb]", "manageddisk": {"storageaccounttype": "[variables('datadisks').storageaccounttype]"}}}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('networkinterfacename'))]"}]}, "osprofile": {"computername": "[parameters('virtualmachinename')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]", "windowsconfiguration": {"enableautomaticupdates": true, "provisionvmagent": true}}}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/publicipaddresses", "apiversion": "2020-06-01", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "sku": {"name": "[variables('publicipaddresssku')]"}, "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]"}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/publicipaddresses", "apiversion": "2020-06-01", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "sku": {"name": "[variables('publicipaddresssku')]"}, "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]"}}{"type": "microsoft.network/networksecuritygroups", "apiversion": "2020-06-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": "[variables('networksecuritygrouprules')]"}}{"type": "microsoft.network/networkinterfaces", "apiversion": "2020-06-01", "name": "[variables('networkinterfacename')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups/", variables('networksecuritygroupname'))]", "[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'))]"}}}], "enableacceleratednetworking": true, "networksecuritygroup": {"id": "[variables('nsgid')]"}}}
Deploy an Azure SQL Server with Auditing enabled to write audit logs to a blob storage
{"type": "microsoft.sqlvirtualmachine/sqlvirtualmachinegroups/availabilitygrouplisteners", "name": "[concat(parameters('existingfailoverclustername'), "/", parameters('listener'))]", "apiversion": "2017-03-01-preview", "location": "[parameters('location')]", "properties": {"availabilitygroupname": "[parameters('existingsqlavailabilitygroup')]", "loadbalancerconfigurations": [{"privateipaddress": {"ipaddress": "[parameters('listenerip')]", "subnetresourceid": "[variables('subnetresourceid')]"}, "loadbalancerresourceid": "[variables('loadbalancerresourceid')]", "probeport": "[parameters('probeport')]", "sqlvirtualmachineinstances": "[variables('sqlvmresourceidlist')]"}], "port": "[parameters('listenerport')]"}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"subscriptionid": "[parameters('virtualnetworksubscriptionid')]", "resourcegroup": "[parameters('virtualnetworkresourcegroupname')]", "type": "microsoft.resources/deployments", "apiversion": "2020-06-01", "name": "addsubnet", "properties": {"mode": "incremental", "template": {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymenttemplate.json#", "contentversion": "1.0.0.0", "resources": [{"type": "microsoft.network/virtualnetworks/subnets", "apiversion": "2020-05-01", "name": "[concat(parameters('virtualnetworkname'),"/",parameters('anfsubnetname'))]", "location": "[parameters('location')]", "properties": {"addressprefix": "[parameters('anfsubnetaddressprefix')]", "delegations": [{"name": "microsoft.netapp.volumes", "properties": {"servicename": "microsoft.netapp/volumes"}}]}}]}}}
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')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetaddressprefix')]", "delegations": [{"name": "netappdelegation", "properties": {"servicename": "microsoft.netapp/volumes"}}]}}]}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[variables('eventhubsnamespaceprivateendpointid')]", "[variables('blobstorageaccountprivateendpointid')]", "[variables('nicid')]"], "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": "[parameters('imagepublisher')]", "offer": "[parameters('imageoffer')]", "sku": "[parameters('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage", "disksizegb": "[parameters('osdisksize')]", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}, "copy": [{"name": "datadisks", "count": "[parameters('numdatadisks')]", "input": {"caching": "[parameters('datadiskcaching')]", "disksizegb": "[parameters('datadisksize')]", "lun": "[copyindex('datadisks')]", "name": "[concat(parameters('vmname'),"-datadisk",copyindex('datadisks'))]", "createoption": "empty", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('blobstorageaccountid')).primaryendpoints["blob"]]"}}}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[variables('eventhubsnamespaceprivateendpointid')]", "[variables('blobstorageaccountprivateendpointid')]", "[variables('nicid')]"], "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": "[parameters('imagepublisher')]", "offer": "[parameters('imageoffer')]", "sku": "[parameters('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage", "disksizegb": "[parameters('osdisksize')]", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}, "copy": [{"name": "datadisks", "count": "[parameters('numdatadisks')]", "input": {"caching": "[parameters('datadiskcaching')]", "disksizegb": "[parameters('datadisksize')]", "lun": "[copyindex('datadisks')]", "name": "[concat(parameters('vmname'),"-datadisk",copyindex('datadisks'))]", "createoption": "empty", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('blobstorageaccountid')).primaryendpoints["blob"]]"}}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'), "/", variables('customscriptextensionname'))]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"skipdos2unix": false, "timestamp": 123456789, "fileuris": ["[variables('scriptfileuri')]"]}, "protectedsettings": {"commandtoexecute": "[concat('bash ", parameters('scriptfilename'), " ", variables('eventhubsnamespaceendpoint'), " ", variables('blobserviceprimaryendpoint'))]"}}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[variables('eventhubsnamespaceprivateendpointid')]", "[variables('blobstorageaccountprivateendpointid')]", "[variables('nicid')]"], "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": "[parameters('imagepublisher')]", "offer": "[parameters('imageoffer')]", "sku": "[parameters('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage", "disksizegb": "[parameters('osdisksize')]", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}, "copy": [{"name": "datadisks", "count": "[parameters('numdatadisks')]", "input": {"caching": "[parameters('datadiskcaching')]", "disksizegb": "[parameters('datadisksize')]", "lun": "[copyindex('datadisks')]", "name": "[concat(parameters('vmname'),"-datadisk",copyindex('datadisks'))]", "createoption": "empty", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('blobstorageaccountid')).primaryendpoints["blob"]]"}}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'), "/", variables('customscriptextensionname'))]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"skipdos2unix": false, "timestamp": 123456789, "fileuris": ["[variables('scriptfileuri')]"]}, "protectedsettings": {"commandtoexecute": "[concat('bash ", parameters('scriptfilename'), " ", variables('eventhubsnamespaceendpoint'), " ", variables('blobserviceprimaryendpoint'))]"}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'),"/", variables('omsagentforlinuxname'))]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]", "[variables('workspaceid')]", "[variables('customscriptid')]"], "properties": {"publisher": "microsoft.enterprisecloud.monitoring", "type": "omsagentforlinux", "typehandlerversion": "1.12", "settings": {"workspaceid": "[reference(variables('workspaceid'), "2020-03-01-preview').customerid]", "stoponmultipleconnections": false}, "protectedsettings": {"workspacekey": "[listkeys(variables('workspaceid'),"2020-03-01-preview').primarysharedkey]"}}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[variables('eventhubsnamespaceprivateendpointid')]", "[variables('blobstorageaccountprivateendpointid')]", "[variables('nicid')]"], "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": "[parameters('imagepublisher')]", "offer": "[parameters('imageoffer')]", "sku": "[parameters('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage", "disksizegb": "[parameters('osdisksize')]", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}, "copy": [{"name": "datadisks", "count": "[parameters('numdatadisks')]", "input": {"caching": "[parameters('datadiskcaching')]", "disksizegb": "[parameters('datadisksize')]", "lun": "[copyindex('datadisks')]", "name": "[concat(parameters('vmname'),"-datadisk",copyindex('datadisks'))]", "createoption": "empty", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('blobstorageaccountid')).primaryendpoints["blob"]]"}}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'), "/", variables('customscriptextensionname'))]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"skipdos2unix": false, "timestamp": 123456789, "fileuris": ["[variables('scriptfileuri')]"]}, "protectedsettings": {"commandtoexecute": "[concat('bash ", parameters('scriptfilename'), " ", variables('eventhubsnamespaceendpoint'), " ", variables('blobserviceprimaryendpoint'))]"}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'),"/", variables('omsagentforlinuxname'))]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]", "[variables('workspaceid')]", "[variables('customscriptid')]"], "properties": {"publisher": "microsoft.enterprisecloud.monitoring", "type": "omsagentforlinux", "typehandlerversion": "1.12", "settings": {"workspaceid": "[reference(variables('workspaceid'), "2020-03-01-preview').customerid]", "stoponmultipleconnections": false}, "protectedsettings": {"workspacekey": "[listkeys(variables('workspaceid'),"2020-03-01-preview').primarysharedkey]"}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'),"/dependencyagent')]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]", "[variables('workspaceid')]", "[variables('customscriptid')]", "[variables('omsagentforlinuxid')]"], "properties": {"publisher": "microsoft.azure.monitoring.dependencyagent", "type": "dependencyagentlinux", "typehandlerversion": "9.10", "autoupgrademinorversion": true}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[variables('eventhubsnamespaceprivateendpointid')]", "[variables('blobstorageaccountprivateendpointid')]", "[variables('nicid')]"], "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": "[parameters('imagepublisher')]", "offer": "[parameters('imageoffer')]", "sku": "[parameters('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage", "disksizegb": "[parameters('osdisksize')]", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}, "copy": [{"name": "datadisks", "count": "[parameters('numdatadisks')]", "input": {"caching": "[parameters('datadiskcaching')]", "disksizegb": "[parameters('datadisksize')]", "lun": "[copyindex('datadisks')]", "name": "[concat(parameters('vmname'),"-datadisk",copyindex('datadisks'))]", "createoption": "empty", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('blobstorageaccountid')).primaryendpoints["blob"]]"}}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'), "/", variables('customscriptextensionname'))]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"skipdos2unix": false, "timestamp": 123456789, "fileuris": ["[variables('scriptfileuri')]"]}, "protectedsettings": {"commandtoexecute": "[concat('bash ", parameters('scriptfilename'), " ", variables('eventhubsnamespaceendpoint'), " ", variables('blobserviceprimaryendpoint'))]"}}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[variables('eventhubsnamespaceprivateendpointid')]", "[variables('blobstorageaccountprivateendpointid')]", "[variables('nicid')]"], "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": "[parameters('imagepublisher')]", "offer": "[parameters('imageoffer')]", "sku": "[parameters('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage", "disksizegb": "[parameters('osdisksize')]", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}, "copy": [{"name": "datadisks", "count": "[parameters('numdatadisks')]", "input": {"caching": "[parameters('datadiskcaching')]", "disksizegb": "[parameters('datadisksize')]", "lun": "[copyindex('datadisks')]", "name": "[concat(parameters('vmname'),"-datadisk",copyindex('datadisks'))]", "createoption": "empty", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('blobstorageaccountid')).primaryendpoints["blob"]]"}}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'), "/", variables('customscriptextensionname'))]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"skipdos2unix": false, "timestamp": 123456789, "fileuris": ["[variables('scriptfileuri')]"]}, "protectedsettings": {"commandtoexecute": "[concat('bash ", parameters('scriptfilename'), " ", variables('eventhubsnamespaceendpoint'), " ", variables('blobserviceprimaryendpoint'))]"}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'),"/", variables('omsagentforlinuxname'))]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]", "[variables('workspaceid')]", "[variables('customscriptid')]"], "properties": {"publisher": "microsoft.enterprisecloud.monitoring", "type": "omsagentforlinux", "typehandlerversion": "1.12", "settings": {"workspaceid": "[reference(variables('workspaceid'), "2020-03-01-preview').customerid]", "stoponmultipleconnections": false}, "protectedsettings": {"workspacekey": "[listkeys(variables('workspaceid'),"2020-03-01-preview').primarysharedkey]"}}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[variables('eventhubsnamespaceprivateendpointid')]", "[variables('blobstorageaccountprivateendpointid')]", "[variables('nicid')]"], "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": "[parameters('imagepublisher')]", "offer": "[parameters('imageoffer')]", "sku": "[parameters('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage", "disksizegb": "[parameters('osdisksize')]", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}, "copy": [{"name": "datadisks", "count": "[parameters('numdatadisks')]", "input": {"caching": "[parameters('datadiskcaching')]", "disksizegb": "[parameters('datadisksize')]", "lun": "[copyindex('datadisks')]", "name": "[concat(parameters('vmname'),"-datadisk",copyindex('datadisks'))]", "createoption": "empty", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('blobstorageaccountid')).primaryendpoints["blob"]]"}}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'), "/", variables('customscriptextensionname'))]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"skipdos2unix": false, "timestamp": 123456789, "fileuris": ["[variables('scriptfileuri')]"]}, "protectedsettings": {"commandtoexecute": "[concat('bash ", parameters('scriptfilename'), " ", variables('eventhubsnamespaceendpoint'), " ", variables('blobserviceprimaryendpoint'))]"}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'),"/", variables('omsagentforlinuxname'))]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]", "[variables('workspaceid')]", "[variables('customscriptid')]"], "properties": {"publisher": "microsoft.enterprisecloud.monitoring", "type": "omsagentforlinux", "typehandlerversion": "1.12", "settings": {"workspaceid": "[reference(variables('workspaceid'), "2020-03-01-preview').customerid]", "stoponmultipleconnections": false}, "protectedsettings": {"workspacekey": "[listkeys(variables('workspaceid'),"2020-03-01-preview').primarysharedkey]"}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'),"/dependencyagent')]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]", "[variables('workspaceid')]", "[variables('customscriptid')]", "[variables('omsagentforlinuxid')]"], "properties": {"publisher": "microsoft.azure.monitoring.dependencyagent", "type": "dependencyagentlinux", "typehandlerversion": "9.10", "autoupgrademinorversion": true}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-04-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[concat(tolower(parameters('vmname')), uniquestring(resourcegroup().id))]"}}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-04-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[concat(tolower(parameters('vmname')), uniquestring(resourcegroup().id))]"}}}{"apiversion": "2019-08-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('nsgname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allowsshinbound", "properties": {"priority": 100, "access": "allow", "direction": "inbound", "destinationportrange": "22", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"apiversion": "2019-11-01", "type": "microsoft.network/virtualnetworks", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[variables('nsgid')]"], "properties": {"addressspace": {"addressprefixes": ["[parameters('virtualnetworkaddressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetaddressprefix')]", "networksecuritygroup": {"id": "[variables('nsgid')]"}, "privateendpointnetworkpolicies": "disabled", "privatelinkservicenetworkpolicies": "enabled"}}]}}{"apiversion": "2020-04-01", "type": "microsoft.network/networkinterfaces", "name": "[variables('nicname')]", "location": "[parameters('location')]", "dependson": ["[variables('publicipid')]", "[variables('vnetid')]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('publicipaddressname'))]"}, "subnet": {"id": "[variables('subnetid')]"}}}]}}{"type": "microsoft.network/privatednszones", "apiversion": "2018-09-01", "name": "[variables('eventhubsnamespaceprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-04-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[concat(tolower(parameters('vmname')), uniquestring(resourcegroup().id))]"}}}{"apiversion": "2019-08-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('nsgname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allowsshinbound", "properties": {"priority": 100, "access": "allow", "direction": "inbound", "destinationportrange": "22", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"apiversion": "2019-11-01", "type": "microsoft.network/virtualnetworks", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[variables('nsgid')]"], "properties": {"addressspace": {"addressprefixes": ["[parameters('virtualnetworkaddressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetaddressprefix')]", "networksecuritygroup": {"id": "[variables('nsgid')]"}, "privateendpointnetworkpolicies": "disabled", "privatelinkservicenetworkpolicies": "enabled"}}]}}{"apiversion": "2020-04-01", "type": "microsoft.network/networkinterfaces", "name": "[variables('nicname')]", "location": "[parameters('location')]", "dependson": ["[variables('publicipid')]", "[variables('vnetid')]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('publicipaddressname'))]"}, "subnet": {"id": "[variables('subnetid')]"}}}]}}{"type": "microsoft.network/privatednszones", "apiversion": "2018-09-01", "name": "[variables('eventhubsnamespaceprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones", "apiversion": "2018-09-01", "name": "[variables('blobprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2018-09-01", "name": "[concat(variables('eventhubsnamespaceprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('eventhubsnamespaceprivatednszoneid')]", "[variables('vnetid')]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[variables('vnetid')]"}}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-04-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[concat(tolower(parameters('vmname')), uniquestring(resourcegroup().id))]"}}}{"apiversion": "2019-08-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('nsgname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allowsshinbound", "properties": {"priority": 100, "access": "allow", "direction": "inbound", "destinationportrange": "22", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"apiversion": "2019-11-01", "type": "microsoft.network/virtualnetworks", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[variables('nsgid')]"], "properties": {"addressspace": {"addressprefixes": ["[parameters('virtualnetworkaddressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetaddressprefix')]", "networksecuritygroup": {"id": "[variables('nsgid')]"}, "privateendpointnetworkpolicies": "disabled", "privatelinkservicenetworkpolicies": "enabled"}}]}}{"apiversion": "2020-04-01", "type": "microsoft.network/networkinterfaces", "name": "[variables('nicname')]", "location": "[parameters('location')]", "dependson": ["[variables('publicipid')]", "[variables('vnetid')]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('publicipaddressname'))]"}, "subnet": {"id": "[variables('subnetid')]"}}}]}}{"type": "microsoft.network/privatednszones", "apiversion": "2018-09-01", "name": "[variables('eventhubsnamespaceprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones", "apiversion": "2018-09-01", "name": "[variables('blobprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2018-09-01", "name": "[concat(variables('eventhubsnamespaceprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('eventhubsnamespaceprivatednszoneid')]", "[variables('vnetid')]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[variables('vnetid')]"}}}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2018-09-01", "name": "[concat(variables('blobprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('blobprivatednszoneid')]", "[variables('vnetid')]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[variables('vnetid')]"}}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-04-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[concat(tolower(parameters('vmname')), uniquestring(resourcegroup().id))]"}}}{"apiversion": "2019-08-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('nsgname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allowsshinbound", "properties": {"priority": 100, "access": "allow", "direction": "inbound", "destinationportrange": "22", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"apiversion": "2019-11-01", "type": "microsoft.network/virtualnetworks", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[variables('nsgid')]"], "properties": {"addressspace": {"addressprefixes": ["[parameters('virtualnetworkaddressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetaddressprefix')]", "networksecuritygroup": {"id": "[variables('nsgid')]"}, "privateendpointnetworkpolicies": "disabled", "privatelinkservicenetworkpolicies": "enabled"}}]}}{"apiversion": "2020-04-01", "type": "microsoft.network/networkinterfaces", "name": "[variables('nicname')]", "location": "[parameters('location')]", "dependson": ["[variables('publicipid')]", "[variables('vnetid')]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('publicipaddressname'))]"}, "subnet": {"id": "[variables('subnetid')]"}}}]}}{"type": "microsoft.network/privatednszones", "apiversion": "2018-09-01", "name": "[variables('eventhubsnamespaceprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones", "apiversion": "2018-09-01", "name": "[variables('blobprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2018-09-01", "name": "[concat(variables('eventhubsnamespaceprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('eventhubsnamespaceprivatednszoneid')]", "[variables('vnetid')]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[variables('vnetid')]"}}}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2018-09-01", "name": "[concat(variables('blobprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('blobprivatednszoneid')]", "[variables('vnetid')]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[variables('vnetid')]"}}}{"type": "microsoft.network/privateendpoints", "apiversion": "2020-04-01", "name": "[parameters('eventhubsnamespaceprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetid')]", "[variables('eventhubsnamespaceid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('eventhubsnamespaceprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('eventhubsnamespaceid')]", "groupids": ["[variables('eventhubsnamespaceprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}, "customdnsconfigs": [{"fqdn": "[concat(parameters('eventhubsnamespacename'), variables('eventhubspublicdnszoneforwarder'))]"}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-04-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[concat(tolower(parameters('vmname')), uniquestring(resourcegroup().id))]"}}}{"apiversion": "2019-08-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('nsgname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allowsshinbound", "properties": {"priority": 100, "access": "allow", "direction": "inbound", "destinationportrange": "22", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"apiversion": "2019-11-01", "type": "microsoft.network/virtualnetworks", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[variables('nsgid')]"], "properties": {"addressspace": {"addressprefixes": ["[parameters('virtualnetworkaddressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetaddressprefix')]", "networksecuritygroup": {"id": "[variables('nsgid')]"}, "privateendpointnetworkpolicies": "disabled", "privatelinkservicenetworkpolicies": "enabled"}}]}}{"apiversion": "2020-04-01", "type": "microsoft.network/networkinterfaces", "name": "[variables('nicname')]", "location": "[parameters('location')]", "dependson": ["[variables('publicipid')]", "[variables('vnetid')]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('publicipaddressname'))]"}, "subnet": {"id": "[variables('subnetid')]"}}}]}}{"type": "microsoft.network/privatednszones", "apiversion": "2018-09-01", "name": "[variables('eventhubsnamespaceprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones", "apiversion": "2018-09-01", "name": "[variables('blobprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2018-09-01", "name": "[concat(variables('eventhubsnamespaceprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('eventhubsnamespaceprivatednszoneid')]", "[variables('vnetid')]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[variables('vnetid')]"}}}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2018-09-01", "name": "[concat(variables('blobprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('blobprivatednszoneid')]", "[variables('vnetid')]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[variables('vnetid')]"}}}{"type": "microsoft.network/privateendpoints", "apiversion": "2020-04-01", "name": "[parameters('eventhubsnamespaceprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetid')]", "[variables('eventhubsnamespaceid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('eventhubsnamespaceprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('eventhubsnamespaceid')]", "groupids": ["[variables('eventhubsnamespaceprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}, "customdnsconfigs": [{"fqdn": "[concat(parameters('eventhubsnamespacename'), variables('eventhubspublicdnszoneforwarder'))]"}]}}{"type": "microsoft.network/privateendpoints", "apiversion": "2020-04-01", "name": "[parameters('blobstorageaccountprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetid')]", "[variables('blobstorageaccountid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('blobstorageaccountprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('blobstorageaccountid')]", "groupids": ["[variables('blobstorageaccountprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}, "customdnsconfigs": [{"fqdn": "[concat(parameters('blobstorageaccountname'), variables('blobpublicdnszoneforwarder'))]"}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-04-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[concat(tolower(parameters('vmname')), uniquestring(resourcegroup().id))]"}}}{"apiversion": "2019-08-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('nsgname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allowsshinbound", "properties": {"priority": 100, "access": "allow", "direction": "inbound", "destinationportrange": "22", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"apiversion": "2019-11-01", "type": "microsoft.network/virtualnetworks", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[variables('nsgid')]"], "properties": {"addressspace": {"addressprefixes": ["[parameters('virtualnetworkaddressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetaddressprefix')]", "networksecuritygroup": {"id": "[variables('nsgid')]"}, "privateendpointnetworkpolicies": "disabled", "privatelinkservicenetworkpolicies": "enabled"}}]}}{"apiversion": "2020-04-01", "type": "microsoft.network/networkinterfaces", "name": "[variables('nicname')]", "location": "[parameters('location')]", "dependson": ["[variables('publicipid')]", "[variables('vnetid')]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('publicipaddressname'))]"}, "subnet": {"id": "[variables('subnetid')]"}}}]}}{"type": "microsoft.network/privatednszones", "apiversion": "2018-09-01", "name": "[variables('eventhubsnamespaceprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones", "apiversion": "2018-09-01", "name": "[variables('blobprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2018-09-01", "name": "[concat(variables('eventhubsnamespaceprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('eventhubsnamespaceprivatednszoneid')]", "[variables('vnetid')]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[variables('vnetid')]"}}}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2018-09-01", "name": "[concat(variables('blobprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('blobprivatednszoneid')]", "[variables('vnetid')]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[variables('vnetid')]"}}}{"type": "microsoft.network/privateendpoints", "apiversion": "2020-04-01", "name": "[parameters('eventhubsnamespaceprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetid')]", "[variables('eventhubsnamespaceid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('eventhubsnamespaceprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('eventhubsnamespaceid')]", "groupids": ["[variables('eventhubsnamespaceprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}, "customdnsconfigs": [{"fqdn": "[concat(parameters('eventhubsnamespacename'), variables('eventhubspublicdnszoneforwarder'))]"}]}}{"type": "microsoft.network/privateendpoints", "apiversion": "2020-04-01", "name": "[parameters('blobstorageaccountprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetid')]", "[variables('blobstorageaccountid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('blobstorageaccountprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('blobstorageaccountid')]", "groupids": ["[variables('blobstorageaccountprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}, "customdnsconfigs": [{"fqdn": "[concat(parameters('blobstorageaccountname'), variables('blobpublicdnszoneforwarder'))]"}]}}{"type": "microsoft.network/privateendpoints/privatednszonegroups", "apiversion": "2020-03-01", "name": "[variables('eventhubsnamespaceprivatednszonegroup')]", "location": "[parameters('location')]", "dependson": ["[variables('eventhubsnamespaceprivatednszoneid')]", "[variables('eventhubsnamespaceprivateendpointid')]"], "properties": {"privatednszoneconfigs": [{"name": "dnsconfig", "properties": {"privatednszoneid": "[variables('eventhubsnamespaceprivatednszoneid')]"}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-04-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[concat(tolower(parameters('vmname')), uniquestring(resourcegroup().id))]"}}}{"apiversion": "2019-08-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('nsgname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allowsshinbound", "properties": {"priority": 100, "access": "allow", "direction": "inbound", "destinationportrange": "22", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"apiversion": "2019-11-01", "type": "microsoft.network/virtualnetworks", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[variables('nsgid')]"], "properties": {"addressspace": {"addressprefixes": ["[parameters('virtualnetworkaddressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetaddressprefix')]", "networksecuritygroup": {"id": "[variables('nsgid')]"}, "privateendpointnetworkpolicies": "disabled", "privatelinkservicenetworkpolicies": "enabled"}}]}}{"apiversion": "2020-04-01", "type": "microsoft.network/networkinterfaces", "name": "[variables('nicname')]", "location": "[parameters('location')]", "dependson": ["[variables('publicipid')]", "[variables('vnetid')]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('publicipaddressname'))]"}, "subnet": {"id": "[variables('subnetid')]"}}}]}}{"type": "microsoft.network/privatednszones", "apiversion": "2018-09-01", "name": "[variables('eventhubsnamespaceprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones", "apiversion": "2018-09-01", "name": "[variables('blobprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2018-09-01", "name": "[concat(variables('eventhubsnamespaceprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('eventhubsnamespaceprivatednszoneid')]", "[variables('vnetid')]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[variables('vnetid')]"}}}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2018-09-01", "name": "[concat(variables('blobprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('blobprivatednszoneid')]", "[variables('vnetid')]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[variables('vnetid')]"}}}{"type": "microsoft.network/privateendpoints", "apiversion": "2020-04-01", "name": "[parameters('eventhubsnamespaceprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetid')]", "[variables('eventhubsnamespaceid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('eventhubsnamespaceprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('eventhubsnamespaceid')]", "groupids": ["[variables('eventhubsnamespaceprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}, "customdnsconfigs": [{"fqdn": "[concat(parameters('eventhubsnamespacename'), variables('eventhubspublicdnszoneforwarder'))]"}]}}{"type": "microsoft.network/privateendpoints", "apiversion": "2020-04-01", "name": "[parameters('blobstorageaccountprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetid')]", "[variables('blobstorageaccountid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('blobstorageaccountprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('blobstorageaccountid')]", "groupids": ["[variables('blobstorageaccountprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}, "customdnsconfigs": [{"fqdn": "[concat(parameters('blobstorageaccountname'), variables('blobpublicdnszoneforwarder'))]"}]}}{"type": "microsoft.network/privateendpoints/privatednszonegroups", "apiversion": "2020-03-01", "name": "[variables('eventhubsnamespaceprivatednszonegroup')]", "location": "[parameters('location')]", "dependson": ["[variables('eventhubsnamespaceprivatednszoneid')]", "[variables('eventhubsnamespaceprivateendpointid')]"], "properties": {"privatednszoneconfigs": [{"name": "dnsconfig", "properties": {"privatednszoneid": "[variables('eventhubsnamespaceprivatednszoneid')]"}}]}}{"type": "microsoft.network/privateendpoints/privatednszonegroups", "apiversion": "2020-03-01", "name": "[variables('blobprivatednszonegroup')]", "location": "[parameters('location')]", "dependson": ["[variables('blobprivatednszoneid')]", "[variables('blobstorageaccountprivateendpointid')]"], "properties": {"privatednszoneconfigs": [{"name": "dnsconfig", "properties": {"privatednszoneid": "[variables('blobprivatednszoneid')]"}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2017-09-01", "name": "[parameters('vnetrulename')]", "location": "[parameters('location')]", "type": "microsoft.network/virtualnetworks", "properties": {"addressspace": {"addressprefixes": ["10.0.0.0/23"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "10.0.0.0/23", "serviceendpoints": [{"service": "microsoft.eventhub"}]}}]}}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"type": "microsoft.storage/storageaccounts", "apiversion": "2021-04-01", "name": "[parameters('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('storageaccounttype')]"}, "kind": "storagev2", "properties": {"ishnsenabled": true, "islocaluserenabled": true, "issftpenabled": true}}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"type": "microsoft.storage/storageaccounts", "apiversion": "2021-04-01", "name": "[parameters('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('storageaccounttype')]"}, "kind": "storagev2", "properties": {"ishnsenabled": true, "islocaluserenabled": true, "issftpenabled": true}}{"type": "microsoft.storage/storageaccounts/blobservices/containers", "apiversion": "2021-04-01", "name": "[format('{0}/default/{1}", parameters('storageaccountname'), parameters('homedirectory'))]", "properties": {"publicaccess": "none"}, "dependson": ["[resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname'))]"]}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"type": "microsoft.storage/storageaccounts", "apiversion": "2021-04-01", "name": "[parameters('storageaccountname')]", "location": "[parameters('location')]", "kind": "storagev2", "sku": {"name": "standard_lrs"}, "properties": {"accesstier": "hot"}}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"type": "microsoft.storage/storageaccounts", "apiversion": "2021-04-01", "name": "[parameters('storageaccountname')]", "location": "[parameters('location')]", "kind": "storagev2", "sku": {"name": "standard_lrs"}, "properties": {"accesstier": "hot"}}{"copy": {"name": "containers", "count": "[length(range(0, 3))]"}, "type": "microsoft.storage/storageaccounts/blobservices/containers", "apiversion": "2021-04-01", "name": "[format('{0}/default/{1}{2}", parameters('storageaccountname'), parameters('containerprefix'), range(0, 3)[copyindex()])]", "dependson": ["[resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname'))]"]}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"type": "microsoft.storage/storageaccounts", "apiversion": "2021-06-01", "name": "[parameters('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storagev2", "properties": {"accesstier": "hot"}}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"type": "microsoft.storage/storageaccounts", "apiversion": "2021-06-01", "name": "[parameters('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storagev2", "properties": {"accesstier": "hot"}}{"type": "microsoft.storage/storageaccounts/blobservices/containers", "apiversion": "2021-06-01", "name": "[format('{0}/default/{1}", parameters('storageaccountname'), parameters('containername'))]", "dependson": ["[resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname'))]"]}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"type": "microsoft.storage/storageaccounts", "apiversion": "2021-04-01", "name": "[parameters('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('storageaccounttype')]"}, "kind": "storage", "properties": {"encryption": {"keysource": "microsoft.storage", "services": {"blob": {"enabled": "[parameters('blobencryptionenabled')]"}}}}}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"type": "microsoft.storage/storageaccounts", "apiversion": "2021-06-01", "name": "[parameters('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('storageaccounttype')]"}, "kind": "storagev2", "properties": {}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[variables('filestorageaccountprivateendpointid')]", "[variables('blobstorageaccountprivateendpointid')]", "[variables('nicid')]"], "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": "[parameters('imagepublisher')]", "offer": "[parameters('imageoffer')]", "sku": "[parameters('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage", "disksizegb": "[parameters('osdisksize')]", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}, "copy": [{"name": "datadisks", "count": "[parameters('numdatadisks')]", "input": {"caching": "[parameters('datadiskcaching')]", "disksizegb": "[parameters('datadisksize')]", "lun": "[copyindex('datadisks')]", "name": "[concat(parameters('vmname'),"-datadisk",copyindex('datadisks'))]", "createoption": "empty", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('blobstorageaccountid')).primaryendpoints["blob"]]"}}}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[variables('filestorageaccountprivateendpointid')]", "[variables('blobstorageaccountprivateendpointid')]", "[variables('nicid')]"], "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": "[parameters('imagepublisher')]", "offer": "[parameters('imageoffer')]", "sku": "[parameters('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage", "disksizegb": "[parameters('osdisksize')]", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}, "copy": [{"name": "datadisks", "count": "[parameters('numdatadisks')]", "input": {"caching": "[parameters('datadiskcaching')]", "disksizegb": "[parameters('datadisksize')]", "lun": "[copyindex('datadisks')]", "name": "[concat(parameters('vmname'),"-datadisk",copyindex('datadisks'))]", "createoption": "empty", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('blobstorageaccountid')).primaryendpoints["blob"]]"}}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'), "/", variables('customscriptextensionname'))]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"skipdos2unix": false, "timestamp": 123456789, "fileuris": ["[variables('scriptfileuri')]"]}, "protectedsettings": {"commandtoexecute": "[concat('bash ", parameters('scriptfilename'), " ", variables('fileserviceprimaryendpoint'), " ", variables('blobserviceprimaryendpoint'))]"}}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[variables('filestorageaccountprivateendpointid')]", "[variables('blobstorageaccountprivateendpointid')]", "[variables('nicid')]"], "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": "[parameters('imagepublisher')]", "offer": "[parameters('imageoffer')]", "sku": "[parameters('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage", "disksizegb": "[parameters('osdisksize')]", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}, "copy": [{"name": "datadisks", "count": "[parameters('numdatadisks')]", "input": {"caching": "[parameters('datadiskcaching')]", "disksizegb": "[parameters('datadisksize')]", "lun": "[copyindex('datadisks')]", "name": "[concat(parameters('vmname'),"-datadisk",copyindex('datadisks'))]", "createoption": "empty", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('blobstorageaccountid')).primaryendpoints["blob"]]"}}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'), "/", variables('customscriptextensionname'))]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"skipdos2unix": false, "timestamp": 123456789, "fileuris": ["[variables('scriptfileuri')]"]}, "protectedsettings": {"commandtoexecute": "[concat('bash ", parameters('scriptfilename'), " ", variables('fileserviceprimaryendpoint'), " ", variables('blobserviceprimaryendpoint'))]"}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'),"/", variables('omsagentforlinuxname'))]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]", "[variables('workspaceid')]", "[variables('customscriptid')]"], "properties": {"publisher": "microsoft.enterprisecloud.monitoring", "type": "omsagentforlinux", "typehandlerversion": "1.12", "settings": {"workspaceid": "[reference(variables('workspaceid'), "2020-08-01').customerid]", "stoponmultipleconnections": false}, "protectedsettings": {"workspacekey": "[listkeys(variables('workspaceid'),"2020-08-01').primarysharedkey]"}}}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"apiversion": "2021-01-01", "type": "microsoft.storage/storageaccounts", "name": "[parameters('filestorageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs", "tier": "standard"}, "kind": "storagev2", "properties": {"accesstier": "hot", "networkacls": {"defaultaction": "[parameters('networkaclsdefaultaction')]", "bypass": "azureservices"}, "allowblobpublicaccess": "[parameters('allowblobpublicaccess')]"}}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"apiversion": "2021-01-01", "type": "microsoft.storage/storageaccounts", "name": "[parameters('filestorageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs", "tier": "standard"}, "kind": "storagev2", "properties": {"accesstier": "hot", "networkacls": {"defaultaction": "[parameters('networkaclsdefaultaction')]", "bypass": "azureservices"}, "allowblobpublicaccess": "[parameters('allowblobpublicaccess')]"}}{"type": "microsoft.storage/storageaccounts/fileservices/shares", "apiversion": "2021-01-01", "name": "[concat(parameters('filestorageaccountname'), "/default/", parameters('filesharename'))]", "dependson": ["[variables('filestorageaccountid')]"], "properties": {"sharequota": "[parameters('sharequota')]"}}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"apiversion": "2021-01-01", "type": "microsoft.storage/storageaccounts", "name": "[parameters('filestorageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs", "tier": "standard"}, "kind": "storagev2", "properties": {"accesstier": "hot", "networkacls": {"defaultaction": "[parameters('networkaclsdefaultaction')]", "bypass": "azureservices"}, "allowblobpublicaccess": "[parameters('allowblobpublicaccess')]"}}{"type": "microsoft.storage/storageaccounts/fileservices/shares", "apiversion": "2021-01-01", "name": "[concat(parameters('filestorageaccountname'), "/default/", parameters('filesharename'))]", "dependson": ["[variables('filestorageaccountid')]"], "properties": {"sharequota": "[parameters('sharequota')]"}}{"apiversion": "2021-01-01", "type": "microsoft.storage/storageaccounts", "name": "[parameters('blobstorageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storagev2", "properties": {"accesstier": "hot", "networkacls": {"defaultaction": "[parameters('networkaclsdefaultaction')]", "bypass": "azureservices"}, "allowblobpublicaccess": "[parameters('allowblobpublicaccess')]"}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[variables('filestorageaccountprivateendpointid')]", "[variables('blobstorageaccountprivateendpointid')]", "[variables('nicid')]"], "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": "[parameters('imagepublisher')]", "offer": "[parameters('imageoffer')]", "sku": "[parameters('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage", "disksizegb": "[parameters('osdisksize')]", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}, "copy": [{"name": "datadisks", "count": "[parameters('numdatadisks')]", "input": {"caching": "[parameters('datadiskcaching')]", "disksizegb": "[parameters('datadisksize')]", "lun": "[copyindex('datadisks')]", "name": "[concat(parameters('vmname'),"-datadisk",copyindex('datadisks'))]", "createoption": "empty", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('blobstorageaccountid')).primaryendpoints["blob"]]"}}}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[variables('filestorageaccountprivateendpointid')]", "[variables('blobstorageaccountprivateendpointid')]", "[variables('nicid')]"], "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": "[parameters('imagepublisher')]", "offer": "[parameters('imageoffer')]", "sku": "[parameters('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage", "disksizegb": "[parameters('osdisksize')]", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}, "copy": [{"name": "datadisks", "count": "[parameters('numdatadisks')]", "input": {"caching": "[parameters('datadiskcaching')]", "disksizegb": "[parameters('datadisksize')]", "lun": "[copyindex('datadisks')]", "name": "[concat(parameters('vmname'),"-datadisk",copyindex('datadisks'))]", "createoption": "empty", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('blobstorageaccountid')).primaryendpoints["blob"]]"}}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'), "/", variables('customscriptextensionname'))]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"skipdos2unix": false, "timestamp": 123456789, "fileuris": ["[variables('scriptfileuri')]"]}, "protectedsettings": {"commandtoexecute": "[concat('bash ", parameters('scriptfilename'), " ", variables('fileserviceprimaryendpoint'), " ", variables('blobserviceprimaryendpoint'))]"}}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[variables('filestorageaccountprivateendpointid')]", "[variables('blobstorageaccountprivateendpointid')]", "[variables('nicid')]"], "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": "[parameters('imagepublisher')]", "offer": "[parameters('imageoffer')]", "sku": "[parameters('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage", "disksizegb": "[parameters('osdisksize')]", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}, "copy": [{"name": "datadisks", "count": "[parameters('numdatadisks')]", "input": {"caching": "[parameters('datadiskcaching')]", "disksizegb": "[parameters('datadisksize')]", "lun": "[copyindex('datadisks')]", "name": "[concat(parameters('vmname'),"-datadisk",copyindex('datadisks'))]", "createoption": "empty", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('blobstorageaccountid')).primaryendpoints["blob"]]"}}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'), "/", variables('customscriptextensionname'))]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"skipdos2unix": false, "timestamp": 123456789, "fileuris": ["[variables('scriptfileuri')]"]}, "protectedsettings": {"commandtoexecute": "[concat('bash ", parameters('scriptfilename'), " ", variables('fileserviceprimaryendpoint'), " ", variables('blobserviceprimaryendpoint'))]"}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'),"/", variables('omsagentforlinuxname'))]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]", "[variables('workspaceid')]", "[variables('customscriptid')]"], "properties": {"publisher": "microsoft.enterprisecloud.monitoring", "type": "omsagentforlinux", "typehandlerversion": "1.12", "settings": {"workspaceid": "[reference(variables('workspaceid'), "2020-08-01').customerid]", "stoponmultipleconnections": false}, "protectedsettings": {"workspacekey": "[listkeys(variables('workspaceid'),"2020-08-01').primarysharedkey]"}}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[variables('filestorageaccountprivateendpointid')]", "[variables('blobstorageaccountprivateendpointid')]", "[variables('nicid')]"], "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": "[parameters('imagepublisher')]", "offer": "[parameters('imageoffer')]", "sku": "[parameters('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage", "disksizegb": "[parameters('osdisksize')]", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}, "copy": [{"name": "datadisks", "count": "[parameters('numdatadisks')]", "input": {"caching": "[parameters('datadiskcaching')]", "disksizegb": "[parameters('datadisksize')]", "lun": "[copyindex('datadisks')]", "name": "[concat(parameters('vmname'),"-datadisk",copyindex('datadisks'))]", "createoption": "empty", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('blobstorageaccountid')).primaryendpoints["blob"]]"}}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'), "/", variables('customscriptextensionname'))]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"skipdos2unix": false, "timestamp": 123456789, "fileuris": ["[variables('scriptfileuri')]"]}, "protectedsettings": {"commandtoexecute": "[concat('bash ", parameters('scriptfilename'), " ", variables('fileserviceprimaryendpoint'), " ", variables('blobserviceprimaryendpoint'))]"}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'),"/", variables('omsagentforlinuxname'))]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]", "[variables('workspaceid')]", "[variables('customscriptid')]"], "properties": {"publisher": "microsoft.enterprisecloud.monitoring", "type": "omsagentforlinux", "typehandlerversion": "1.12", "settings": {"workspaceid": "[reference(variables('workspaceid'), "2020-08-01').customerid]", "stoponmultipleconnections": false}, "protectedsettings": {"workspacekey": "[listkeys(variables('workspaceid'),"2020-08-01').primarysharedkey]"}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'),"/dependencyagent')]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]", "[variables('workspaceid')]", "[variables('customscriptid')]", "[variables('omsagentforlinuxid')]"], "properties": {"publisher": "microsoft.azure.monitoring.dependencyagent", "type": "dependencyagentlinux", "typehandlerversion": "9.10", "autoupgrademinorversion": true}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/privateendpoints", "apiversion": "2020-07-01", "name": "[parameters('filestorageaccountprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('filestorageaccountid')]", "[variables('fileshareid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('filestorageaccountprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('filestorageaccountid')]", "groupids": ["[variables('filestorageaccountprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/privateendpoints", "apiversion": "2020-07-01", "name": "[parameters('filestorageaccountprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('filestorageaccountid')]", "[variables('fileshareid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('filestorageaccountprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('filestorageaccountid')]", "groupids": ["[variables('filestorageaccountprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}}}{"type": "microsoft.network/privateendpoints/privatednszonegroups", "apiversion": "2020-06-01", "name": "[variables('fileprivatednszonegroup')]", "location": "[parameters('location')]", "dependson": ["[variables('fileprivatednszoneid')]", "[variables('filestorageaccountprivateendpointid')]"], "properties": {"privatednszoneconfigs": [{"name": "dnsconfig", "properties": {"privatednszoneid": "[variables('fileprivatednszoneid')]"}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/privateendpoints", "apiversion": "2020-07-01", "name": "[parameters('filestorageaccountprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('filestorageaccountid')]", "[variables('fileshareid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('filestorageaccountprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('filestorageaccountid')]", "groupids": ["[variables('filestorageaccountprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}}}{"type": "microsoft.network/privateendpoints/privatednszonegroups", "apiversion": "2020-06-01", "name": "[variables('fileprivatednszonegroup')]", "location": "[parameters('location')]", "dependson": ["[variables('fileprivatednszoneid')]", "[variables('filestorageaccountprivateendpointid')]"], "properties": {"privatednszoneconfigs": [{"name": "dnsconfig", "properties": {"privatednszoneid": "[variables('fileprivatednszoneid')]"}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[concat(tolower(parameters('vmname')), uniquestring(resourcegroup().id))]"}}}{"apiversion": "2019-08-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('nsgname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allowsshinbound", "properties": {"priority": 100, "access": "allow", "direction": "inbound", "destinationportrange": "22", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/privateendpoints", "apiversion": "2020-07-01", "name": "[parameters('filestorageaccountprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('filestorageaccountid')]", "[variables('fileshareid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('filestorageaccountprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('filestorageaccountid')]", "groupids": ["[variables('filestorageaccountprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}}}{"type": "microsoft.network/privateendpoints/privatednszonegroups", "apiversion": "2020-06-01", "name": "[variables('fileprivatednszonegroup')]", "location": "[parameters('location')]", "dependson": ["[variables('fileprivatednszoneid')]", "[variables('filestorageaccountprivateendpointid')]"], "properties": {"privatednszoneconfigs": [{"name": "dnsconfig", "properties": {"privatednszoneid": "[variables('fileprivatednszoneid')]"}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[concat(tolower(parameters('vmname')), uniquestring(resourcegroup().id))]"}}}{"apiversion": "2019-08-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('nsgname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allowsshinbound", "properties": {"priority": 100, "access": "allow", "direction": "inbound", "destinationportrange": "22", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"apiversion": "2019-11-01", "type": "microsoft.network/virtualnetworks", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[variables('nsgid')]"], "properties": {"addressspace": {"addressprefixes": ["[parameters('virtualnetworkaddressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetaddressprefix')]", "networksecuritygroup": {"id": "[variables('nsgid')]"}, "privateendpointnetworkpolicies": "disabled", "privatelinkservicenetworkpolicies": "enabled"}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/privateendpoints", "apiversion": "2020-07-01", "name": "[parameters('filestorageaccountprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('filestorageaccountid')]", "[variables('fileshareid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('filestorageaccountprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('filestorageaccountid')]", "groupids": ["[variables('filestorageaccountprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}}}{"type": "microsoft.network/privateendpoints/privatednszonegroups", "apiversion": "2020-06-01", "name": "[variables('fileprivatednszonegroup')]", "location": "[parameters('location')]", "dependson": ["[variables('fileprivatednszoneid')]", "[variables('filestorageaccountprivateendpointid')]"], "properties": {"privatednszoneconfigs": [{"name": "dnsconfig", "properties": {"privatednszoneid": "[variables('fileprivatednszoneid')]"}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[concat(tolower(parameters('vmname')), uniquestring(resourcegroup().id))]"}}}{"apiversion": "2019-08-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('nsgname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allowsshinbound", "properties": {"priority": 100, "access": "allow", "direction": "inbound", "destinationportrange": "22", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"apiversion": "2019-11-01", "type": "microsoft.network/virtualnetworks", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[variables('nsgid')]"], "properties": {"addressspace": {"addressprefixes": ["[parameters('virtualnetworkaddressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetaddressprefix')]", "networksecuritygroup": {"id": "[variables('nsgid')]"}, "privateendpointnetworkpolicies": "disabled", "privatelinkservicenetworkpolicies": "enabled"}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/networkinterfaces", "name": "[variables('nicname')]", "location": "[parameters('location')]", "dependson": ["[variables('publicipid')]", "[variables('vnetid')]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('publicipaddressname'))]"}, "subnet": {"id": "[variables('subnetid')]"}}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/privateendpoints", "apiversion": "2020-07-01", "name": "[parameters('filestorageaccountprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('filestorageaccountid')]", "[variables('fileshareid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('filestorageaccountprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('filestorageaccountid')]", "groupids": ["[variables('filestorageaccountprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}}}{"type": "microsoft.network/privateendpoints/privatednszonegroups", "apiversion": "2020-06-01", "name": "[variables('fileprivatednszonegroup')]", "location": "[parameters('location')]", "dependson": ["[variables('fileprivatednszoneid')]", "[variables('filestorageaccountprivateendpointid')]"], "properties": {"privatednszoneconfigs": [{"name": "dnsconfig", "properties": {"privatednszoneid": "[variables('fileprivatednszoneid')]"}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[concat(tolower(parameters('vmname')), uniquestring(resourcegroup().id))]"}}}{"apiversion": "2019-08-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('nsgname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allowsshinbound", "properties": {"priority": 100, "access": "allow", "direction": "inbound", "destinationportrange": "22", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"apiversion": "2019-11-01", "type": "microsoft.network/virtualnetworks", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[variables('nsgid')]"], "properties": {"addressspace": {"addressprefixes": ["[parameters('virtualnetworkaddressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetaddressprefix')]", "networksecuritygroup": {"id": "[variables('nsgid')]"}, "privateendpointnetworkpolicies": "disabled", "privatelinkservicenetworkpolicies": "enabled"}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/networkinterfaces", "name": "[variables('nicname')]", "location": "[parameters('location')]", "dependson": ["[variables('publicipid')]", "[variables('vnetid')]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('publicipaddressname'))]"}, "subnet": {"id": "[variables('subnetid')]"}}}]}}{"type": "microsoft.network/privatednszones", "apiversion": "2020-06-01", "name": "[variables('fileprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/privateendpoints", "apiversion": "2020-07-01", "name": "[parameters('filestorageaccountprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('filestorageaccountid')]", "[variables('fileshareid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('filestorageaccountprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('filestorageaccountid')]", "groupids": ["[variables('filestorageaccountprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}}}{"type": "microsoft.network/privateendpoints/privatednszonegroups", "apiversion": "2020-06-01", "name": "[variables('fileprivatednszonegroup')]", "location": "[parameters('location')]", "dependson": ["[variables('fileprivatednszoneid')]", "[variables('filestorageaccountprivateendpointid')]"], "properties": {"privatednszoneconfigs": [{"name": "dnsconfig", "properties": {"privatednszoneid": "[variables('fileprivatednszoneid')]"}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[concat(tolower(parameters('vmname')), uniquestring(resourcegroup().id))]"}}}{"apiversion": "2019-08-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('nsgname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allowsshinbound", "properties": {"priority": 100, "access": "allow", "direction": "inbound", "destinationportrange": "22", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"apiversion": "2019-11-01", "type": "microsoft.network/virtualnetworks", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[variables('nsgid')]"], "properties": {"addressspace": {"addressprefixes": ["[parameters('virtualnetworkaddressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetaddressprefix')]", "networksecuritygroup": {"id": "[variables('nsgid')]"}, "privateendpointnetworkpolicies": "disabled", "privatelinkservicenetworkpolicies": "enabled"}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/networkinterfaces", "name": "[variables('nicname')]", "location": "[parameters('location')]", "dependson": ["[variables('publicipid')]", "[variables('vnetid')]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('publicipaddressname'))]"}, "subnet": {"id": "[variables('subnetid')]"}}}]}}{"type": "microsoft.network/privatednszones", "apiversion": "2020-06-01", "name": "[variables('fileprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones", "apiversion": "2020-06-01", "name": "[variables('blobprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/privateendpoints", "apiversion": "2020-07-01", "name": "[parameters('filestorageaccountprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('filestorageaccountid')]", "[variables('fileshareid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('filestorageaccountprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('filestorageaccountid')]", "groupids": ["[variables('filestorageaccountprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}}}{"type": "microsoft.network/privateendpoints/privatednszonegroups", "apiversion": "2020-06-01", "name": "[variables('fileprivatednszonegroup')]", "location": "[parameters('location')]", "dependson": ["[variables('fileprivatednszoneid')]", "[variables('filestorageaccountprivateendpointid')]"], "properties": {"privatednszoneconfigs": [{"name": "dnsconfig", "properties": {"privatednszoneid": "[variables('fileprivatednszoneid')]"}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[concat(tolower(parameters('vmname')), uniquestring(resourcegroup().id))]"}}}{"apiversion": "2019-08-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('nsgname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allowsshinbound", "properties": {"priority": 100, "access": "allow", "direction": "inbound", "destinationportrange": "22", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"apiversion": "2019-11-01", "type": "microsoft.network/virtualnetworks", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[variables('nsgid')]"], "properties": {"addressspace": {"addressprefixes": ["[parameters('virtualnetworkaddressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetaddressprefix')]", "networksecuritygroup": {"id": "[variables('nsgid')]"}, "privateendpointnetworkpolicies": "disabled", "privatelinkservicenetworkpolicies": "enabled"}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/networkinterfaces", "name": "[variables('nicname')]", "location": "[parameters('location')]", "dependson": ["[variables('publicipid')]", "[variables('vnetid')]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('publicipaddressname'))]"}, "subnet": {"id": "[variables('subnetid')]"}}}]}}{"type": "microsoft.network/privatednszones", "apiversion": "2020-06-01", "name": "[variables('fileprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones", "apiversion": "2020-06-01", "name": "[variables('blobprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2020-06-01", "name": "[concat(variables('fileprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('fileprivatednszoneid')]", "[variables('vnetid')]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[variables('vnetid')]"}}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/privateendpoints", "apiversion": "2020-07-01", "name": "[parameters('filestorageaccountprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('filestorageaccountid')]", "[variables('fileshareid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('filestorageaccountprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('filestorageaccountid')]", "groupids": ["[variables('filestorageaccountprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}}}{"type": "microsoft.network/privateendpoints/privatednszonegroups", "apiversion": "2020-06-01", "name": "[variables('fileprivatednszonegroup')]", "location": "[parameters('location')]", "dependson": ["[variables('fileprivatednszoneid')]", "[variables('filestorageaccountprivateendpointid')]"], "properties": {"privatednszoneconfigs": [{"name": "dnsconfig", "properties": {"privatednszoneid": "[variables('fileprivatednszoneid')]"}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[concat(tolower(parameters('vmname')), uniquestring(resourcegroup().id))]"}}}{"apiversion": "2019-08-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('nsgname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allowsshinbound", "properties": {"priority": 100, "access": "allow", "direction": "inbound", "destinationportrange": "22", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"apiversion": "2019-11-01", "type": "microsoft.network/virtualnetworks", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[variables('nsgid')]"], "properties": {"addressspace": {"addressprefixes": ["[parameters('virtualnetworkaddressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetaddressprefix')]", "networksecuritygroup": {"id": "[variables('nsgid')]"}, "privateendpointnetworkpolicies": "disabled", "privatelinkservicenetworkpolicies": "enabled"}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/networkinterfaces", "name": "[variables('nicname')]", "location": "[parameters('location')]", "dependson": ["[variables('publicipid')]", "[variables('vnetid')]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('publicipaddressname'))]"}, "subnet": {"id": "[variables('subnetid')]"}}}]}}{"type": "microsoft.network/privatednszones", "apiversion": "2020-06-01", "name": "[variables('fileprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones", "apiversion": "2020-06-01", "name": "[variables('blobprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2020-06-01", "name": "[concat(variables('fileprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('fileprivatednszoneid')]", "[variables('vnetid')]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[variables('vnetid')]"}}}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2020-06-01", "name": "[concat(variables('blobprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('blobprivatednszoneid')]", "[variables('vnetid')]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[variables('vnetid')]"}}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/privateendpoints", "apiversion": "2020-07-01", "name": "[parameters('filestorageaccountprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('filestorageaccountid')]", "[variables('fileshareid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('filestorageaccountprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('filestorageaccountid')]", "groupids": ["[variables('filestorageaccountprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}}}{"type": "microsoft.network/privateendpoints/privatednszonegroups", "apiversion": "2020-06-01", "name": "[variables('fileprivatednszonegroup')]", "location": "[parameters('location')]", "dependson": ["[variables('fileprivatednszoneid')]", "[variables('filestorageaccountprivateendpointid')]"], "properties": {"privatednszoneconfigs": [{"name": "dnsconfig", "properties": {"privatednszoneid": "[variables('fileprivatednszoneid')]"}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[concat(tolower(parameters('vmname')), uniquestring(resourcegroup().id))]"}}}{"apiversion": "2019-08-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('nsgname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allowsshinbound", "properties": {"priority": 100, "access": "allow", "direction": "inbound", "destinationportrange": "22", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"apiversion": "2019-11-01", "type": "microsoft.network/virtualnetworks", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[variables('nsgid')]"], "properties": {"addressspace": {"addressprefixes": ["[parameters('virtualnetworkaddressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetaddressprefix')]", "networksecuritygroup": {"id": "[variables('nsgid')]"}, "privateendpointnetworkpolicies": "disabled", "privatelinkservicenetworkpolicies": "enabled"}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/networkinterfaces", "name": "[variables('nicname')]", "location": "[parameters('location')]", "dependson": ["[variables('publicipid')]", "[variables('vnetid')]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('publicipaddressname'))]"}, "subnet": {"id": "[variables('subnetid')]"}}}]}}{"type": "microsoft.network/privatednszones", "apiversion": "2020-06-01", "name": "[variables('fileprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones", "apiversion": "2020-06-01", "name": "[variables('blobprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2020-06-01", "name": "[concat(variables('fileprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('fileprivatednszoneid')]", "[variables('vnetid')]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[variables('vnetid')]"}}}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2020-06-01", "name": "[concat(variables('blobprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('blobprivatednszoneid')]", "[variables('vnetid')]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[variables('vnetid')]"}}}{"type": "microsoft.network/privateendpoints", "apiversion": "2020-07-01", "name": "[parameters('blobstorageaccountprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetid')]", "[variables('blobstorageaccountid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('blobstorageaccountprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('blobstorageaccountid')]", "groupids": ["[variables('blobstorageaccountprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/privateendpoints", "apiversion": "2020-07-01", "name": "[parameters('filestorageaccountprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('filestorageaccountid')]", "[variables('fileshareid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('filestorageaccountprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('filestorageaccountid')]", "groupids": ["[variables('filestorageaccountprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}}}{"type": "microsoft.network/privateendpoints/privatednszonegroups", "apiversion": "2020-06-01", "name": "[variables('fileprivatednszonegroup')]", "location": "[parameters('location')]", "dependson": ["[variables('fileprivatednszoneid')]", "[variables('filestorageaccountprivateendpointid')]"], "properties": {"privatednszoneconfigs": [{"name": "dnsconfig", "properties": {"privatednszoneid": "[variables('fileprivatednszoneid')]"}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[concat(tolower(parameters('vmname')), uniquestring(resourcegroup().id))]"}}}{"apiversion": "2019-08-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('nsgname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allowsshinbound", "properties": {"priority": 100, "access": "allow", "direction": "inbound", "destinationportrange": "22", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"apiversion": "2019-11-01", "type": "microsoft.network/virtualnetworks", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[variables('nsgid')]"], "properties": {"addressspace": {"addressprefixes": ["[parameters('virtualnetworkaddressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetaddressprefix')]", "networksecuritygroup": {"id": "[variables('nsgid')]"}, "privateendpointnetworkpolicies": "disabled", "privatelinkservicenetworkpolicies": "enabled"}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/networkinterfaces", "name": "[variables('nicname')]", "location": "[parameters('location')]", "dependson": ["[variables('publicipid')]", "[variables('vnetid')]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('publicipaddressname'))]"}, "subnet": {"id": "[variables('subnetid')]"}}}]}}{"type": "microsoft.network/privatednszones", "apiversion": "2020-06-01", "name": "[variables('fileprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones", "apiversion": "2020-06-01", "name": "[variables('blobprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2020-06-01", "name": "[concat(variables('fileprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('fileprivatednszoneid')]", "[variables('vnetid')]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[variables('vnetid')]"}}}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2020-06-01", "name": "[concat(variables('blobprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('blobprivatednszoneid')]", "[variables('vnetid')]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[variables('vnetid')]"}}}{"type": "microsoft.network/privateendpoints", "apiversion": "2020-07-01", "name": "[parameters('blobstorageaccountprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetid')]", "[variables('blobstorageaccountid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('blobstorageaccountprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('blobstorageaccountid')]", "groupids": ["[variables('blobstorageaccountprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}}}{"type": "microsoft.network/privateendpoints/privatednszonegroups", "apiversion": "2020-06-01", "name": "[variables('blobprivatednszonegroup')]", "location": "[parameters('location')]", "dependson": ["[variables('blobprivatednszoneid')]", "[variables('blobstorageaccountprivateendpointid')]"], "properties": {"privatednszoneconfigs": [{"name": "dnsconfig", "properties": {"privatednszoneid": "[variables('blobprivatednszoneid')]"}}]}}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"type": "microsoft.storage/storageaccounts", "apiversion": "2021-04-01", "name": "[parameters('storageaccountname')]", "location": "[parameters('location')]", "kind": "storagev2", "sku": {"name": "[parameters('storagesku')]"}}
This template uses Azure Managed Identity to assign access to Azure Maps. See more at https://aka.ms/amauth
{"type": "microsoft.authorization/roleassignments", "apiversion": "2020-04-01-preview", "scope": "[format('microsoft.storage/storageaccounts/{0}", parameters('storageaccountname'))]", "name": "[guid(resourcegroup().id, resourceid('microsoft.managedidentity/userassignedidentities", "deploymentscript'), subscriptionresourceid('microsoft.authorization/roledefinitions", "17d1049b-9a84-46fb-8f53-869881c3d3ab'))]", "properties": {"roledefinitionid": "[subscriptionresourceid('microsoft.authorization/roledefinitions", "17d1049b-9a84-46fb-8f53-869881c3d3ab')]", "principalid": "[reference(resourceid('microsoft.managedidentity/userassignedidentities", "deploymentscript')).principalid]", "principaltype": "serviceprincipal"}, "dependson": ["[resourceid('microsoft.managedidentity/userassignedidentities", "deploymentscript')]", "[resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname'))]"]}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"type": "microsoft.resources/deploymentscripts", "apiversion": "2020-10-01", "name": "deploymentscript", "location": "[parameters('location')]", "kind": "azurepowershell", "identity": {"type": "userassigned", "userassignedidentities": {"[resourceid('microsoft.managedidentity/userassignedidentities", "deploymentscript')]": {}}}, "properties": {"azpowershellversion": "3.0", "scriptcontent": "$erroractionpreference = "stop"\n$storageaccount = get-azstorageaccount -resourcegroupname $env:resourcegroupname -accountname $env:storageaccountname\n\n# enable the static website feature on the storage account.\n$ctx = $storageaccount.context\nenable-azstoragestaticwebsite -context $ctx -indexdocument $env:indexdocumentpath -errordocument404path $env:errordocument404path\n\n# add the two html pages.\n$tempindexfile = new-temporaryfile\nset-content $tempindexfile $env:indexdocumentcontents -force\nset-azstorageblobcontent -context $ctx -container "$web" -file $tempindexfile -blob $env:indexdocumentpath -properties @{"contenttype" = "text/html"} -force\n\n$temperrordocument404file = new-temporaryfile\nset-content $temperrordocument404file $env:errordocument404contents -force\nset-azstorageblobcontent -context $ctx -container "$web" -file $temperrordocument404file -blob $env:errordocument404path -properties @{"contenttype" = "text/html"} -force\n", "retentioninterval": "pt4h", "environmentvariables": [{"name": "resourcegroupname", "value": "[resourcegroup().name]"}, {"name": "storageaccountname", "value": "[parameters('storageaccountname')]"}, {"name": "indexdocumentpath", "value": "[parameters('indexdocumentpath')]"}, {"name": "indexdocumentcontents", "value": "[parameters('indexdocumentcontents')]"}, {"name": "errordocument404path", "value": "[parameters('errordocument404path')]"}, {"name": "errordocument404contents", "value": "[parameters('errordocument404contents')]"}]}, "dependson": ["[resourceid('microsoft.managedidentity/userassignedidentities", "deploymentscript')]", "[extensionresourceid(resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname')), "microsoft.authorization/roleassignments", guid(resourcegroup().id, resourceid('microsoft.managedidentity/userassignedidentities", "deploymentscript'), subscriptionresourceid('microsoft.authorization/roledefinitions", "17d1049b-9a84-46fb-8f53-869881c3d3ab')))]", "[resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname'))]"]}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"type": "microsoft.storage/storageaccounts", "apiversion": "2021-04-01", "name": "[parameters('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('storageaccountreplication')]"}, "kind": "storagev2", "properties": {}}
Create an Azure Security Center Automation which will be triggered by specific Security Center Alert (including all severities)
{"condition": "[parameters('advancedthreatprotectionenabled')]", "type": "microsoft.security/advancedthreatprotectionsettings", "apiversion": "2019-01-01", "scope": "[format('microsoft.storage/storageaccounts/{0}", parameters('storageaccountname'))]", "name": "current", "properties": {"isenabled": true}, "dependson": ["[resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname'))]"]}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[variables('adlsstorageaccountprivateendpointid')]", "[variables('blobstorageaccountprivateendpointid')]", "[variables('nicid')]"], "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": "[parameters('imagepublisher')]", "offer": "[parameters('imageoffer')]", "sku": "[parameters('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage", "disksizegb": "[parameters('osdisksize')]", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}, "copy": [{"name": "datadisks", "count": "[parameters('numdatadisks')]", "input": {"caching": "[parameters('datadiskcaching')]", "disksizegb": "[parameters('datadisksize')]", "lun": "[copyindex('datadisks')]", "name": "[concat(parameters('vmname'),"-datadisk",copyindex('datadisks'))]", "createoption": "empty", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('blobstorageaccountid')).primaryendpoints["blob"]]"}}}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[variables('adlsstorageaccountprivateendpointid')]", "[variables('blobstorageaccountprivateendpointid')]", "[variables('nicid')]"], "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": "[parameters('imagepublisher')]", "offer": "[parameters('imageoffer')]", "sku": "[parameters('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage", "disksizegb": "[parameters('osdisksize')]", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}, "copy": [{"name": "datadisks", "count": "[parameters('numdatadisks')]", "input": {"caching": "[parameters('datadiskcaching')]", "disksizegb": "[parameters('datadisksize')]", "lun": "[copyindex('datadisks')]", "name": "[concat(parameters('vmname'),"-datadisk",copyindex('datadisks'))]", "createoption": "empty", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('blobstorageaccountid')).primaryendpoints["blob"]]"}}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'), "/customscript')]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"skipdos2unix": false, "timestamp": 123456789, "fileuris": ["[variables('scriptfileuri')]"]}, "protectedsettings": {"commandtoexecute": "[concat('bash ", parameters('scriptfilename'), " ", variables('adlsserviceprimaryendpoint'), " ", variables('blobserviceprimaryendpoint'))]"}}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[variables('adlsstorageaccountprivateendpointid')]", "[variables('blobstorageaccountprivateendpointid')]", "[variables('nicid')]"], "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": "[parameters('imagepublisher')]", "offer": "[parameters('imageoffer')]", "sku": "[parameters('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage", "disksizegb": "[parameters('osdisksize')]", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}, "copy": [{"name": "datadisks", "count": "[parameters('numdatadisks')]", "input": {"caching": "[parameters('datadiskcaching')]", "disksizegb": "[parameters('datadisksize')]", "lun": "[copyindex('datadisks')]", "name": "[concat(parameters('vmname'),"-datadisk",copyindex('datadisks'))]", "createoption": "empty", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('blobstorageaccountid')).primaryendpoints["blob"]]"}}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'), "/customscript')]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"skipdos2unix": false, "timestamp": 123456789, "fileuris": ["[variables('scriptfileuri')]"]}, "protectedsettings": {"commandtoexecute": "[concat('bash ", parameters('scriptfilename'), " ", variables('adlsserviceprimaryendpoint'), " ", variables('blobserviceprimaryendpoint'))]"}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'),"/loganalytics')]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]", "[variables('workspaceid')]", "[variables('customscriptid')]"], "properties": {"publisher": "microsoft.enterprisecloud.monitoring", "type": "omsagentforlinux", "typehandlerversion": "1.12", "settings": {"workspaceid": "[reference(variables('workspaceid'), "2020-03-01-preview').customerid]", "stoponmultipleconnections": false}, "protectedsettings": {"workspacekey": "[listkeys(variables('workspaceid'),"2020-03-01-preview').primarysharedkey]"}}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[variables('adlsstorageaccountprivateendpointid')]", "[variables('blobstorageaccountprivateendpointid')]", "[variables('nicid')]"], "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": "[parameters('imagepublisher')]", "offer": "[parameters('imageoffer')]", "sku": "[parameters('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage", "disksizegb": "[parameters('osdisksize')]", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}, "copy": [{"name": "datadisks", "count": "[parameters('numdatadisks')]", "input": {"caching": "[parameters('datadiskcaching')]", "disksizegb": "[parameters('datadisksize')]", "lun": "[copyindex('datadisks')]", "name": "[concat(parameters('vmname'),"-datadisk",copyindex('datadisks'))]", "createoption": "empty", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('blobstorageaccountid')).primaryendpoints["blob"]]"}}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'), "/customscript')]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"skipdos2unix": false, "timestamp": 123456789, "fileuris": ["[variables('scriptfileuri')]"]}, "protectedsettings": {"commandtoexecute": "[concat('bash ", parameters('scriptfilename'), " ", variables('adlsserviceprimaryendpoint'), " ", variables('blobserviceprimaryendpoint'))]"}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'),"/loganalytics')]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]", "[variables('workspaceid')]", "[variables('customscriptid')]"], "properties": {"publisher": "microsoft.enterprisecloud.monitoring", "type": "omsagentforlinux", "typehandlerversion": "1.12", "settings": {"workspaceid": "[reference(variables('workspaceid'), "2020-03-01-preview').customerid]", "stoponmultipleconnections": false}, "protectedsettings": {"workspacekey": "[listkeys(variables('workspaceid'),"2020-03-01-preview').primarysharedkey]"}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'),"/dependencyagent')]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]", "[variables('workspaceid')]", "[variables('customscriptid')]", "[variables('omsagentforlinuxid')]"], "properties": {"publisher": "microsoft.azure.monitoring.dependencyagent", "type": "dependencyagentlinux", "typehandlerversion": "9.10", "autoupgrademinorversion": true}}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"apiversion": "2019-06-01", "type": "microsoft.storage/storageaccounts", "name": "[parameters('adlsstorageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "standard_ragrs"}, "kind": "storagev2"}{"apiversion": "2019-06-01", "type": "microsoft.storage/storageaccounts", "name": "[parameters('blobstorageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storagev2"}
Create a VM from a Windows Image with 4 Empty Data Disks
{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[variables('adlsstorageaccountprivateendpointid')]", "[variables('blobstorageaccountprivateendpointid')]", "[variables('nicid')]"], "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": "[parameters('imagepublisher')]", "offer": "[parameters('imageoffer')]", "sku": "[parameters('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage", "disksizegb": "[parameters('osdisksize')]", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}, "copy": [{"name": "datadisks", "count": "[parameters('numdatadisks')]", "input": {"caching": "[parameters('datadiskcaching')]", "disksizegb": "[parameters('datadisksize')]", "lun": "[copyindex('datadisks')]", "name": "[concat(parameters('vmname'),"-datadisk",copyindex('datadisks'))]", "createoption": "empty", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('blobstorageaccountid')).primaryendpoints["blob"]]"}}}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[variables('adlsstorageaccountprivateendpointid')]", "[variables('blobstorageaccountprivateendpointid')]", "[variables('nicid')]"], "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": "[parameters('imagepublisher')]", "offer": "[parameters('imageoffer')]", "sku": "[parameters('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage", "disksizegb": "[parameters('osdisksize')]", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}, "copy": [{"name": "datadisks", "count": "[parameters('numdatadisks')]", "input": {"caching": "[parameters('datadiskcaching')]", "disksizegb": "[parameters('datadisksize')]", "lun": "[copyindex('datadisks')]", "name": "[concat(parameters('vmname'),"-datadisk",copyindex('datadisks'))]", "createoption": "empty", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('blobstorageaccountid')).primaryendpoints["blob"]]"}}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'), "/customscript')]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"skipdos2unix": false, "timestamp": 123456789, "fileuris": ["[variables('scriptfileuri')]"]}, "protectedsettings": {"commandtoexecute": "[concat('bash ", parameters('scriptfilename'), " ", variables('adlsserviceprimaryendpoint'), " ", variables('blobserviceprimaryendpoint'))]"}}}