Description
stringlengths
19
200
IaC
stringlengths
128
8.16k
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'))]"}}}{"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]"}}}
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'))]"}}}{"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}}
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('adlsprivatednszonename')]", "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}}
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('adlsprivatednszonename')]", "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('adlsprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('adlsprivatednszoneid')]", "[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('adlsprivatednszonename')]", "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('adlsprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('adlsprivatednszoneid')]", "[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('adlsprivatednszonename')]", "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('adlsprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('adlsprivatednszoneid')]", "[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('adlsstorageaccountprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetid')]", "[variables('adlsstorageaccountid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('adlsstorageaccountprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('adlsstorageaccountid')]", "groupids": ["[variables('adlsstorageaccountprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}, "customdnsconfigs": [{"fqdn": "[concat(parameters('adlsstorageaccountname'), variables('adlspublicdnszoneforwarder'))]"}]}}
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('adlsprivatednszonename')]", "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('adlsprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('adlsprivatednszoneid')]", "[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('adlsstorageaccountprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetid')]", "[variables('adlsstorageaccountid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('adlsstorageaccountprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('adlsstorageaccountid')]", "groupids": ["[variables('adlsstorageaccountprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}, "customdnsconfigs": [{"fqdn": "[concat(parameters('adlsstorageaccountname'), variables('adlspublicdnszoneforwarder'))]"}]}}{"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('adlsprivatednszonename')]", "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('adlsprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('adlsprivatednszoneid')]", "[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('adlsstorageaccountprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetid')]", "[variables('adlsstorageaccountid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('adlsstorageaccountprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('adlsstorageaccountid')]", "groupids": ["[variables('adlsstorageaccountprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}, "customdnsconfigs": [{"fqdn": "[concat(parameters('adlsstorageaccountname'), variables('adlspublicdnszoneforwarder'))]"}]}}{"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('adlsprivatednszonegroup')]", "location": "[parameters('location')]", "dependson": ["[variables('adlsprivatednszoneid')]", "[variables('adlsstorageaccountprivateendpointid')]"], "properties": {"privatednszoneconfigs": [{"name": "dnsconfig", "properties": {"privatednszoneid": "[variables('adlsprivatednszoneid')]"}}]}}
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('adlsprivatednszonename')]", "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('adlsprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('adlsprivatednszoneid')]", "[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('adlsstorageaccountprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetid')]", "[variables('adlsstorageaccountid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('adlsstorageaccountprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('adlsstorageaccountid')]", "groupids": ["[variables('adlsstorageaccountprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}, "customdnsconfigs": [{"fqdn": "[concat(parameters('adlsstorageaccountname'), variables('adlspublicdnszoneforwarder'))]"}]}}{"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('adlsprivatednszonegroup')]", "location": "[parameters('location')]", "dependson": ["[variables('adlsprivatednszoneid')]", "[variables('adlsstorageaccountprivateendpointid')]"], "properties": {"privatednszoneconfigs": [{"name": "dnsconfig", "properties": {"privatednszoneid": "[variables('adlsprivatednszoneid')]"}}]}}{"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')]"}}]}}
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": "fileshares", "count": "[length(range(0, parameters('sharecopy')))]"}, "type": "microsoft.storage/storageaccounts/fileservices/shares", "apiversion": "2021-04-01", "name": "[format('{0}/default/{1}{2}", parameters('storageaccountname'), parameters('shareprefix'), range(0, parameters('sharecopy'))[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-04-01", "name": "[parameters('storageaccountname')]", "location": "[parameters('location')]", "kind": "storagev2", "sku": {"name": "standard_lrs"}, "properties": {"accesstier": "hot"}}{"type": "microsoft.storage/storageaccounts/fileservices/shares", "apiversion": "2021-04-01", "name": "[format('{0}/default/{1}", parameters('storageaccountname'), parameters('filesharename'))]", "dependson": ["[resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname'))]"]}
This module creates a key resource in an existing KeyVault with apiVersion 2019-09-01.
{"type": "microsoft.keyvault/vaults", "apiversion": "2021-06-01-preview", "name": "[parameters('keyvaultname')]", "location": "[parameters('location')]", "properties": {"sku": {"name": "standard", "family": "a"}, "enablesoftdelete": true, "enablepurgeprotection": true, "enabledfordeployment": true, "enabledfordiskencryption": true, "enabledfortemplatedeployment": true, "tenantid": "[parameters('tenantid')]", "accesspolicies": [{"tenantid": "[parameters('tenantid')]", "permissions": {"keys": ["unwrapkey", "wrapkey", "get"]}, "objectid": "[reference(resourceid('microsoft.managedidentity/userassignedidentities", parameters('userassignedidentityname'))).principalid]"}]}, "dependson": ["[resourceid('microsoft.managedidentity/userassignedidentities", parameters('userassignedidentityname'))]"]}
This module creates a key resource in an existing KeyVault with apiVersion 2019-09-01.
{"type": "microsoft.keyvault/vaults", "apiversion": "2021-06-01-preview", "name": "[parameters('keyvaultname')]", "location": "[parameters('location')]", "properties": {"sku": {"name": "standard", "family": "a"}, "enablesoftdelete": true, "enablepurgeprotection": true, "enabledfordeployment": true, "enabledfordiskencryption": true, "enabledfortemplatedeployment": true, "tenantid": "[parameters('tenantid')]", "accesspolicies": [{"tenantid": "[parameters('tenantid')]", "permissions": {"keys": ["unwrapkey", "wrapkey", "get"]}, "objectid": "[reference(resourceid('microsoft.managedidentity/userassignedidentities", parameters('userassignedidentityname'))).principalid]"}]}, "dependson": ["[resourceid('microsoft.managedidentity/userassignedidentities", parameters('userassignedidentityname'))]"]}{"type": "microsoft.keyvault/vaults/keys", "apiversion": "2021-06-01-preview", "name": "[format('{0}/{1}", parameters('keyvaultname'), parameters('keyvaultkeyname'))]", "properties": {"attributes": {"enabled": true}, "keysize": 4096, "kty": "rsa"}, "dependson": ["[resourceid('microsoft.keyvault/vaults", parameters('keyvaultname'))]"]}
This module allows you to create a user-assigned managed identity and a role assignment scoped to the resource group.
{"type": "microsoft.managedidentity/userassignedidentities", "apiversion": "2018-11-30", "name": "[parameters('userassignedidentityname')]", "location": "[parameters('location')]"}
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": "standard_lrs"}, "kind": "storagev2", "identity": {"type": "userassigned", "userassignedidentities": {"[format('{0}", resourceid('microsoft.managedidentity/userassignedidentities", parameters('userassignedidentityname')))]": {}}}, "properties": {"accesstier": "hot", "supportshttpstrafficonly": true, "minimumtlsversion": "tls1_2", "encryption": {"identity": {"userassignedidentity": "[resourceid('microsoft.managedidentity/userassignedidentities", parameters('userassignedidentityname'))]"}, "services": {"blob": {"enabled": true}}, "keysource": "microsoft.keyvault", "keyvaultproperties": {"keyname": "[parameters('keyvaultkeyname')]", "keyvaulturi": "[if(endswith(reference(resourceid('microsoft.keyvault/vaults", parameters('keyvaultname'))).vaulturi, "/'), substring(reference(resourceid('microsoft.keyvault/vaults", parameters('keyvaultname'))).vaulturi, 0, sub(length(reference(resourceid('microsoft.keyvault/vaults", parameters('keyvaultname'))).vaulturi), 1)), reference(resourceid('microsoft.keyvault/vaults", parameters('keyvaultname'))).vaulturi)]"}}}, "dependson": ["[resourceid('microsoft.keyvault/vaults", parameters('keyvaultname'))]", "[resourceid('microsoft.keyvault/vaults/keys", parameters('keyvaultname'), parameters('keyvaultkeyname'))]", "[resourceid('microsoft.managedidentity/userassignedidentities", parameters('userassignedidentityname'))]"]}
Creates and optionally secures a Key Vault with logging linked to a storage account.
{"type": "microsoft.keyvault/vaults", "apiversion": "2021-06-01-preview", "name": "[parameters('keyvaultname')]", "location": "[parameters('location')]", "properties": {"sku": {"name": "standard", "family": "a"}, "enablesoftdelete": true, "enablepurgeprotection": true, "enabledfordeployment": true, "enabledfordiskencryption": true, "enabledfortemplatedeployment": true, "tenantid": "[parameters('tenantid')]", "accesspolicies": [{"tenantid": "[parameters('tenantid')]", "permissions": {"keys": ["unwrapkey", "wrapkey", "get"]}, "objectid": "[reference(resourceid('microsoft.managedidentity/userassignedidentities", parameters('userassignedidentityname'))).principalid]"}]}, "dependson": ["[resourceid('microsoft.managedidentity/userassignedidentities", parameters('userassignedidentityname'))]"]}
Creates and optionally secures a Key Vault with logging linked to a storage account.
{"type": "microsoft.keyvault/vaults", "apiversion": "2021-06-01-preview", "name": "[parameters('keyvaultname')]", "location": "[parameters('location')]", "properties": {"sku": {"name": "standard", "family": "a"}, "enablesoftdelete": true, "enablepurgeprotection": true, "enabledfordeployment": true, "enabledfordiskencryption": true, "enabledfortemplatedeployment": true, "tenantid": "[parameters('tenantid')]", "accesspolicies": [{"tenantid": "[parameters('tenantid')]", "permissions": {"keys": ["unwrapkey", "wrapkey", "get"]}, "objectid": "[reference(resourceid('microsoft.managedidentity/userassignedidentities", parameters('userassignedidentityname'))).principalid]"}]}, "dependson": ["[resourceid('microsoft.managedidentity/userassignedidentities", parameters('userassignedidentityname'))]"]}{"type": "microsoft.keyvault/vaults/keys", "apiversion": "2021-06-01-preview", "name": "[format('{0}/{1}", parameters('keyvaultname'), parameters('keyvaultkeyname'))]", "properties": {"attributes": {"enabled": true}, "keysize": 4096, "kty": "rsa"}, "dependson": ["[resourceid('microsoft.keyvault/vaults", parameters('keyvaultname'))]"]}
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('storagesku')]"}, "kind": "[parameters('storagekind')]", "properties": {"accesstier": "[parameters('storagetier')]", "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-04-01", "name": "[parameters('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('storagesku')]"}, "kind": "[parameters('storagekind')]", "properties": {"accesstier": "[parameters('storagetier')]", "encryption": {"keysource": "microsoft.storage", "services": {"blob": {"enabled": "[parameters('blobencryptionenabled')]"}}}}}{"type": "microsoft.storage/storageaccounts/blobservices", "apiversion": "2021-04-01", "name": "[format('{0}/{1}", parameters('storageaccountname'), "default')]", "properties": {"deleteretentionpolicy": {"enabled": true, "days": "[parameters('deleteretentionpolicy')]"}}, "dependson": ["[resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname'))]"]}
which shows how we can correlate messages over Logic Apps using Azure Service Bus
{"type": "microsoft.logic/workflows", "apiversion": "2019-05-01", "name": "[parameters('logicappname')]", "location": "[parameters('location')]", "properties": {"state": "enabled", "definition": {"$schema": "https://schema.management.azure.com/providers/microsoft.logic/schemas/2016-06-01/workflowdefinition.json#", "actions": {"switch": {"cases": {"createresource": {"actions": {"createcustomresource": {"inputs": {"body": {"properties": "@addproperty(triggerbody().body["properties"], "mydynamicproperty", "mydynamicvalue')"}, "statuscode": 200}, "kind": "http", "type": "response"}}, "case": "create"}}, "default": {"actions": {"defaulthttpresponse": {"inputs": {"statuscode": 200}, "kind": "http", "type": "response"}}}, "expression": "@triggerbody().operationtype", "type": "switch"}}, "contentversion": "1.0.0.0", "outputs": {}, "parameters": {}, "triggers": {"customproviderwebhook": {"inputs": {"schema": {"required": ["operationtype", "resourcetype", "resourceid", "resourcename", "body"], "properties": {"operationtype": {"$id": "#/properties/operationtype", "type": "string", "enum": ["create", "delete", "get", "list", "trigger"]}, "resourcetype": {"$id": "#/properties/resourcetype", "type": "string"}, "resourceid": {"$id": "#/properties/resourceid", "type": "string"}, "resourcename": {"$id": "#/properties/resourcename", "type": "string"}, "body": {"$id": "#/properties/body", "type": "object"}}}}, "kind": "http", "type": "request"}}}}}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"condition": "[parameters('deployfunction')]", "type": "microsoft.storage/storageaccounts", "apiversion": "2021-01-01", "name": "[parameters('storageaccountname')]", "location": "[parameters('location')]", "kind": "storagev2", "sku": {"name": "standard_lrs"}}
Application Gateway routing Internet traffic to a virtual network (internal mode) API Management instance which services a web API hosted in an Azure Web App.
{"condition": "[parameters('deployfunction')]", "type": "microsoft.web/sites", "apiversion": "2018-11-01", "name": "[parameters('funcname')]", "location": "[parameters('location')]", "kind": "functionapp", "dependson": ["[resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname'))]"], "properties": {"name": "[parameters('funcname')]", "siteconfig": {"appsettings": [{"name": "azurewebjobsdashboard", "value": "[concat('defaultendpointsprotocol=https;accountname=",parameters('storageaccountname'),";accountkey=",listkeys(resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname')), "2019-06-01').keys[0].value)]"}, {"name": "azurewebjobsstorage", "value": "[concat('defaultendpointsprotocol=https;accountname=",parameters('storageaccountname'),";accountkey=",listkeys(resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname')), "2019-06-01').keys[0].value)]"}, {"name": "azurewebjobssecretstoragetype", "value": "files"}, {"name": "functions_extension_version", "value": "~2"}, {"name": "website_contentazurefileconnectionstring", "value": "[concat('defaultendpointsprotocol=https;accountname=",parameters('storageaccountname'),";accountkey=",listkeys(resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname')), "2019-06-01').keys[0].value)]"}, {"name": "website_contentshare", "value": "[concat(tolower(parameters('funcname')), "b86e')]"}, {"name": "website_node_default_version", "value": "6.5.0"}, {"name": "website_run_from_package", "value": "[uri(parameters('_artifactslocation'), concat('artifacts/functionzip/functionpackage.zip", parameters('_artifactslocationsastoken')))]"}]}, "clientaffinityenabled": false, "reserved": false}}
Storage Account with Storage Service Encryption and a blob deletion retention policy
{"condition": "[parameters('deployfunction')]", "type": "microsoft.storage/storageaccounts", "apiversion": "2021-01-01", "name": "[parameters('storageaccountname')]", "location": "[parameters('location')]", "kind": "storagev2", "sku": {"name": "standard_lrs"}}
This module allows you to create a user-assigned managed identity and a role assignment scoped to the resource group.
{"type": "microsoft.managedidentity/userassignedidentities", "name": "[variables('identityname')]", "apiversion": "2018-11-30", "location": "[parameters('location')]"}
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", "name": "[variables('roledefinitionname')]", "dependson": ["[variables('identityname')]"], "properties": {"roledefinitionid": "[variables('roledefinitionid')]", "principalid": "[reference(variables('identityname')).principalid]", "scope": "[resourcegroup().id]", "principaltype": "serviceprincipal"}}
Create a PowerBI Workspace Collection in Azure.
{"type": "microsoft.powerbidedicated/capacities", "apiversion": "2018-09-01-preview", "name": "[parameters('name')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('sku')]"}, "properties": {"administration": {"members": ["[parameters('admin')]"]}}}
This template creates an IoT hub and an IoT Hub Device Provisioning Service, and link the two services together.
{"type": "microsoft.devices/iothubs", "apiversion": "2021-03-31", "name": "[parameters('iothubname')]", "location": "[parameters('location')]", "sku": {"name": "s1", "capacity": 1}, "properties": {"authorizationpolicies": [{"keyname": "iothubowner", "rights": "registrywrite, serviceconnect, deviceconnect"}, {"keyname": "service", "rights": "serviceconnect"}, {"keyname": "device", "rights": "deviceconnect"}, {"keyname": "registryread", "rights": "registryread"}, {"keyname": "registryreadwrite", "rights": "registrywrite"}, {"keyname": "deviceupdateservice", "rights": "registryread, serviceconnect, deviceconnect"}], "cloudtodevice": {"maxdeliverycount": 10, "defaultttlasiso8601": "pt1h", "feedback": {"lockdurationasiso8601": "pt1m", "ttlasiso8601": "pt1h", "maxdeliverycount": 10}}, "enablefileuploadnotifications": false, "eventhubendpoints": {"events": {"retentiontimeindays": 1, "partitioncount": 4}}, "features": "none", "messagingendpoints": {"filenotifications": {"lockdurationasiso8601": "pt1m", "ttlasiso8601": "pt1h", "maxdeliverycount": 10}}, "routing": {"routes": [{"name": "deviceupdate.devicetwinchanges", "source": "twinchangeevents", "condition": "(optype = "updatetwin" or optype = "replacetwin') and is_defined($body.tags.adugroup)", "endpointnames": ["events"], "isenabled": true}, {"name": "deviceupdate.digitaltwinchanges", "source": "digitaltwinchangeevents", "condition": "true", "endpointnames": ["events"], "isenabled": true}, {"name": "deviceupdate.devicelifecycle", "source": "devicelifecycleevents", "condition": "optype = "deletedeviceidentity" or optype = "deletemoduleidentity"", "endpointnames": ["events"], "isenabled": true}], "fallbackroute": {"name": "$fallback", "source": "devicemessages", "condition": "true", "endpointnames": ["events"], "isenabled": true}}}}{"type": "microsoft.devices/iothubs/eventhubendpoints/consumergroups", "apiversion": "2021-03-31", "name": "[format('{0}/events/{1}", parameters('iothubname'), variables('consumergroupname'))]", "properties": {"name": "[variables('consumergroupname')]"}, "dependson": ["[resourceid('microsoft.devices/iothubs", parameters('iothubname'))]"]}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"comments": "this storage account is used to associate to a batch account", "type": "microsoft.storage/storageaccounts", "apiversion": "2019-06-01", "name": "[variables('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('storageaccountsku')]"}, "kind": "storagev2", "tags": {"objectname": "[variables('storageaccountname')]"}, "properties": {}}
Storage Account with Storage Service Encryption and a blob deletion retention policy
{"comments": "this storage account is used to associate to a batch account", "type": "microsoft.storage/storageaccounts", "apiversion": "2019-06-01", "name": "[variables('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('storageaccountsku')]"}, "kind": "storagev2", "tags": {"objectname": "[variables('storageaccountname')]"}, "properties": {}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"type": "microsoft.resources/deployments", "apiversion": "2019-09-01", "name": "addaccesspolicy", "resourcegroup": "[parameters('keyvaultresourcegroupname')]", "dependson": ["[resourceid('microsoft.datalakestore/accounts", parameters('datalakestorename'))]"], "properties": {"mode": "incremental", "template": {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymenttemplate.json#", "contentversion": "0.9.0.0", "resources": [{"type": "microsoft.keyvault/vaults/accesspolicies", "name": "[concat(parameters('keyvaultname'), "/add')]", "apiversion": "2019-09-01", "properties": {"accesspolicies": [{"objectid": "[reference(resourceid('microsoft.datalakestore/accounts", parameters('datalakestorename')), "2016-11-01", "full').identity.principalid]", "tenantid": "[reference(resourceid('microsoft.datalakestore/accounts", parameters('datalakestorename')), "2016-11-01", "full').identity.tenantid]", "permissions": {"keys": ["encrypt", "decrypt"]}}]}}]}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"type": "microsoft.resources/deployments", "apiversion": "2019-09-01", "name": "addaccesspolicy", "resourcegroup": "[parameters('keyvaultresourcegroupname')]", "dependson": ["[resourceid('microsoft.datalakestore/accounts", parameters('datalakestorename'))]"], "properties": {"mode": "incremental", "template": {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymenttemplate.json#", "contentversion": "0.9.0.0", "resources": [{"type": "microsoft.keyvault/vaults/accesspolicies", "name": "[concat(parameters('keyvaultname'), "/add')]", "apiversion": "2019-09-01", "properties": {"accesspolicies": [{"objectid": "[reference(resourceid('microsoft.datalakestore/accounts", parameters('datalakestorename')), "2016-11-01", "full').identity.principalid]", "tenantid": "[reference(resourceid('microsoft.datalakestore/accounts", parameters('datalakestorename')), "2016-11-01", "full').identity.tenantid]", "permissions": {"keys": ["encrypt", "decrypt"]}}]}}]}}}{"type": "microsoft.resources/deployments", "apiversion": "2019-09-01", "name": "updateadlsaccount", "dependson": ["addaccesspolicy"], "properties": {"mode": "incremental", "template": {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymenttemplate.json#", "contentversion": "0.9.0.0", "resources": [{"apiversion": "2016-11-01", "name": "[parameters('datalakestorename')]", "location": "[parameters('location')]", "type": "microsoft.datalakestore/accounts", "properties": {"encryptionconfig": {"keyvaultmetainfo": {"keyvaultresourceid": "[resourceid(parameters('keyvaultresourcegroupname'), "microsoft.keyvault/vaults", parameters('keyvaultname'))]", "encryptionkeyname": "[parameters('keyname')]", "encryptionkeyversion": "[parameters('keyversion')]"}}}, "identity": {"type": "systemassigned"}}]}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"type": "microsoft.resources/deployments", "name": "storageaccount", "apiversion": "2021-01-01", "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'),concat('nested/storageaccount.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"storageaccountname": {"value": "[variables('storageaccountname')]"}, "storageaccounttype": {"value": "[variables('storageaccounttype')]"}, "location": {"value": "[parameters('location')]"}}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"type": "microsoft.resources/deployments", "name": "storageaccount", "apiversion": "2021-01-01", "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'),concat('nested/storageaccount.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"storageaccountname": {"value": "[variables('storageaccountname')]"}, "storageaccounttype": {"value": "[variables('storageaccounttype')]"}, "location": {"value": "[parameters('location')]"}}}}{"type": "microsoft.resources/deployments", "name": "datafactory", "apiversion": "2021-01-01", "dependson": ["kibanaesdeployedvm"], "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'),concat('nested/datafactory.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"kibanaesdeployedvmip": {"value": "[reference('kibanaesdeployedvm').outputs.publicipaddress.value]"}, "storageaccountname": {"value": "[variables('storageaccountname')]"}, "_artifactslocation": {"value": "[variables('artloc')]"}, "_artifactslocationsastoken": {"value": "[parameters('_artifactslocationsastoken')]"}, "datafactoryname": {"value": "[parameters('datafactoryname')]"}, "datafactorylocation": {"value": "[parameters('location')]"}, "blobcontainer": {"value": "[variables('blobcontainer')]"}, "serviceprincipalid": {"value": "[parameters('serviceprincipalid')]"}, "serviceprincipalkey": {"value": "[parameters('serviceprincipalkey')]"}}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"type": "microsoft.resources/deployments", "name": "storageaccount", "apiversion": "2021-01-01", "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'),concat('nested/storageaccount.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"storageaccountname": {"value": "[variables('storageaccountname')]"}, "storageaccounttype": {"value": "[variables('storageaccounttype')]"}, "location": {"value": "[parameters('location')]"}}}}{"type": "microsoft.resources/deployments", "name": "datafactory", "apiversion": "2021-01-01", "dependson": ["kibanaesdeployedvm"], "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'),concat('nested/datafactory.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"kibanaesdeployedvmip": {"value": "[reference('kibanaesdeployedvm').outputs.publicipaddress.value]"}, "storageaccountname": {"value": "[variables('storageaccountname')]"}, "_artifactslocation": {"value": "[variables('artloc')]"}, "_artifactslocationsastoken": {"value": "[parameters('_artifactslocationsastoken')]"}, "datafactoryname": {"value": "[parameters('datafactoryname')]"}, "datafactorylocation": {"value": "[parameters('location')]"}, "blobcontainer": {"value": "[variables('blobcontainer')]"}, "serviceprincipalid": {"value": "[parameters('serviceprincipalid')]"}, "serviceprincipalkey": {"value": "[parameters('serviceprincipalkey')]"}}}}{"type": "microsoft.resources/deployments", "name": "datalakeanalytics", "apiversion": "2021-01-01", "dependson": ["storageaccount"], "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'),concat('nested/datalakeanalytics.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"adlanalyticsname": {"value": "[parameters('adlanalyticsname')]"}, "adlstorename": {"value": "[parameters('adlstorename')]"}, "storageaccountname": {"value": "[variables('storageaccountname')]"}, "datalakeanalyticslocation": {"value": "[parameters('datalakeanalyticslocation')]"}}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"type": "microsoft.resources/deployments", "name": "storageaccount", "apiversion": "2021-01-01", "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'),concat('nested/storageaccount.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"storageaccountname": {"value": "[variables('storageaccountname')]"}, "storageaccounttype": {"value": "[variables('storageaccounttype')]"}, "location": {"value": "[parameters('location')]"}}}}{"type": "microsoft.resources/deployments", "name": "datafactory", "apiversion": "2021-01-01", "dependson": ["kibanaesdeployedvm"], "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'),concat('nested/datafactory.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"kibanaesdeployedvmip": {"value": "[reference('kibanaesdeployedvm').outputs.publicipaddress.value]"}, "storageaccountname": {"value": "[variables('storageaccountname')]"}, "_artifactslocation": {"value": "[variables('artloc')]"}, "_artifactslocationsastoken": {"value": "[parameters('_artifactslocationsastoken')]"}, "datafactoryname": {"value": "[parameters('datafactoryname')]"}, "datafactorylocation": {"value": "[parameters('location')]"}, "blobcontainer": {"value": "[variables('blobcontainer')]"}, "serviceprincipalid": {"value": "[parameters('serviceprincipalid')]"}, "serviceprincipalkey": {"value": "[parameters('serviceprincipalkey')]"}}}}{"type": "microsoft.resources/deployments", "name": "datalakeanalytics", "apiversion": "2021-01-01", "dependson": ["storageaccount"], "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'),concat('nested/datalakeanalytics.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"adlanalyticsname": {"value": "[parameters('adlanalyticsname')]"}, "adlstorename": {"value": "[parameters('adlstorename')]"}, "storageaccountname": {"value": "[variables('storageaccountname')]"}, "datalakeanalyticslocation": {"value": "[parameters('datalakeanalyticslocation')]"}}}}{"type": "microsoft.resources/deployments", "name": "eventhubtemplate", "apiversion": "2021-01-01", "dependson": ["datalakeanalytics"], "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'),concat('nested/eventhub.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"eventhubnamespacename": {"value": "[parameters('eventhubnamespacename')]"}, "location": {"value": "[parameters('location')]"}, "eventhubsku": {"value": "[parameters('eventhubsku')]"}, "skucapacity": {"value": "[parameters('skucapacity')]"}, "isautoinflateenabled": {"value": "[parameters('isautoinflateenabled')]"}, "maximumthroughputunits": {"value": "[variables('maximumthroughputunits')]"}, "datacleaninginputstream": {"value": "[variables('datacleaninginputstream')]"}, "datacleaningoutputstream": {"value": "[variables('datacleaningoutputstream')]"}, "messageretentionindays": {"value": "[parameters('messageretentionindays')]"}, "partitioncount": {"value": "[parameters('partitioncount')]"}, "captureencodingformat": {"value": "[parameters('captureencodingformat')]"}, "capturetime": {"value": "[parameters('capturetime')]"}, "capturesize": {"value": "[parameters('capturesize')]"}, "storageaccountname": {"value": "[variables('storageaccountname')]"}, "capturenameformat": {"value": "[variables('capturenameformat')]"}}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"type": "microsoft.resources/deployments", "name": "storageaccount", "apiversion": "2021-01-01", "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'),concat('nested/storageaccount.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"storageaccountname": {"value": "[variables('storageaccountname')]"}, "storageaccounttype": {"value": "[variables('storageaccounttype')]"}, "location": {"value": "[parameters('location')]"}}}}{"type": "microsoft.resources/deployments", "name": "datafactory", "apiversion": "2021-01-01", "dependson": ["kibanaesdeployedvm"], "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'),concat('nested/datafactory.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"kibanaesdeployedvmip": {"value": "[reference('kibanaesdeployedvm').outputs.publicipaddress.value]"}, "storageaccountname": {"value": "[variables('storageaccountname')]"}, "_artifactslocation": {"value": "[variables('artloc')]"}, "_artifactslocationsastoken": {"value": "[parameters('_artifactslocationsastoken')]"}, "datafactoryname": {"value": "[parameters('datafactoryname')]"}, "datafactorylocation": {"value": "[parameters('location')]"}, "blobcontainer": {"value": "[variables('blobcontainer')]"}, "serviceprincipalid": {"value": "[parameters('serviceprincipalid')]"}, "serviceprincipalkey": {"value": "[parameters('serviceprincipalkey')]"}}}}{"type": "microsoft.resources/deployments", "name": "datalakeanalytics", "apiversion": "2021-01-01", "dependson": ["storageaccount"], "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'),concat('nested/datalakeanalytics.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"adlanalyticsname": {"value": "[parameters('adlanalyticsname')]"}, "adlstorename": {"value": "[parameters('adlstorename')]"}, "storageaccountname": {"value": "[variables('storageaccountname')]"}, "datalakeanalyticslocation": {"value": "[parameters('datalakeanalyticslocation')]"}}}}{"type": "microsoft.resources/deployments", "name": "eventhubtemplate", "apiversion": "2021-01-01", "dependson": ["datalakeanalytics"], "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'),concat('nested/eventhub.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"eventhubnamespacename": {"value": "[parameters('eventhubnamespacename')]"}, "location": {"value": "[parameters('location')]"}, "eventhubsku": {"value": "[parameters('eventhubsku')]"}, "skucapacity": {"value": "[parameters('skucapacity')]"}, "isautoinflateenabled": {"value": "[parameters('isautoinflateenabled')]"}, "maximumthroughputunits": {"value": "[variables('maximumthroughputunits')]"}, "datacleaninginputstream": {"value": "[variables('datacleaninginputstream')]"}, "datacleaningoutputstream": {"value": "[variables('datacleaningoutputstream')]"}, "messageretentionindays": {"value": "[parameters('messageretentionindays')]"}, "partitioncount": {"value": "[parameters('partitioncount')]"}, "captureencodingformat": {"value": "[parameters('captureencodingformat')]"}, "capturetime": {"value": "[parameters('capturetime')]"}, "capturesize": {"value": "[parameters('capturesize')]"}, "storageaccountname": {"value": "[variables('storageaccountname')]"}, "capturenameformat": {"value": "[variables('capturenameformat')]"}}}}{"type": "microsoft.resources/deployments", "name": "streamanalyticsjobstemplate", "apiversion": "2021-01-01", "dependson": ["eventhubtemplate"], "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'),concat('nested/streamanalytics.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"eventhubnamespacename": {"value": "[parameters('eventhubnamespacename')]"}, "location": {"value": "[parameters('location')]"}, "datacleaninginputstream": {"value": "[variables('datacleaninginputstream')]"}, "datacleaningoutputstream": {"value": "[variables('datacleaningoutputstream')]"}, "storageaccountname": {"value": "[variables('storageaccountname')]"}, "datacleaningstreamanalyticsjob": {"value": "[variables('datacleaningstreamanalyticsjob')]"}, "dataaggregatorstreamanalyticsjob1": {"value": "[variables('dataaggregatorstreamanalyticsjob1')]"}, "dataaggregatorstreamanalyticsjob2": {"value": "[variables('dataaggregatorstreamanalyticsjob2')]"}, "dataaggregatorstreamanalyticsjob3": {"value": "[variables('dataaggregatorstreamanalyticsjob3')]"}}}}{"condition": "[equals(parameters('optionalwizardinstall'), "yes')]", "type": "microsoft.resources/deployments", "name": "azurefunction", "apiversion": "2021-01-01", "dependson": ["kibanaesdeployedvm", "eventhubtemplate"], "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'),concat('nested/azurefunction.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"kibanaesdeployedvmip": {"value": "[reference('kibanaesdeployedvm').outputs.publicipaddress.value]"}, "storageaccountname": {"value": "[variables('storageaccountname')]"}, "appname": {"value": "[parameters('appname')]"}, "location": {"value": "[parameters('location')]"}, "web_app_id": {"value": "[parameters('serviceprincipalid')]"}, "web_app_secret": {"value": "[parameters('serviceprincipalkey')]"}, "datafactory_name": {"value": "[parameters('datafactoryname')]"}, "eventhub_name": {"value": "[variables('datacleaninginputstream')]"}, "eventhub_namespace": {"value": "[parameters('eventhubnamespacename')]"}, "adla_account_name": {"value": "[parameters('adlanalyticsname')]"}, "datacleaningstreamanalyticsjob": {"value": "[variables('datacleaningstreamanalyticsjob')]"}, "dataaggregatorstreamanalyticsjob1": {"value": "[variables('dataaggregatorstreamanalyticsjob1')]"}, "dataaggregatorstreamanalyticsjob2": {"value": "[variables('dataaggregatorstreamanalyticsjob2')]"}, "dataaggregatorstreamanalyticsjob3": {"value": "[variables('dataaggregatorstreamanalyticsjob3')]"}, "_artifactslocation": {"value": "[parameters('_artifactslocation')]"}, "_artifactslocationsastoken": {"value": "[parameters('_artifactslocationsastoken')]"}}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"type": "microsoft.resources/deployments", "name": "storageaccount", "apiversion": "2021-01-01", "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'),concat('nested/storageaccount.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"storageaccountname": {"value": "[variables('storageaccountname')]"}, "storageaccounttype": {"value": "[variables('storageaccounttype')]"}, "location": {"value": "[parameters('location')]"}}}}{"type": "microsoft.resources/deployments", "name": "datafactory", "apiversion": "2021-01-01", "dependson": ["kibanaesdeployedvm"], "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'),concat('nested/datafactory.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"kibanaesdeployedvmip": {"value": "[reference('kibanaesdeployedvm').outputs.publicipaddress.value]"}, "storageaccountname": {"value": "[variables('storageaccountname')]"}, "_artifactslocation": {"value": "[variables('artloc')]"}, "_artifactslocationsastoken": {"value": "[parameters('_artifactslocationsastoken')]"}, "datafactoryname": {"value": "[parameters('datafactoryname')]"}, "datafactorylocation": {"value": "[parameters('location')]"}, "blobcontainer": {"value": "[variables('blobcontainer')]"}, "serviceprincipalid": {"value": "[parameters('serviceprincipalid')]"}, "serviceprincipalkey": {"value": "[parameters('serviceprincipalkey')]"}}}}{"type": "microsoft.resources/deployments", "name": "datalakeanalytics", "apiversion": "2021-01-01", "dependson": ["storageaccount"], "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'),concat('nested/datalakeanalytics.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"adlanalyticsname": {"value": "[parameters('adlanalyticsname')]"}, "adlstorename": {"value": "[parameters('adlstorename')]"}, "storageaccountname": {"value": "[variables('storageaccountname')]"}, "datalakeanalyticslocation": {"value": "[parameters('datalakeanalyticslocation')]"}}}}{"type": "microsoft.resources/deployments", "name": "eventhubtemplate", "apiversion": "2021-01-01", "dependson": ["datalakeanalytics"], "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'),concat('nested/eventhub.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"eventhubnamespacename": {"value": "[parameters('eventhubnamespacename')]"}, "location": {"value": "[parameters('location')]"}, "eventhubsku": {"value": "[parameters('eventhubsku')]"}, "skucapacity": {"value": "[parameters('skucapacity')]"}, "isautoinflateenabled": {"value": "[parameters('isautoinflateenabled')]"}, "maximumthroughputunits": {"value": "[variables('maximumthroughputunits')]"}, "datacleaninginputstream": {"value": "[variables('datacleaninginputstream')]"}, "datacleaningoutputstream": {"value": "[variables('datacleaningoutputstream')]"}, "messageretentionindays": {"value": "[parameters('messageretentionindays')]"}, "partitioncount": {"value": "[parameters('partitioncount')]"}, "captureencodingformat": {"value": "[parameters('captureencodingformat')]"}, "capturetime": {"value": "[parameters('capturetime')]"}, "capturesize": {"value": "[parameters('capturesize')]"}, "storageaccountname": {"value": "[variables('storageaccountname')]"}, "capturenameformat": {"value": "[variables('capturenameformat')]"}}}}{"type": "microsoft.resources/deployments", "name": "streamanalyticsjobstemplate", "apiversion": "2021-01-01", "dependson": ["eventhubtemplate"], "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'),concat('nested/streamanalytics.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"eventhubnamespacename": {"value": "[parameters('eventhubnamespacename')]"}, "location": {"value": "[parameters('location')]"}, "datacleaninginputstream": {"value": "[variables('datacleaninginputstream')]"}, "datacleaningoutputstream": {"value": "[variables('datacleaningoutputstream')]"}, "storageaccountname": {"value": "[variables('storageaccountname')]"}, "datacleaningstreamanalyticsjob": {"value": "[variables('datacleaningstreamanalyticsjob')]"}, "dataaggregatorstreamanalyticsjob1": {"value": "[variables('dataaggregatorstreamanalyticsjob1')]"}, "dataaggregatorstreamanalyticsjob2": {"value": "[variables('dataaggregatorstreamanalyticsjob2')]"}, "dataaggregatorstreamanalyticsjob3": {"value": "[variables('dataaggregatorstreamanalyticsjob3')]"}}}}{"condition": "[equals(parameters('optionalwizardinstall'), "yes')]", "type": "microsoft.resources/deployments", "name": "azurefunction", "apiversion": "2021-01-01", "dependson": ["kibanaesdeployedvm", "eventhubtemplate"], "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'),concat('nested/azurefunction.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"kibanaesdeployedvmip": {"value": "[reference('kibanaesdeployedvm').outputs.publicipaddress.value]"}, "storageaccountname": {"value": "[variables('storageaccountname')]"}, "appname": {"value": "[parameters('appname')]"}, "location": {"value": "[parameters('location')]"}, "web_app_id": {"value": "[parameters('serviceprincipalid')]"}, "web_app_secret": {"value": "[parameters('serviceprincipalkey')]"}, "datafactory_name": {"value": "[parameters('datafactoryname')]"}, "eventhub_name": {"value": "[variables('datacleaninginputstream')]"}, "eventhub_namespace": {"value": "[parameters('eventhubnamespacename')]"}, "adla_account_name": {"value": "[parameters('adlanalyticsname')]"}, "datacleaningstreamanalyticsjob": {"value": "[variables('datacleaningstreamanalyticsjob')]"}, "dataaggregatorstreamanalyticsjob1": {"value": "[variables('dataaggregatorstreamanalyticsjob1')]"}, "dataaggregatorstreamanalyticsjob2": {"value": "[variables('dataaggregatorstreamanalyticsjob2')]"}, "dataaggregatorstreamanalyticsjob3": {"value": "[variables('dataaggregatorstreamanalyticsjob3')]"}, "_artifactslocation": {"value": "[parameters('_artifactslocation')]"}, "_artifactslocationsastoken": {"value": "[parameters('_artifactslocationsastoken')]"}}}}{"type": "microsoft.resources/deployments", "name": "kibanaesdeployedvm", "apiversion": "2021-01-01", "dependson": ["storageaccount"], "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'),concat('nested/elasticsearchkibana.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"vmsize": {"value": "[parameters('vmsize')]"}, "username": {"value": "[parameters('vm_username')]"}, "password": {"value": "[parameters('vm_password')]"}, "dnslabelprefix": {"value": "[variables('dnslabelprefix')]"}, "location": {"value": "[parameters('location')]"}, "_artifactslocation": {"value": "[parameters('_artifactslocation')]"}, "_artifactslocationsastoken": {"value": "[parameters('_artifactslocationsastoken')]"}}}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2019-04-01", "type": "microsoft.network/virtualnetworks", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups", parameters('nsgformanagedinstancesubnet'))]", "[resourceid('microsoft.network/routetables", parameters('routetableformanagedinstancesubnet'))]"], "properties": {"addressspace": {"addressprefixes": ["[parameters('virtualnetworkaddressprefix')]"]}, "subnets": [{"name": "[parameters('defaultsubnetname')]", "properties": {"addressprefix": "[parameters('defaultsubnetprefix')]"}}, {"name": "[parameters('managedinstancesubnetname')]", "properties": {"addressprefix": "[parameters('managedinstancesubnetprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", parameters('nsgformanagedinstancesubnet'))]"}, "routetable": {"id": "[resourceid('microsoft.network/routetables", parameters('routetableformanagedinstancesubnet'))]"}, "delegations": [{"name": "midelegation", "properties": {"servicename": "microsoft.sql/managedinstances"}}]}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2019-04-01", "type": "microsoft.network/virtualnetworks", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups", parameters('nsgformanagedinstancesubnet'))]", "[resourceid('microsoft.network/routetables", parameters('routetableformanagedinstancesubnet'))]"], "properties": {"addressspace": {"addressprefixes": ["[parameters('virtualnetworkaddressprefix')]"]}, "subnets": [{"name": "[parameters('defaultsubnetname')]", "properties": {"addressprefix": "[parameters('defaultsubnetprefix')]"}}, {"name": "[parameters('managedinstancesubnetname')]", "properties": {"addressprefix": "[parameters('managedinstancesubnetprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", parameters('nsgformanagedinstancesubnet'))]"}, "routetable": {"id": "[resourceid('microsoft.network/routetables", parameters('routetableformanagedinstancesubnet'))]"}, "delegations": [{"name": "midelegation", "properties": {"servicename": "microsoft.sql/managedinstances"}}]}}]}}{"apiversion": "2019-06-01", "type": "microsoft.network/networksecuritygroups", "name": "[parameters('nsgformanagedinstancesubnet')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allow_tds_inbound", "properties": {"description": "allow access to data", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "1433", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1000, "direction": "inbound"}}, {"name": "allow_redirect_inbound", "properties": {"description": "allow inbound redirect traffic to managed instance inside the virtual network", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "11000-11999", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1100, "direction": "inbound"}}, {"name": "allow_geodr_inbound", "properties": {"description": "allow inbound geodr traffic inside the virtual network", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "5022", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1200, "direction": "inbound"}}, {"name": "deny_all_inbound", "properties": {"description": "deny all other inbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "inbound"}}, {"name": "allow_linkedserver_outbound", "properties": {"description": "allow outbound linkedserver traffic inside the virtual network", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "1433", "sourceaddressprefix": "*", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 1000, "direction": "outbound"}}, {"name": "allow_redirect_outbound", "properties": {"description": "allow outbound redirect traffic to managed instance inside the virtual network", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "11000-11999", "sourceaddressprefix": "*", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 1100, "direction": "outbound"}}, {"name": "allow_geodr_outbound", "properties": {"description": "allow outbound geodr traffic inside the virtual network", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "5022", "sourceaddressprefix": "*", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 1200, "direction": "outbound"}}, {"name": "deny_all_outbound", "properties": {"description": "deny all other outbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "outbound"}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2019-04-01", "type": "microsoft.network/virtualnetworks", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups", parameters('nsgformanagedinstancesubnet'))]", "[resourceid('microsoft.network/routetables", parameters('routetableformanagedinstancesubnet'))]"], "properties": {"addressspace": {"addressprefixes": ["[parameters('virtualnetworkaddressprefix')]"]}, "subnets": [{"name": "[parameters('defaultsubnetname')]", "properties": {"addressprefix": "[parameters('defaultsubnetprefix')]"}}, {"name": "[parameters('managedinstancesubnetname')]", "properties": {"addressprefix": "[parameters('managedinstancesubnetprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", parameters('nsgformanagedinstancesubnet'))]"}, "routetable": {"id": "[resourceid('microsoft.network/routetables", parameters('routetableformanagedinstancesubnet'))]"}, "delegations": [{"name": "midelegation", "properties": {"servicename": "microsoft.sql/managedinstances"}}]}}]}}{"apiversion": "2019-06-01", "type": "microsoft.network/networksecuritygroups", "name": "[parameters('nsgformanagedinstancesubnet')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allow_tds_inbound", "properties": {"description": "allow access to data", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "1433", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1000, "direction": "inbound"}}, {"name": "allow_redirect_inbound", "properties": {"description": "allow inbound redirect traffic to managed instance inside the virtual network", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "11000-11999", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1100, "direction": "inbound"}}, {"name": "allow_geodr_inbound", "properties": {"description": "allow inbound geodr traffic inside the virtual network", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "5022", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1200, "direction": "inbound"}}, {"name": "deny_all_inbound", "properties": {"description": "deny all other inbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "inbound"}}, {"name": "allow_linkedserver_outbound", "properties": {"description": "allow outbound linkedserver traffic inside the virtual network", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "1433", "sourceaddressprefix": "*", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 1000, "direction": "outbound"}}, {"name": "allow_redirect_outbound", "properties": {"description": "allow outbound redirect traffic to managed instance inside the virtual network", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "11000-11999", "sourceaddressprefix": "*", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 1100, "direction": "outbound"}}, {"name": "allow_geodr_outbound", "properties": {"description": "allow outbound geodr traffic inside the virtual network", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "5022", "sourceaddressprefix": "*", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 1200, "direction": "outbound"}}, {"name": "deny_all_outbound", "properties": {"description": "deny all other outbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "outbound"}}]}}{"type": "microsoft.network/routetables", "apiversion": "2019-04-01", "name": "[parameters('routetableformanagedinstancesubnet')]", "location": "[parameters('location')]", "properties": {"disablebgproutepropagation": false}}
This template creates a EventHubs namespace, an Event Hub, a consumer group and authorizationRules
{"apiversion": "2018-01-01-preview", "name": "[parameters('eventhubnamespacename')]", "type": "microsoft.eventhub/namespaces", "location": "[parameters('location')]", "sku": {"name": "standard", "tier": "standard"}, "properties": {}, "resources": [{"apiversion": "2017-04-01", "name": "[parameters('eventhubname')]", "type": "eventhubs", "dependson": ["[resourceid('microsoft.eventhub/namespaces", parameters('eventhubnamespacename'))]"]}]}
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": "standard_lrs"}, "kind": "storagev2", "properties": {}}
This template creates a data collection rule defining the data source (Syslog) and the destination workspace.
{"scope": "[concat('microsoft.sql/managedinstances/", parameters('managedinstancename'))]", "type": "microsoft.insights/diagnosticsettings", "apiversion": "2017-05-01-preview", "name": "[parameters('diagnosticsettingname')]", "dependson": ["[parameters('managedinstancename')]", "[parameters('storageaccountname')]", "[parameters('loganalyticsworkspacename')]", "[resourceid('microsoft.eventhub/namespaces", parameters('eventhubnamespacename'))]"], "properties": {"workspaceid": "[resourceid('microsoft.operationalinsights/workspaces", parameters('loganalyticsworkspacename'))]", "storageaccountid": "[resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname'))]", "eventhubauthorizationruleid": "[resourceid('microsoft.eventhub/namespaces/authorizationrules", parameters('eventhubnamespacename'), parameters('eventhubauthorizationrulename'))]", "eventhubname": "[parameters('eventhubname')]", "logs": [{"category": "resourceusagestats", "enabled": true}, {"category": "devopsoperationsaudit", "enabled": true}, {"category": "sqlsecurityauditevents", "enabled": true}]}}
Storage Account with Storage Service Encryption and a blob deletion retention policy
{"type": "microsoft.storage/storageaccounts", "apiversion": "2021-04-01", "name": "[parameters('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storagev2", "properties": {}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/networksecuritygroups", "apiversion": "2020-06-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allow_tds_inbound", "properties": {"description": "allow access to data", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "1433", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1000, "direction": "inbound"}}, {"name": "allow_redirect_inbound", "properties": {"description": "allow inbound redirect traffic to managed instance inside the virtual network", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "11000-11999", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1100, "direction": "inbound"}}, {"name": "deny_all_inbound", "properties": {"description": "deny all other inbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "inbound"}}, {"name": "deny_all_outbound", "properties": {"description": "deny all other outbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "outbound"}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/networksecuritygroups", "apiversion": "2020-06-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allow_tds_inbound", "properties": {"description": "allow access to data", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "1433", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1000, "direction": "inbound"}}, {"name": "allow_redirect_inbound", "properties": {"description": "allow inbound redirect traffic to managed instance inside the virtual network", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "11000-11999", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1100, "direction": "inbound"}}, {"name": "deny_all_inbound", "properties": {"description": "deny all other inbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "inbound"}}, {"name": "deny_all_outbound", "properties": {"description": "deny all other outbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "outbound"}}]}}{"type": "microsoft.network/routetables", "apiversion": "2020-06-01", "name": "[variables('routetablename')]", "location": "[parameters('location')]", "properties": {"disablebgproutepropagation": false}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/networksecuritygroups", "apiversion": "2020-06-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allow_tds_inbound", "properties": {"description": "allow access to data", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "1433", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1000, "direction": "inbound"}}, {"name": "allow_redirect_inbound", "properties": {"description": "allow inbound redirect traffic to managed instance inside the virtual network", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "11000-11999", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1100, "direction": "inbound"}}, {"name": "deny_all_inbound", "properties": {"description": "deny all other inbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "inbound"}}, {"name": "deny_all_outbound", "properties": {"description": "deny all other outbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "outbound"}}]}}{"type": "microsoft.network/routetables", "apiversion": "2020-06-01", "name": "[variables('routetablename')]", "location": "[parameters('location')]", "properties": {"disablebgproutepropagation": false}}{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[variables('routetablename')]", "[variables('networksecuritygroupname')]"], "properties": {"addressspace": {"addressprefixes": ["[parameters('addressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetprefix')]", "routetable": {"id": "[resourceid('microsoft.network/routetables", variables('routetablename'))]"}, "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}, "delegations": [{"name": "midelegation", "properties": {"servicename": "microsoft.sql/managedinstances"}}]}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/networksecuritygroups", "apiversion": "2020-06-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allow_tds_inbound", "properties": {"description": "allow access to data", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "1433", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1000, "direction": "inbound"}}, {"name": "allow_redirect_inbound", "properties": {"description": "allow inbound redirect traffic to managed instance inside the virtual network", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "11000-11999", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1100, "direction": "inbound"}}, {"name": "deny_all_inbound", "properties": {"description": "deny all other inbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "inbound"}}, {"name": "deny_all_outbound", "properties": {"description": "deny all other outbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "outbound"}}]}}{"type": "microsoft.network/routetables", "apiversion": "2020-06-01", "name": "[variables('routetablename')]", "location": "[parameters('location')]", "properties": {"disablebgproutepropagation": false}}{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('addressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetprefix')]", "routetable": {"id": "[resourceid('microsoft.network/routetables", variables('routetablename'))]"}, "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}, "delegations": [{"name": "managedinstancedelegation", "properties": {"servicename": "microsoft.sql/managedinstances"}}]}}]}, "dependson": ["[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]", "[resourceid('microsoft.network/routetables", variables('routetablename'))]"]}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"condition": "[parameters('enableads')]", "type": "microsoft.storage/storageaccounts", "apiversion": "2019-06-01", "name": "[variables('storagename')]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storagev2", "properties": {"minimumtlsversion": "tls1_2", "supportshttpstrafficonly": "true", "allowblobpublicaccess": "false"}}
This template uses Azure Managed Identity to assign access to Azure Maps. See more at https://aka.ms/amauth
{"condition": "[parameters('enableads')]", "scope": "[concat('microsoft.storage/storageaccounts/", variables('storagename'))]", "type": "microsoft.authorization/roleassignments", "apiversion": "2020-04-01-preview", "name": "[variables('uniqueroleguid')]", "dependson": ["[resourceid('microsoft.sql/servers", parameters('servername'))]", "[resourceid('microsoft.storage/storageaccounts", variables('storagename'))]"], "properties": {"roledefinitionid": "[variables('storageblobcontributor')]", "principalid": "[reference(resourceid('microsoft.sql/servers", parameters('servername')), "2020-02-02-preview", "full').identity.principalid]", "scope": "[resourceid('microsoft.storage/storageaccounts", variables('storagename'))]", "principaltype": "serviceprincipal"}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-08-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allow_tds_inbound", "properties": {"description": "allow access to data", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "1433", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1000, "direction": "inbound"}}, {"name": "allow_redirect_inbound", "properties": {"description": "allow inbound redirect traffic to managed instance inside the virtual network", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "11000-11999", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1100, "direction": "inbound"}}, {"name": "deny_all_inbound", "properties": {"description": "deny all other inbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "inbound"}}, {"name": "allow_misubnet_outbound", "properties": {"description": "allow outbound traffic inside the subnet", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "[parameters('subnetprefix')]", "access": "allow", "priority": 200, "direction": "outbound"}}, {"name": "deny_all_outbound", "properties": {"description": "deny all other outbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "outbound"}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-08-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allow_tds_inbound", "properties": {"description": "allow access to data", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "1433", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1000, "direction": "inbound"}}, {"name": "allow_redirect_inbound", "properties": {"description": "allow inbound redirect traffic to managed instance inside the virtual network", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "11000-11999", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1100, "direction": "inbound"}}, {"name": "deny_all_inbound", "properties": {"description": "deny all other inbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "inbound"}}, {"name": "allow_misubnet_outbound", "properties": {"description": "allow outbound traffic inside the subnet", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "[parameters('subnetprefix')]", "access": "allow", "priority": 200, "direction": "outbound"}}, {"name": "deny_all_outbound", "properties": {"description": "deny all other outbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "outbound"}}]}}{"type": "microsoft.network/routetables", "name": "[variables('routetablename')]", "apiversion": "2019-06-01", "location": "[parameters('location')]", "properties": {"disablebgproutepropagation": false}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-08-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allow_tds_inbound", "properties": {"description": "allow access to data", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "1433", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1000, "direction": "inbound"}}, {"name": "allow_redirect_inbound", "properties": {"description": "allow inbound redirect traffic to managed instance inside the virtual network", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "11000-11999", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1100, "direction": "inbound"}}, {"name": "deny_all_inbound", "properties": {"description": "deny all other inbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "inbound"}}, {"name": "allow_misubnet_outbound", "properties": {"description": "allow outbound traffic inside the subnet", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "[parameters('subnetprefix')]", "access": "allow", "priority": 200, "direction": "outbound"}}, {"name": "deny_all_outbound", "properties": {"description": "deny all other outbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "outbound"}}]}}{"type": "microsoft.network/routetables", "name": "[variables('routetablename')]", "apiversion": "2019-06-01", "location": "[parameters('location')]", "properties": {"disablebgproutepropagation": false}}{"name": "[parameters('virtualnetworkname')]", "type": "microsoft.network/virtualnetworks", "apiversion": "2019-06-01", "dependson": ["[variables('routetablename')]", "[variables('networksecuritygroupname')]"], "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('addressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetprefix')]", "routetable": {"id": "[resourceid('microsoft.network/routetables", variables('routetablename'))]"}, "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}, "delegations": [{"name": "midelegation", "properties": {"servicename": "microsoft.sql/managedinstances"}}]}}, {"name": "[variables('gatewaysubnetname')]", "properties": {"addressprefix": "[parameters('gatewaysubnetprefix')]"}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-08-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allow_tds_inbound", "properties": {"description": "allow access to data", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "1433", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1000, "direction": "inbound"}}, {"name": "allow_redirect_inbound", "properties": {"description": "allow inbound redirect traffic to managed instance inside the virtual network", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "11000-11999", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1100, "direction": "inbound"}}, {"name": "deny_all_inbound", "properties": {"description": "deny all other inbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "inbound"}}, {"name": "allow_misubnet_outbound", "properties": {"description": "allow outbound traffic inside the subnet", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "[parameters('subnetprefix')]", "access": "allow", "priority": 200, "direction": "outbound"}}, {"name": "deny_all_outbound", "properties": {"description": "deny all other outbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "outbound"}}]}}{"type": "microsoft.network/routetables", "name": "[variables('routetablename')]", "apiversion": "2019-06-01", "location": "[parameters('location')]", "properties": {"disablebgproutepropagation": false}}{"name": "[parameters('virtualnetworkname')]", "type": "microsoft.network/virtualnetworks", "apiversion": "2019-06-01", "dependson": ["[variables('routetablename')]", "[variables('networksecuritygroupname')]"], "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('addressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetprefix')]", "routetable": {"id": "[resourceid('microsoft.network/routetables", variables('routetablename'))]"}, "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}, "delegations": [{"name": "midelegation", "properties": {"servicename": "microsoft.sql/managedinstances"}}]}}, {"name": "[variables('gatewaysubnetname')]", "properties": {"addressprefix": "[parameters('gatewaysubnetprefix')]"}}]}}{"apiversion": "2019-06-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('gatewaypublicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic"}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-08-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allow_tds_inbound", "properties": {"description": "allow access to data", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "1433", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1000, "direction": "inbound"}}, {"name": "allow_redirect_inbound", "properties": {"description": "allow inbound redirect traffic to managed instance inside the virtual network", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "11000-11999", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1100, "direction": "inbound"}}, {"name": "deny_all_inbound", "properties": {"description": "deny all other inbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "inbound"}}, {"name": "allow_misubnet_outbound", "properties": {"description": "allow outbound traffic inside the subnet", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "[parameters('subnetprefix')]", "access": "allow", "priority": 200, "direction": "outbound"}}, {"name": "deny_all_outbound", "properties": {"description": "deny all other outbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "outbound"}}]}}{"type": "microsoft.network/routetables", "name": "[variables('routetablename')]", "apiversion": "2019-06-01", "location": "[parameters('location')]", "properties": {"disablebgproutepropagation": false}}{"name": "[parameters('virtualnetworkname')]", "type": "microsoft.network/virtualnetworks", "apiversion": "2019-06-01", "dependson": ["[variables('routetablename')]", "[variables('networksecuritygroupname')]"], "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('addressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetprefix')]", "routetable": {"id": "[resourceid('microsoft.network/routetables", variables('routetablename'))]"}, "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}, "delegations": [{"name": "midelegation", "properties": {"servicename": "microsoft.sql/managedinstances"}}]}}, {"name": "[variables('gatewaysubnetname')]", "properties": {"addressprefix": "[parameters('gatewaysubnetprefix')]"}}]}}{"apiversion": "2019-06-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('gatewaypublicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic"}}{"apiversion": "2019-06-01", "type": "microsoft.network/virtualnetworkgateways", "name": "[variables('gatewayname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/publicipaddresses/", variables('gatewaypublicipaddressname'))]", "[resourceid('microsoft.network/virtualnetworks/", parameters('virtualnetworkname'))]"], "properties": {"ipconfigurations": [{"properties": {"privateipallocationmethod": "dynamic", "subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", parameters('virtualnetworkname'), variables('gatewaysubnetname'))]"}, "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('gatewaypublicipaddressname'))]"}}, "name": "vnetgatewayconfig"}], "sku": {"name": "[variables('gatewaysku')]", "tier": "[variables('gatewaysku')]"}, "gatewaytype": "vpn", "vpntype": "routebased", "enablebgp": "false", "vpnclientconfiguration": {"vpnclientaddresspool": {"addressprefixes": ["[parameters('vpnclientaddresspoolprefix')]"]}, "vpnclientrootcertificates": [{"name": "[variables('clientrootcertname')]", "properties": {"publiccertdata": "[parameters('publicrootcertdata')]"}}]}}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"name": "[variables('virtualmachinename')]", "type": "microsoft.compute/virtualmachines", "apiversion": "2019-12-01", "location": "[parameters('location')]", "dependson": ["[variables('networkinterfacename')]"], "properties": {"osprofile": {"computername": "[variables('virtualmachinename')]", "adminusername": "[parameters('administratorlogin')]", "adminpassword": "[parameters('administratorloginpassword')]", "windowsconfiguration": {"provisionvmagent": "true"}}, "hardwareprofile": {"vmsize": "[parameters('virtualmachinesize')]"}, "storageprofile": {"imagereference": {"publisher": "microsoftwindowsserver", "offer": "windowsserver", "sku": "2016-datacenter", "version": "latest"}, "osdisk": {"createoption": "fromimage", "manageddisk": {"storageaccounttype": "standardssd_lrs"}}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('networkinterfacename'))]"}]}}, "resources": [{"name": "setupssms", "type": "extensions", "location": "[parameters('location')]", "apiversion": "2019-12-01", "dependson": ["[variables('virtualmachinename')]"], "tags": {"displayname": "setupssms"}, "properties": {"publisher": "microsoft.compute", "type": "customscriptextension", "typehandlerversion": "1.9", "autoupgrademinorversion": true, "settings": {"fileuris": ["[variables('scriptfileuri')]"], "commandtoexecute": "powershell -executionpolicy unrestricted -file installssms.ps1"}}}]}
Create a VM from a Windows Image with 4 Empty Data Disks
{"name": "[variables('virtualmachinename')]", "type": "microsoft.compute/virtualmachines", "apiversion": "2019-12-01", "location": "[parameters('location')]", "dependson": ["[variables('networkinterfacename')]"], "properties": {"osprofile": {"computername": "[variables('virtualmachinename')]", "adminusername": "[parameters('administratorlogin')]", "adminpassword": "[parameters('administratorloginpassword')]", "windowsconfiguration": {"provisionvmagent": "true"}}, "hardwareprofile": {"vmsize": "[parameters('virtualmachinesize')]"}, "storageprofile": {"imagereference": {"publisher": "microsoftwindowsserver", "offer": "windowsserver", "sku": "2016-datacenter", "version": "latest"}, "osdisk": {"createoption": "fromimage", "manageddisk": {"storageaccounttype": "standardssd_lrs"}}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('networkinterfacename'))]"}]}}, "resources": [{"name": "setupssms", "type": "extensions", "location": "[parameters('location')]", "apiversion": "2019-12-01", "dependson": ["[variables('virtualmachinename')]"], "tags": {"displayname": "setupssms"}, "properties": {"publisher": "microsoft.compute", "type": "customscriptextension", "typehandlerversion": "1.9", "autoupgrademinorversion": true, "settings": {"fileuris": ["[variables('scriptfileuri')]"], "commandtoexecute": "powershell -executionpolicy unrestricted -file installssms.ps1"}}}]}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2019-06-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allow_tds_inbound", "properties": {"description": "allow access to data", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "1433", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1000, "direction": "inbound"}}, {"name": "allow_redirect_inbound", "properties": {"description": "allow inbound redirect traffic to managed instance inside the virtual network", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "11000-11999", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1100, "direction": "inbound"}}, {"name": "deny_all_inbound", "properties": {"description": "deny all other inbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "inbound"}}, {"name": "deny_all_outbound", "properties": {"description": "deny all other outbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "outbound"}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2019-06-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allow_tds_inbound", "properties": {"description": "allow access to data", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "1433", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1000, "direction": "inbound"}}, {"name": "allow_redirect_inbound", "properties": {"description": "allow inbound redirect traffic to managed instance inside the virtual network", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "11000-11999", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1100, "direction": "inbound"}}, {"name": "deny_all_inbound", "properties": {"description": "deny all other inbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "inbound"}}, {"name": "deny_all_outbound", "properties": {"description": "deny all other outbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "outbound"}}]}}{"type": "microsoft.network/routetables", "name": "[variables('routetablename')]", "apiversion": "2019-06-01", "location": "[parameters('location')]", "properties": {"disablebgproutepropagation": false}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2019-06-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allow_tds_inbound", "properties": {"description": "allow access to data", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "1433", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1000, "direction": "inbound"}}, {"name": "allow_redirect_inbound", "properties": {"description": "allow inbound redirect traffic to managed instance inside the virtual network", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "11000-11999", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1100, "direction": "inbound"}}, {"name": "deny_all_inbound", "properties": {"description": "deny all other inbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "inbound"}}, {"name": "deny_all_outbound", "properties": {"description": "deny all other outbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "outbound"}}]}}{"type": "microsoft.network/routetables", "name": "[variables('routetablename')]", "apiversion": "2019-06-01", "location": "[parameters('location')]", "properties": {"disablebgproutepropagation": false}}{"name": "[parameters('virtualnetworkname')]", "type": "microsoft.network/virtualnetworks", "apiversion": "2019-06-01", "dependson": ["[variables('routetablename')]", "[variables('networksecuritygroupname')]"], "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('addressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetprefix')]", "routetable": {"id": "[resourceid('microsoft.network/routetables", variables('routetablename'))]"}, "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}, "delegations": [{"name": "midelegation", "properties": {"servicename": "microsoft.sql/managedinstances"}}]}}, {"name": "[parameters('managementsubnetname')]", "properties": {"addressprefix": "[parameters('managementsubnetprefix')]"}}]}}{"name": "[variables('networkinterfacename')]", "type": "microsoft.network/networkinterfaces", "apiversion": "2019-06-01", "location": "[parameters('location')]", "dependson": ["[parameters('virtualnetworkname')]", "[variables('publicipaddressname')]", "[variables('jbnetworksecuritygroupname')]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", parameters('virtualnetworkname'), parameters('managementsubnetname'))]"}, "privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", variables('publicipaddressname'))]"}}}], "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('jbnetworksecuritygroupname'))]"}}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2019-06-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allow_tds_inbound", "properties": {"description": "allow access to data", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "1433", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1000, "direction": "inbound"}}, {"name": "allow_redirect_inbound", "properties": {"description": "allow inbound redirect traffic to managed instance inside the virtual network", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "11000-11999", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1100, "direction": "inbound"}}, {"name": "deny_all_inbound", "properties": {"description": "deny all other inbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "inbound"}}, {"name": "deny_all_outbound", "properties": {"description": "deny all other outbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "outbound"}}]}}{"type": "microsoft.network/routetables", "name": "[variables('routetablename')]", "apiversion": "2019-06-01", "location": "[parameters('location')]", "properties": {"disablebgproutepropagation": false}}{"name": "[parameters('virtualnetworkname')]", "type": "microsoft.network/virtualnetworks", "apiversion": "2019-06-01", "dependson": ["[variables('routetablename')]", "[variables('networksecuritygroupname')]"], "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('addressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetprefix')]", "routetable": {"id": "[resourceid('microsoft.network/routetables", variables('routetablename'))]"}, "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}, "delegations": [{"name": "midelegation", "properties": {"servicename": "microsoft.sql/managedinstances"}}]}}, {"name": "[parameters('managementsubnetname')]", "properties": {"addressprefix": "[parameters('managementsubnetprefix')]"}}]}}{"name": "[variables('networkinterfacename')]", "type": "microsoft.network/networkinterfaces", "apiversion": "2019-06-01", "location": "[parameters('location')]", "dependson": ["[parameters('virtualnetworkname')]", "[variables('publicipaddressname')]", "[variables('jbnetworksecuritygroupname')]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", parameters('virtualnetworkname'), parameters('managementsubnetname'))]"}, "privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", variables('publicipaddressname'))]"}}}], "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('jbnetworksecuritygroupname'))]"}}}{"name": "[variables('publicipaddressname')]", "type": "microsoft.network/publicipaddresses", "apiversion": "2019-06-01", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic"}, "sku": {"name": "basic"}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2019-06-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allow_tds_inbound", "properties": {"description": "allow access to data", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "1433", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1000, "direction": "inbound"}}, {"name": "allow_redirect_inbound", "properties": {"description": "allow inbound redirect traffic to managed instance inside the virtual network", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "11000-11999", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1100, "direction": "inbound"}}, {"name": "deny_all_inbound", "properties": {"description": "deny all other inbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "inbound"}}, {"name": "deny_all_outbound", "properties": {"description": "deny all other outbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "outbound"}}]}}{"type": "microsoft.network/routetables", "name": "[variables('routetablename')]", "apiversion": "2019-06-01", "location": "[parameters('location')]", "properties": {"disablebgproutepropagation": false}}{"name": "[parameters('virtualnetworkname')]", "type": "microsoft.network/virtualnetworks", "apiversion": "2019-06-01", "dependson": ["[variables('routetablename')]", "[variables('networksecuritygroupname')]"], "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('addressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetprefix')]", "routetable": {"id": "[resourceid('microsoft.network/routetables", variables('routetablename'))]"}, "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}, "delegations": [{"name": "midelegation", "properties": {"servicename": "microsoft.sql/managedinstances"}}]}}, {"name": "[parameters('managementsubnetname')]", "properties": {"addressprefix": "[parameters('managementsubnetprefix')]"}}]}}{"name": "[variables('networkinterfacename')]", "type": "microsoft.network/networkinterfaces", "apiversion": "2019-06-01", "location": "[parameters('location')]", "dependson": ["[parameters('virtualnetworkname')]", "[variables('publicipaddressname')]", "[variables('jbnetworksecuritygroupname')]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", parameters('virtualnetworkname'), parameters('managementsubnetname'))]"}, "privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", variables('publicipaddressname'))]"}}}], "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('jbnetworksecuritygroupname'))]"}}}{"name": "[variables('publicipaddressname')]", "type": "microsoft.network/publicipaddresses", "apiversion": "2019-06-01", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic"}, "sku": {"name": "basic"}}{"name": "[variables('jbnetworksecuritygroupname')]", "type": "microsoft.network/networksecuritygroups", "apiversion": "2019-06-01", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "rdp", "properties": {"priority": 300, "protocol": "tcp", "access": "allow", "direction": "inbound", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*", "destinationportrange": "3389"}}]}}
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')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces", variables('networkinterfacename'))]"], "tags": {"displayname": "[variables('vmname')]"}, "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmname')]", "adminusername": "[parameters('vmadminusername')]", "adminpassword": "[parameters('vmadminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "microsoftwindowsserver", "offer": "windowsserver", "sku": "2019-datacenter", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'),"osdisk')]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "[variables('osdisktype')]"}, "disksizegb": 128}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('networkinterfacename'))]"}]}}}
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')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces", variables('networkinterfacename'))]"], "tags": {"displayname": "[variables('vmname')]"}, "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmname')]", "adminusername": "[parameters('vmadminusername')]", "adminpassword": "[parameters('vmadminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "microsoftwindowsserver", "offer": "windowsserver", "sku": "2019-datacenter", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'),"osdisk')]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "[variables('osdisktype')]"}, "disksizegb": 128}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('networkinterfacename'))]"}]}}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[variables('vnetname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('vnetaddressprefix')]"]}}, "resources": [{"type": "subnets", "apiversion": "2020-06-01", "name": "[variables('subnet1name')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetname')]"], "properties": {"addressprefix": "[variables('subnet1prefix')]", "privateendpointnetworkpolicies": "disabled"}}]}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[variables('vnetname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('vnetaddressprefix')]"]}}, "resources": [{"type": "subnets", "apiversion": "2020-06-01", "name": "[variables('subnet1name')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetname')]"], "properties": {"addressprefix": "[variables('subnet1prefix')]", "privateendpointnetworkpolicies": "disabled"}}]}{"type": "microsoft.network/privateendpoints", "apiversion": "2020-06-01", "name": "[variables('privateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetname')]", "[variables('sqlservername')]"], "properties": {"subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('vnetname'), variables('subnet1name'))]"}, "privatelinkserviceconnections": [{"name": "[variables('privateendpointname')]", "properties": {"privatelinkserviceid": "[resourceid('microsoft.sql/servers",variables('sqlservername'))]", "groupids": ["sqlserver"]}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[variables('vnetname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('vnetaddressprefix')]"]}}, "resources": [{"type": "subnets", "apiversion": "2020-06-01", "name": "[variables('subnet1name')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetname')]"], "properties": {"addressprefix": "[variables('subnet1prefix')]", "privateendpointnetworkpolicies": "disabled"}}]}{"type": "microsoft.network/privateendpoints", "apiversion": "2020-06-01", "name": "[variables('privateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetname')]", "[variables('sqlservername')]"], "properties": {"subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('vnetname'), variables('subnet1name'))]"}, "privatelinkserviceconnections": [{"name": "[variables('privateendpointname')]", "properties": {"privatelinkserviceid": "[resourceid('microsoft.sql/servers",variables('sqlservername'))]", "groupids": ["sqlserver"]}}]}}{"type": "microsoft.network/privatednszones", "apiversion": "2020-01-01", "name": "[variables('privatednszonename')]", "location": "global", "dependson": ["[variables('vnetname')]"], "properties": ""}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[variables('vnetname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('vnetaddressprefix')]"]}}, "resources": [{"type": "subnets", "apiversion": "2020-06-01", "name": "[variables('subnet1name')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetname')]"], "properties": {"addressprefix": "[variables('subnet1prefix')]", "privateendpointnetworkpolicies": "disabled"}}]}{"type": "microsoft.network/privateendpoints", "apiversion": "2020-06-01", "name": "[variables('privateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetname')]", "[variables('sqlservername')]"], "properties": {"subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('vnetname'), variables('subnet1name'))]"}, "privatelinkserviceconnections": [{"name": "[variables('privateendpointname')]", "properties": {"privatelinkserviceid": "[resourceid('microsoft.sql/servers",variables('sqlservername'))]", "groupids": ["sqlserver"]}}]}}{"type": "microsoft.network/privatednszones", "apiversion": "2020-01-01", "name": "[variables('privatednszonename')]", "location": "global", "dependson": ["[variables('vnetname')]"], "properties": ""}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2020-01-01", "name": "[concat(variables('privatednszonename'), "/", variables('privatednszonename'), "-link')]", "location": "global", "dependson": ["[resourceid('microsoft.network/privatednszones", variables('privatednszonename'))]", "[resourceid('microsoft.network/virtualnetworks", variables('vnetname'))]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[resourceid('microsoft.network/virtualnetworks", variables('vnetname'))]"}}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[variables('vnetname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('vnetaddressprefix')]"]}}, "resources": [{"type": "subnets", "apiversion": "2020-06-01", "name": "[variables('subnet1name')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetname')]"], "properties": {"addressprefix": "[variables('subnet1prefix')]", "privateendpointnetworkpolicies": "disabled"}}]}{"type": "microsoft.network/privateendpoints", "apiversion": "2020-06-01", "name": "[variables('privateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetname')]", "[variables('sqlservername')]"], "properties": {"subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('vnetname'), variables('subnet1name'))]"}, "privatelinkserviceconnections": [{"name": "[variables('privateendpointname')]", "properties": {"privatelinkserviceid": "[resourceid('microsoft.sql/servers",variables('sqlservername'))]", "groupids": ["sqlserver"]}}]}}{"type": "microsoft.network/privatednszones", "apiversion": "2020-01-01", "name": "[variables('privatednszonename')]", "location": "global", "dependson": ["[variables('vnetname')]"], "properties": ""}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2020-01-01", "name": "[concat(variables('privatednszonename'), "/", variables('privatednszonename'), "-link')]", "location": "global", "dependson": ["[resourceid('microsoft.network/privatednszones", variables('privatednszonename'))]", "[resourceid('microsoft.network/virtualnetworks", variables('vnetname'))]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[resourceid('microsoft.network/virtualnetworks", variables('vnetname'))]"}}}{"type": "microsoft.network/privateendpoints/privatednszonegroups", "apiversion": "2020-06-01", "name": "[variables('pvtendpointdnsgroupname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/privatednszones", variables('privatednszonename'))]", "[variables('privateendpointname')]"], "properties": {"privatednszoneconfigs": [{"name": "config1", "properties": {"privatednszoneid": "[resourceid('microsoft.network/privatednszones", variables('privatednszonename'))]"}}]}}{"type": "microsoft.network/publicipaddresses", "apiversion": "2020-06-01", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "tags": {"displayname": "[variables('publicipaddressname')]"}, "properties": {"publicipallocationmethod": "dynamic", "dnssettings": {"domainnamelabel": "[tolower(variables('vmname'))]"}}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[variables('vnetname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('vnetaddressprefix')]"]}}, "resources": [{"type": "subnets", "apiversion": "2020-06-01", "name": "[variables('subnet1name')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetname')]"], "properties": {"addressprefix": "[variables('subnet1prefix')]", "privateendpointnetworkpolicies": "disabled"}}]}{"type": "microsoft.network/privateendpoints", "apiversion": "2020-06-01", "name": "[variables('privateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetname')]", "[variables('sqlservername')]"], "properties": {"subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('vnetname'), variables('subnet1name'))]"}, "privatelinkserviceconnections": [{"name": "[variables('privateendpointname')]", "properties": {"privatelinkserviceid": "[resourceid('microsoft.sql/servers",variables('sqlservername'))]", "groupids": ["sqlserver"]}}]}}{"type": "microsoft.network/privatednszones", "apiversion": "2020-01-01", "name": "[variables('privatednszonename')]", "location": "global", "dependson": ["[variables('vnetname')]"], "properties": ""}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2020-01-01", "name": "[concat(variables('privatednszonename'), "/", variables('privatednszonename'), "-link')]", "location": "global", "dependson": ["[resourceid('microsoft.network/privatednszones", variables('privatednszonename'))]", "[resourceid('microsoft.network/virtualnetworks", variables('vnetname'))]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[resourceid('microsoft.network/virtualnetworks", variables('vnetname'))]"}}}{"type": "microsoft.network/privateendpoints/privatednszonegroups", "apiversion": "2020-06-01", "name": "[variables('pvtendpointdnsgroupname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/privatednszones", variables('privatednszonename'))]", "[variables('privateendpointname')]"], "properties": {"privatednszoneconfigs": [{"name": "config1", "properties": {"privatednszoneid": "[resourceid('microsoft.network/privatednszones", variables('privatednszonename'))]"}}]}}{"type": "microsoft.network/publicipaddresses", "apiversion": "2020-06-01", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "tags": {"displayname": "[variables('publicipaddressname')]"}, "properties": {"publicipallocationmethod": "dynamic", "dnssettings": {"domainnamelabel": "[tolower(variables('vmname'))]"}}}{"type": "microsoft.network/networkinterfaces", "apiversion": "2020-06-01", "name": "[variables('networkinterfacename')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/publicipaddresses", variables('publicipaddressname'))]", "[resourceid('microsoft.network/virtualnetworks", variables('vnetname'))]"], "tags": {"displayname": "[variables('networkinterfacename')]"}, "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", variables('publicipaddressname'))]"}, "subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('vnetname'), variables('subnet1name'))]"}}}]}}
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": "standard_lrs"}, "kind": "storagev2", "properties": {"networkacls": {"bypass": "azureservices", "defaultaction": "[if(parameters('isstoragebehindvnet'), "deny", "allow')]"}}, "resources": [{"condition": "[parameters('isstoragebehindvnet')]", "type": "microsoft.storage/storageaccounts/providers/roleassignments", "apiversion": "2020-03-01-preview", "name": "[concat(parameters('storageaccountname'), "/microsoft.authorization/", variables('uniqueroleguid'))]", "dependson": ["[resourceid('microsoft.sql/servers", parameters('sqlservername'))]", "[resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname'))]"], "properties": {"roledefinitionid": "[variables('storageblobcontributor')]", "principalid": "[reference(resourceid('microsoft.sql/servers", parameters('sqlservername')), "2020-08-01-preview", "full').identity.principalid]", "scope": "[resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname'))]", "principaltype": "serviceprincipal"}}]}
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": "standard_lrs"}, "kind": "storagev2", "properties": {"networkacls": {"bypass": "azureservices", "defaultaction": "[if(parameters('isstoragebehindvnet'), "deny", "allow')]"}}, "resources": [{"condition": "[parameters('isstoragebehindvnet')]", "type": "microsoft.storage/storageaccounts/providers/roleassignments", "apiversion": "2020-03-01-preview", "name": "[concat(parameters('storageaccountname'), "/microsoft.authorization/", variables('uniqueroleguid'))]", "dependson": ["[resourceid('microsoft.sql/servers", parameters('sqlservername'))]", "[resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname'))]"], "properties": {"roledefinitionid": "[variables('storageblobcontributor')]", "principalid": "[reference(resourceid('microsoft.sql/servers", parameters('sqlservername')), "2020-08-01-preview", "full').identity.principalid]", "scope": "[resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname'))]", "principaltype": "serviceprincipal"}}]}
Application Gateway routing Internet traffic to a virtual network (internal mode) API Management instance which services a web API hosted in an Azure Web App.
{"type": "microsoft.web/serverfarms", "apiversion": "2020-12-01", "name": "[parameters('appsvcplanname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('svcplansize')]", "tier": "[parameters('svcplansku')]", "capacity": 1}}
Application Gateway routing Internet traffic to a virtual network (internal mode) API Management instance which services a web API hosted in an Azure Web App.
{"type": "microsoft.web/serverfarms", "apiversion": "2020-12-01", "name": "[parameters('appsvcplanname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('svcplansize')]", "tier": "[parameters('svcplansku')]", "capacity": 1}}{"type": "microsoft.web/sites", "apiversion": "2020-12-01", "name": "[parameters('webappname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/serverfarms/", parameters('appsvcplanname'))]"], "properties": {"name": "[parameters('webappname')]", "serverfarmid": "[parameters('appsvcplanname')]"}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"type": "microsoft.compute/virtualmachines", "apiversion": "2020-06-01", "name": "workervm", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces", "workernic')]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "storageprofile": {"imagereference": {"publisher": "microsoftwindowsdesktop", "offer": "windows-10", "sku": "20h1-pro", "version": "latest"}, "osdisk": {"createoption": "fromimage"}}, "osprofile": {"computername": "workervm", "adminusername": "[parameters('remoteaccessusername')]", "adminpassword": "[parameters('remoteaccesspassword')]"}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", "workernic')]"}]}}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"type": "microsoft.compute/virtualmachines", "apiversion": "2020-06-01", "name": "workervm", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces", "workernic')]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "storageprofile": {"imagereference": {"publisher": "microsoftwindowsdesktop", "offer": "windows-10", "sku": "20h1-pro", "version": "latest"}, "osdisk": {"createoption": "fromimage"}}, "osprofile": {"computername": "workervm", "adminusername": "[parameters('remoteaccessusername')]", "adminpassword": "[parameters('remoteaccesspassword')]"}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", "workernic')]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "apiversion": "2020-06-01", "name": "workervm/bootstrap", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines", "workervm')]", "[resourceid('microsoft.resources/deploymentscripts", "createanddeploycertificates')]"], "properties": {"publisher": "microsoft.compute", "type": "customscriptextension", "typehandlerversion": "1.7", "autoupgrademinorversion": true, "settings": {"commandtoexecute": "[concat(\"echo \", reference(\"createanddeploycertificates\').outputs.rootca, \" > c:\\root.pem.base64 && powershell "set-content -path c:\\root.pem -value ([text.encoding]::utf8.getstring([convert]::frombase64string((get-content -path c:\\root.pem.base64))))" && certutil -addstore root c:\\root.pem\')]"}}}
This module creates a key resource in an existing KeyVault with apiVersion 2019-09-01.
{"type": "microsoft.keyvault/vaults", "apiversion": "2019-09-01", "name": "[variables('keyvaultname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.managedidentity/userassignedidentities", "demoidentity')]"], "properties": {"enabledfordeployment": false, "enabledfordiskencryption": false, "enabledfortemplatedeployment": false, "tenantid": "[subscription().tenantid]", "accesspolicies": [{"objectid": "[reference(resourceid('microsoft.managedidentity/userassignedidentities", "demoidentity'), "2018-11-30').principalid]", "tenantid": "[reference(resourceid('microsoft.managedidentity/userassignedidentities", "demoidentity'), "2018-11-30').tenantid]", "permissions": {"secrets": ["get", "list"]}}], "sku": {"name": "standard", "family": "a"}}}
This module allows you to create a user-assigned managed identity and a role assignment scoped to the resource group.
{"type": "microsoft.managedidentity/userassignedidentities", "apiversion": "2018-11-30", "name": "demoidentity", "location": "[parameters('location')]"}
Create a VM from a Windows Image with 4 Empty Data Disks
{"type": "microsoft.compute/virtualmachines", "apiversion": "2020-06-01", "name": "workervm", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces", "workernic')]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "storageprofile": {"imagereference": {"publisher": "microsoftwindowsdesktop", "offer": "windows-10", "sku": "20h1-pro", "version": "latest"}, "osdisk": {"createoption": "fromimage"}}, "osprofile": {"computername": "workervm", "adminusername": "[parameters('remoteaccessusername')]", "adminpassword": "[parameters('remoteaccesspassword')]"}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", "workernic')]"}]}}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"type": "microsoft.compute/virtualmachines", "apiversion": "2020-06-01", "name": "workervm", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces", "workernic')]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "storageprofile": {"imagereference": {"publisher": "microsoftwindowsdesktop", "offer": "windows-10", "sku": "20h1-pro", "version": "latest"}, "osdisk": {"createoption": "fromimage"}}, "osprofile": {"computername": "workervm", "adminusername": "[parameters('remoteaccessusername')]", "adminpassword": "[parameters('remoteaccesspassword')]"}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", "workernic')]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "apiversion": "2020-06-01", "name": "workervm/bootstrap", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines", "workervm')]", "[resourceid('microsoft.resources/deploymentscripts", "createanddeploycertificates')]"], "properties": {"publisher": "microsoft.compute", "type": "customscriptextension", "typehandlerversion": "1.7", "autoupgrademinorversion": true, "settings": {"commandtoexecute": "[concat(\"echo \", reference(\"createanddeploycertificates\').outputs.rootca, \" > c:\\root.pem.base64 && powershell "set-content -path c:\\root.pem -value ([text.encoding]::utf8.getstring([convert]::frombase64string((get-content -path c:\\root.pem.base64))))" && certutil -addstore root c:\\root.pem\')]"}}}
Creates and optionally secures a Key Vault with logging linked to a storage account.
{"type": "microsoft.keyvault/vaults", "apiversion": "2019-09-01", "name": "[variables('keyvaultname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.managedidentity/userassignedidentities", "demoidentity')]"], "properties": {"enabledfordeployment": false, "enabledfordiskencryption": false, "enabledfortemplatedeployment": false, "tenantid": "[subscription().tenantid]", "accesspolicies": [{"objectid": "[reference(resourceid('microsoft.managedidentity/userassignedidentities", "demoidentity'), "2018-11-30').principalid]", "tenantid": "[reference(resourceid('microsoft.managedidentity/userassignedidentities", "demoidentity'), "2018-11-30').tenantid]", "permissions": {"secrets": ["get", "list"]}}], "sku": {"name": "standard", "family": "a"}}}
Creates and optionally secures a Key Vault with logging linked to a storage account.
{"type": "microsoft.keyvault/vaults", "apiversion": "2019-09-01", "name": "[variables('keyvaultname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.managedidentity/userassignedidentities", "demoidentity')]"], "properties": {"enabledfordeployment": false, "enabledfordiskencryption": false, "enabledfortemplatedeployment": false, "tenantid": "[subscription().tenantid]", "accesspolicies": [{"objectid": "[reference(resourceid('microsoft.managedidentity/userassignedidentities", "demoidentity'), "2018-11-30').principalid]", "tenantid": "[reference(resourceid('microsoft.managedidentity/userassignedidentities", "demoidentity'), "2018-11-30').tenantid]", "permissions": {"secrets": ["get", "list"]}}], "sku": {"name": "standard", "family": "a"}}}{"type": "microsoft.keyvault/vaults/secrets", "apiversion": "2019-09-01", "name": "[concat(variables('keyvaultname'), "/", variables('keyvaultcasecretname'))]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.keyvault/vaults", variables('keyvaultname'))]", "[resourceid('microsoft.resources/deploymentscripts", "createanddeploycertificates')]"], "properties": {"value": "[reference('createanddeploycertificates').outputs.interca]"}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"type": "microsoft.resources/deploymentscripts", "apiversion": "2020-10-01", "name": "createanddeploycertificates", "location": "[parameters('location')]", "kind": "azurepowershell", "properties": {"forceupdatetag": "2", "azpowershellversion": "3.0", "scriptcontent": "# write the config to file\n$opensslconfig=@"\n[ req ]\ndefault_bits = 4096\ndistinguished_name = req_distinguished_name\nstring_mask = utf8only\ndefault_md = sha512\n\n[ req_distinguished_name ]\ncountryname = country name (2 letter code)\nstateorprovincename = state or province name\nlocalityname = locality name\n0.organizationname = organization name\norganizationalunitname = organizational unit name\ncommonname = common name\nemailaddress = email address\n\n[ rootca_ext ]\nsubjectkeyidentifier = hash\nauthoritykeyidentifier = keyid:always,issuer\nbasicconstraints = critical, ca:true\nkeyusage = critical, digitalsignature, crlsign, keycertsign\n\n[ interca_ext ]\nsubjectkeyidentifier = hash\nauthoritykeyidentifier = keyid:always,issuer\nbasicconstraints = critical, ca:true, pathlen:1\nkeyusage = critical, digitalsignature, crlsign, keycertsign\n\n[ server_ext ]\nsubjectkeyidentifier = hash\nauthoritykeyidentifier = keyid:always,issuer\nbasicconstraints = critical, ca:false\nkeyusage = critical, digitalsignature\nextendedkeyusage = serverauth\n"@\n\nset-content -path openssl.cnf -value $opensslconfig\n\n# create root ca\nopenssl req -x509 -new -nodes -newkey rsa:4096 -keyout rootca.key -sha256 -days 3650 -out rootca.crt -subj "/c=us/st=us/o=self signed/cn=self signed root ca" -config openssl.cnf -extensions rootca_ext\n\n# create intermediate ca request\nopenssl req -new -nodes -newkey rsa:4096 -keyout interca.key -sha256 -out interca.csr -subj "/c=us/st=us/o=self signed/cn=self signed intermediate ca"\n\n# sign on the intermediate ca\nopenssl x509 -req -in interca.csr -ca rootca.crt -cakey rootca.key -cacreateserial -out interca.crt -days 3650 -sha256 -extfile openssl.cnf -extensions interca_ext\n\n# export the intermediate ca into pfx\nopenssl pkcs12 -export -out interca.pfx -inkey interca.key -in interca.crt -password "pass:"\n\n# convert the pfx and public key into base64\n$interca = [convert]::tobase64string((get-content -path interca.pfx -asbytestream -raw))\n$rootca = [convert]::tobase64string((get-content -path rootca.crt -asbytestream -raw))\n\n# assign outputs\n$deploymentscriptoutputs = @{}\n$deploymentscriptoutputs["interca"] = $interca\n$deploymentscriptoutputs["rootca"] = $rootca\n", "timeout": "pt5m", "cleanuppreference": "onsuccess", "retentioninterval": "p1d"}}
This module allows you to create a user-assigned managed identity and a role assignment scoped to the resource group.
{"comments": "user-defined managed identity defined for the aks cluster. used to access the virtual network and other resources.", "type": "microsoft.managedidentity/userassignedidentities", "name": "[variables('aksclusteruserdefinedmanagedidentityname')]", "apiversion": "2018-11-30", "location": "[parameters('location')]"}
This module allows you to create a user-assigned managed identity and a role assignment scoped to the resource group.
{"comments": "user-defined managed identity defined for the aks cluster. used to access the virtual network and other resources.", "type": "microsoft.managedidentity/userassignedidentities", "name": "[variables('aksclusteruserdefinedmanagedidentityname')]", "apiversion": "2018-11-30", "location": "[parameters('location')]"}{"comments": "user-defined managed identity used by the application gateway is assigned. used to access azure key vault.", "type": "microsoft.managedidentity/userassignedidentities", "apiversion": "2018-11-30", "name": "[variables('applicationgatewayuserdefinedmanagedidentityname')]", "location": "[parameters('location')]"}
This module allows you to create a user-assigned managed identity and a role assignment scoped to the resource group.
{"comments": "user-defined managed identity defined for the aks cluster. used to access the virtual network and other resources.", "type": "microsoft.managedidentity/userassignedidentities", "name": "[variables('aksclusteruserdefinedmanagedidentityname')]", "apiversion": "2018-11-30", "location": "[parameters('location')]"}{"comments": "user-defined managed identity used by the application gateway is assigned. used to access azure key vault.", "type": "microsoft.managedidentity/userassignedidentities", "apiversion": "2018-11-30", "name": "[variables('applicationgatewayuserdefinedmanagedidentityname')]", "location": "[parameters('location')]"}{"comments": "user-defined managed identity used by an aad pod identity. used to access azure key vault.", "type": "microsoft.managedidentity/userassignedidentities", "apiversion": "2018-11-30", "name": "[variables('aadpodidentityuserdefinedmanagedidentityname')]", "location": "[parameters('location')]"}
Creates and optionally secures a Key Vault with logging linked to a storage account.
{"type": "microsoft.keyvault/vaults", "apiversion": "2019-09-01", "name": "[parameters('keyvaultname')]", "location": "[parameters('location')]", "dependson": ["[variables('applicationgatewayuserdefinedmanagedidentityid')]", "[variables('aadpodidentityuserdefinedmanagedidentityid')]"], "properties": {"accesspolicies": [{"tenantid": "[reference(variables('applicationgatewayuserdefinedmanagedidentityid')).tenantid]", "objectid": "[reference(variables('applicationgatewayuserdefinedmanagedidentityid')).principalid]", "permissions": {"secrets": ["get", "list"], "certificates": ["get"]}}, {"tenantid": "[reference(variables('aadpodidentityuserdefinedmanagedidentityid')).tenantid]", "objectid": "[reference(variables('aadpodidentityuserdefinedmanagedidentityid')).principalid]", "permissions": {"secrets": ["get", "list"], "certificates": ["get"]}}], "sku": {"family": "a", "name": "standard"}, "tenantid": "[subscription().tenantid]", "networkacls": {"bypass": "azureservices", "defaultaction": "[parameters('keyvaultnetworkrulesetdefaultaction')]"}, "enabledfordeployment": false, "enabledfordiskencryption": false, "enabledfortemplatedeployment": false, "enablesoftdelete": false}, "resources": [{"name": "microsoft.insights/default", "type": "providers/diagnosticsettings", "apiversion": "2017-05-01-preview", "dependson": ["[variables('keyvaultid')]", "[variables('workspaceid')]"], "properties": {"workspaceid": "[variables('workspaceid')]", "logs": [{"category": "auditevent", "enabled": true}], "metrics": [{"category": "allmetrics", "enabled": true}]}}, {"comments": "grant the aks cluster ingress controller pod managed identity with reader role permissions over key vault; paired with the access policy, this allows our ingress controller to pull certificates.", "type": "providers/roleassignments", "apiversion": "2020-04-01-preview", "name": "[concat('microsoft.authorization/", guid(concat(resourcegroup().id), variables('readerroleid')))]", "dependson": ["[variables('keyvaultid')]", "[variables('aadpodidentityuserdefinedmanagedidentityid')]"], "properties": {"roledefinitionid": "[variables('readerroleid')]", "principalid": "[reference(variables('aadpodidentityuserdefinedmanagedidentityid')).principalid]", "principaltype": "serviceprincipal"}}]}
A template for creating a new Azure Container Registry. Use this template as the framework for your custom deployment.
{"comments": "container registry for storing docker images", "name": "[parameters('acrname')]", "type": "microsoft.containerregistry/registries", "apiversion": "2019-12-01-preview", "location": "[parameters('location')]", "dependson": ["[variables('acrprivatednszoneid')]"], "tags": {"displayname": "container registry", "container.registry": "[parameters('acrname')]"}, "sku": {"name": "[parameters('acrsku')]", "tier": "[parameters('acrsku')]"}, "properties": {"adminuserenabled": "[parameters('acradminuserenabled')]", "networkruleset": {"defaultaction": "[parameters('acrnetworkrulesetdefaultaction')]"}, "policies": {"quarantinepolicy": {"status": "disabled"}, "trustpolicy": {"type": "notary", "status": "disabled"}, "retentionpolicy": {"days": 15, "status": "enabled"}}, "publicnetworkaccess": "[parameters('acrpublicnetworkaccess')]", "encryption": {"status": "disabled"}, "dataendpointenabled": true, "networkrulebypassoptions": "azureservices"}, "resources": [{"type": "providers/roleassignments", "apiversion": "2020-04-01-preview", "name": "[variables('acrpullroleassignmentname')]", "dependson": ["[variables('aksclusterid')]", "[variables('acrid')]"], "properties": {"roledefinitionid": "[variables('acrpullroleid')]", "principalid": "[reference(variables('aksclusterid'), "2020-12-01", "full').properties.identityprofile.kubeletidentity.objectid]", "principaltype": "serviceprincipal"}}, {"type": "providers/diagnosticsettings", "apiversion": "2017-05-01-preview", "name": "microsoft.insights/default", "dependson": ["[variables('acrid')]", "[variables('workspaceid')]"], "properties": {"workspaceid": "[variables('workspaceid')]", "metrics": [{"timegrain": "pt1m", "category": "allmetrics", "enabled": true}], "logs": [{"category": "containerregistryrepositoryevents", "enabled": true}, {"category": "containerregistryloginevents", "enabled": true}]}}]}
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": "2017-04-01", "scope": "[format('microsoft.network/routetables/{0}", parameters('routetablename'))]", "name": "[variables('lockname')]", "properties": {"level": "cannotdelete"}, "dependson": ["[resourceid('microsoft.network/routetables", parameters('routetablename'))]"]}
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.network/virtualnetworks/{0}", parameters('vnetname'))]", "name": "[variables('diagnosticsname')]", "properties": {"workspaceid": "[if(empty(parameters('loganalyticsworkspaceid')), null(), parameters('loganalyticsworkspaceid'))]", "storageaccountid": "[if(empty(parameters('diagnosticstorageaccountid')), null(), parameters('diagnosticstorageaccountid'))]", "logs": [{"category": "vmprotectionalerts", "enabled": true}], "metrics": [{"category": "allmetrics", "enabled": true}]}, "dependson": ["[resourceid('microsoft.network/virtualnetworks", parameters('vnetname'))]"]}
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": "2017-04-01", "scope": "[format('microsoft.network/virtualnetworks/{0}", parameters('vnetname'))]", "name": "[variables('lockname')]", "properties": {"level": "cannotdelete"}, "dependson": ["[resourceid('microsoft.network/virtualnetworks", parameters('vnetname'))]"]}
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')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces", variables('networkinterfacename'))]"], "tags": {"displayname": "[variables('vmname')]"}, "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmname')]", "adminusername": "[parameters('vmadminusername')]", "adminpassword": "[parameters('vmadminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "microsoftwindowsserver", "offer": "windowsserver", "sku": "2019-datacenter", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'),"osdisk')]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "[variables('osdisktype')]"}, "disksizegb": 128}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('networkinterfacename'))]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "apiversion": "2020-06-01", "name": "[concat(variables('vmname'),"/installcustomscript')]", "location": "[parameters('location')]", "tags": {"displayname": "install software for windows vm"}, "dependson": ["[resourceid('microsoft.compute/virtualmachines", variables('vmname'))]"], "properties": {"publisher": "microsoft.compute", "type": "customscriptextension", "typehandlerversion": "1.9", "autoupgrademinorversion": true, "protectedsettings": {"commandtoexecute": "powershell -executionpolicy unrestricted install-windowsfeature -name web-server"}}}
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')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces", variables('networkinterfacename'))]"], "tags": {"displayname": "[variables('vmname')]"}, "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmname')]", "adminusername": "[parameters('vmadminusername')]", "adminpassword": "[parameters('vmadminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "microsoftwindowsserver", "offer": "windowsserver", "sku": "2019-datacenter", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'),"osdisk')]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "[variables('osdisktype')]"}, "disksizegb": 128}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('networkinterfacename'))]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "apiversion": "2020-06-01", "name": "[concat(variables('vmname'),"/installcustomscript')]", "location": "[parameters('location')]", "tags": {"displayname": "install software for windows vm"}, "dependson": ["[resourceid('microsoft.compute/virtualmachines", variables('vmname'))]"], "properties": {"publisher": "microsoft.compute", "type": "customscriptextension", "typehandlerversion": "1.9", "autoupgrademinorversion": true, "protectedsettings": {"commandtoexecute": "powershell -executionpolicy unrestricted install-windowsfeature -name web-server"}}}
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')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces", variables('networkinterfacename'))]"], "tags": {"displayname": "[variables('vmname')]"}, "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmname')]", "adminusername": "[parameters('vmadminusername')]", "adminpassword": "[parameters('vmadminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "microsoftwindowsserver", "offer": "windowsserver", "sku": "2019-datacenter", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'),"osdisk')]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "[variables('osdisktype')]"}, "disksizegb": 128}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('networkinterfacename'))]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "apiversion": "2020-06-01", "name": "[concat(variables('vmname'),"/installcustomscript')]", "location": "[parameters('location')]", "tags": {"displayname": "install software for windows vm"}, "dependson": ["[resourceid('microsoft.compute/virtualmachines", variables('vmname'))]"], "properties": {"publisher": "microsoft.compute", "type": "customscriptextension", "typehandlerversion": "1.9", "autoupgrademinorversion": true, "protectedsettings": {"commandtoexecute": "powershell -executionpolicy unrestricted install-windowsfeature -name web-server"}}}{"type": "microsoft.compute/virtualmachines", "apiversion": "2020-06-01", "name": "[variables('vmconsumername')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces", variables('networkinterfaceconsumername'))]"], "tags": {"displayname": "[variables('vmconsumername')]"}, "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmconsumername')]", "adminusername": "[parameters('vmadminusername')]", "adminpassword": "[parameters('vmadminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "microsoftwindowsserver", "offer": "windowsserver", "sku": "2019-datacenter", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmconsumername'),"osdisk')]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "[variables('osdisktype')]"}, "disksizegb": 128}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('networkinterfaceconsumername'))]"}]}}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"comments": "availability set for the web servers", "type": "microsoft.compute/availabilitysets", "sku": {"name": "aligned"}, "name": "[variables('webavailabilitysetname')]", "apiversion": "2020-12-01", "location": "[parameters('location')]", "properties": {"platformupdatedomaincount": 5, "platformfaultdomaincount": 2, "virtualmachines": [{"id": "[resourceid('microsoft.compute/virtualmachines", variables('vm1name'))]"}, {"id": "[resourceid('microsoft.compute/virtualmachines", variables('vm2name'))]"}]}, "dependson": ["[resourceid('microsoft.compute/virtualmachines", variables('vm1name'))]", "[resourceid('microsoft.compute/virtualmachines", variables('vm2name'))]"]}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"comments": "availability set for the web servers", "type": "microsoft.compute/availabilitysets", "sku": {"name": "aligned"}, "name": "[variables('webavailabilitysetname')]", "apiversion": "2020-12-01", "location": "[parameters('location')]", "properties": {"platformupdatedomaincount": 5, "platformfaultdomaincount": 2, "virtualmachines": [{"id": "[resourceid('microsoft.compute/virtualmachines", variables('vm1name'))]"}, {"id": "[resourceid('microsoft.compute/virtualmachines", variables('vm2name'))]"}]}, "dependson": ["[resourceid('microsoft.compute/virtualmachines", variables('vm1name'))]", "[resourceid('microsoft.compute/virtualmachines", variables('vm2name'))]"]}{"apiversion": "2016-04-30-preview", "type": "microsoft.compute/virtualmachines", "name": "[variables('vm1name')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces/", variables('vm1nicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[variables('vmsize')]"}, "osprofile": {"computername": "[variables('vm1name')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[parameters('windowsosversion')]", "version": "latest"}, "osdisk": {"name": "[variables('vm1name')]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "standardssd_lrs"}}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('vm1nicname'))]"}]}}, "resources": [{"name": "microsoft.powershell.dsc", "type": "extensions", "location": "[parameters('location')]", "apiversion": "2016-04-30-preview", "dependson": ["[resourceid('microsoft.compute/virtualmachines", variables('vm1name'))]"], "properties": {"publisher": "microsoft.powershell", "type": "dsc", "typehandlerversion": "2.9", "autoupgrademinorversion": true, "forceupdatetag": "1.0", "settings": {"configuration": {"url": "[variables('dsczipfullpath')]", "script": "iisinstall.ps1", "function": "installiis"}, "configurationarguments": {"nodename": "[variables('vm1name')]", "vmnumber": "vm1", "backendcert": "[parameters('backendcertdata')]", "backendcertpw": "[parameters('backendcertpassword')]", "backendcertdnsname": "[parameters('backendcertdnsname')]", "webconfigpath": "[variables('webconfigfullpath')]", "defaulthtmpath": "[variables('vm1defaulthtmfullpath')]"}}}}]}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"comments": "availability set for the web servers", "type": "microsoft.compute/availabilitysets", "sku": {"name": "aligned"}, "name": "[variables('webavailabilitysetname')]", "apiversion": "2020-12-01", "location": "[parameters('location')]", "properties": {"platformupdatedomaincount": 5, "platformfaultdomaincount": 2, "virtualmachines": [{"id": "[resourceid('microsoft.compute/virtualmachines", variables('vm1name'))]"}, {"id": "[resourceid('microsoft.compute/virtualmachines", variables('vm2name'))]"}]}, "dependson": ["[resourceid('microsoft.compute/virtualmachines", variables('vm1name'))]", "[resourceid('microsoft.compute/virtualmachines", variables('vm2name'))]"]}{"apiversion": "2016-04-30-preview", "type": "microsoft.compute/virtualmachines", "name": "[variables('vm1name')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces/", variables('vm1nicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[variables('vmsize')]"}, "osprofile": {"computername": "[variables('vm1name')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[parameters('windowsosversion')]", "version": "latest"}, "osdisk": {"name": "[variables('vm1name')]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "standardssd_lrs"}}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('vm1nicname'))]"}]}}, "resources": [{"name": "microsoft.powershell.dsc", "type": "extensions", "location": "[parameters('location')]", "apiversion": "2016-04-30-preview", "dependson": ["[resourceid('microsoft.compute/virtualmachines", variables('vm1name'))]"], "properties": {"publisher": "microsoft.powershell", "type": "dsc", "typehandlerversion": "2.9", "autoupgrademinorversion": true, "forceupdatetag": "1.0", "settings": {"configuration": {"url": "[variables('dsczipfullpath')]", "script": "iisinstall.ps1", "function": "installiis"}, "configurationarguments": {"nodename": "[variables('vm1name')]", "vmnumber": "vm1", "backendcert": "[parameters('backendcertdata')]", "backendcertpw": "[parameters('backendcertpassword')]", "backendcertdnsname": "[parameters('backendcertdnsname')]", "webconfigpath": "[variables('webconfigfullpath')]", "defaulthtmpath": "[variables('vm1defaulthtmfullpath')]"}}}}]}{"apiversion": "2016-04-30-preview", "type": "microsoft.compute/virtualmachines", "name": "[variables('vm2name')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces/", variables('vm2nicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[variables('vmsize')]"}, "osprofile": {"computername": "[variables('vm2name')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[parameters('windowsosversion')]", "version": "latest"}, "osdisk": {"name": "[variables('vm2name')]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "standardssd_lrs"}}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('vm2nicname'))]"}]}}, "resources": [{"name": "microsoft.powershell.dsc", "type": "extensions", "location": "[parameters('location')]", "apiversion": "2016-04-30-preview", "dependson": ["[resourceid('microsoft.compute/virtualmachines", variables('vm2name'))]"], "properties": {"publisher": "microsoft.powershell", "type": "dsc", "typehandlerversion": "2.9", "autoupgrademinorversion": true, "forceupdatetag": "1.0", "settings": {"configuration": {"url": "[variables('dsczipfullpath')]", "script": "iisinstall.ps1", "function": "installiis"}, "configurationarguments": {"nodename": "[variables('vm2name')]", "vmnumber": "vm2", "backendcert": "[parameters('backendcertdata')]", "backendcertpw": "[parameters('backendcertpassword')]", "backendcertdnsname": "[parameters('backendcertdnsname')]", "webconfigpath": "[variables('webconfigfullpath')]", "defaulthtmpath": "[variables('vm2defaulthtmfullpath')]"}}}}]}
Create a VM from a Windows Image with 4 Empty Data Disks
{"comments": "availability set for the web servers", "type": "microsoft.compute/availabilitysets", "sku": {"name": "aligned"}, "name": "[variables('webavailabilitysetname')]", "apiversion": "2020-12-01", "location": "[parameters('location')]", "properties": {"platformupdatedomaincount": 5, "platformfaultdomaincount": 2, "virtualmachines": [{"id": "[resourceid('microsoft.compute/virtualmachines", variables('vm1name'))]"}, {"id": "[resourceid('microsoft.compute/virtualmachines", variables('vm2name'))]"}]}, "dependson": ["[resourceid('microsoft.compute/virtualmachines", variables('vm1name'))]", "[resourceid('microsoft.compute/virtualmachines", variables('vm2name'))]"]}
Create a VM from a Windows Image with 4 Empty Data Disks
{"comments": "availability set for the web servers", "type": "microsoft.compute/availabilitysets", "sku": {"name": "aligned"}, "name": "[variables('webavailabilitysetname')]", "apiversion": "2020-12-01", "location": "[parameters('location')]", "properties": {"platformupdatedomaincount": 5, "platformfaultdomaincount": 2, "virtualmachines": [{"id": "[resourceid('microsoft.compute/virtualmachines", variables('vm1name'))]"}, {"id": "[resourceid('microsoft.compute/virtualmachines", variables('vm2name'))]"}]}, "dependson": ["[resourceid('microsoft.compute/virtualmachines", variables('vm1name'))]", "[resourceid('microsoft.compute/virtualmachines", variables('vm2name'))]"]}{"apiversion": "2016-04-30-preview", "type": "microsoft.compute/virtualmachines", "name": "[variables('vm1name')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces/", variables('vm1nicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[variables('vmsize')]"}, "osprofile": {"computername": "[variables('vm1name')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[parameters('windowsosversion')]", "version": "latest"}, "osdisk": {"name": "[variables('vm1name')]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "standardssd_lrs"}}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('vm1nicname'))]"}]}}, "resources": [{"name": "microsoft.powershell.dsc", "type": "extensions", "location": "[parameters('location')]", "apiversion": "2016-04-30-preview", "dependson": ["[resourceid('microsoft.compute/virtualmachines", variables('vm1name'))]"], "properties": {"publisher": "microsoft.powershell", "type": "dsc", "typehandlerversion": "2.9", "autoupgrademinorversion": true, "forceupdatetag": "1.0", "settings": {"configuration": {"url": "[variables('dsczipfullpath')]", "script": "iisinstall.ps1", "function": "installiis"}, "configurationarguments": {"nodename": "[variables('vm1name')]", "vmnumber": "vm1", "backendcert": "[parameters('backendcertdata')]", "backendcertpw": "[parameters('backendcertpassword')]", "backendcertdnsname": "[parameters('backendcertdnsname')]", "webconfigpath": "[variables('webconfigfullpath')]", "defaulthtmpath": "[variables('vm1defaulthtmfullpath')]"}}}}]}
Create a VM from a Windows Image with 4 Empty Data Disks
{"comments": "availability set for the web servers", "type": "microsoft.compute/availabilitysets", "sku": {"name": "aligned"}, "name": "[variables('webavailabilitysetname')]", "apiversion": "2020-12-01", "location": "[parameters('location')]", "properties": {"platformupdatedomaincount": 5, "platformfaultdomaincount": 2, "virtualmachines": [{"id": "[resourceid('microsoft.compute/virtualmachines", variables('vm1name'))]"}, {"id": "[resourceid('microsoft.compute/virtualmachines", variables('vm2name'))]"}]}, "dependson": ["[resourceid('microsoft.compute/virtualmachines", variables('vm1name'))]", "[resourceid('microsoft.compute/virtualmachines", variables('vm2name'))]"]}{"apiversion": "2016-04-30-preview", "type": "microsoft.compute/virtualmachines", "name": "[variables('vm1name')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces/", variables('vm1nicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[variables('vmsize')]"}, "osprofile": {"computername": "[variables('vm1name')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[parameters('windowsosversion')]", "version": "latest"}, "osdisk": {"name": "[variables('vm1name')]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "standardssd_lrs"}}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('vm1nicname'))]"}]}}, "resources": [{"name": "microsoft.powershell.dsc", "type": "extensions", "location": "[parameters('location')]", "apiversion": "2016-04-30-preview", "dependson": ["[resourceid('microsoft.compute/virtualmachines", variables('vm1name'))]"], "properties": {"publisher": "microsoft.powershell", "type": "dsc", "typehandlerversion": "2.9", "autoupgrademinorversion": true, "forceupdatetag": "1.0", "settings": {"configuration": {"url": "[variables('dsczipfullpath')]", "script": "iisinstall.ps1", "function": "installiis"}, "configurationarguments": {"nodename": "[variables('vm1name')]", "vmnumber": "vm1", "backendcert": "[parameters('backendcertdata')]", "backendcertpw": "[parameters('backendcertpassword')]", "backendcertdnsname": "[parameters('backendcertdnsname')]", "webconfigpath": "[variables('webconfigfullpath')]", "defaulthtmpath": "[variables('vm1defaulthtmfullpath')]"}}}}]}{"apiversion": "2016-04-30-preview", "type": "microsoft.compute/virtualmachines", "name": "[variables('vm2name')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces/", variables('vm2nicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[variables('vmsize')]"}, "osprofile": {"computername": "[variables('vm2name')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[parameters('windowsosversion')]", "version": "latest"}, "osdisk": {"name": "[variables('vm2name')]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "standardssd_lrs"}}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('vm2nicname'))]"}]}}, "resources": [{"name": "microsoft.powershell.dsc", "type": "extensions", "location": "[parameters('location')]", "apiversion": "2016-04-30-preview", "dependson": ["[resourceid('microsoft.compute/virtualmachines", variables('vm2name'))]"], "properties": {"publisher": "microsoft.powershell", "type": "dsc", "typehandlerversion": "2.9", "autoupgrademinorversion": true, "forceupdatetag": "1.0", "settings": {"configuration": {"url": "[variables('dsczipfullpath')]", "script": "iisinstall.ps1", "function": "installiis"}, "configurationarguments": {"nodename": "[variables('vm2name')]", "vmnumber": "vm2", "backendcert": "[parameters('backendcertdata')]", "backendcertpw": "[parameters('backendcertpassword')]", "backendcertdnsname": "[parameters('backendcertdnsname')]", "webconfigpath": "[variables('webconfigfullpath')]", "defaulthtmpath": "[variables('vm2defaulthtmfullpath')]"}}}}]}