Description
stringlengths
21
195
IaC
stringlengths
201
6.84k
Enable Azure Sentinel
{"name": "[variables('omssolutions').customsolution.solutionname]", "type": "microsoft.operationsmanagement/solutions", "apiversion": "2015-11-01-preview", "location": "[parameters('workspaceregionid')]", "dependson": ["[resourceid('microsoft.operationalinsights/workspaces/", parameters('workspacename'))]", "[resourceid('microsoft.operationalinsights/workspaces/views/", parameters('workspacename'), variables('omssolutions').customsolution.name)]"], "plan": {"name": "[variables('omssolutions').customsolution.solutionname]", "product": "[variables('omssolutions').customsolution.name]", "publisher": "[variables('omssolutions').customsolution.publisher]", "promotioncode": ""}, "properties": {"workspaceresourceid": "[resourceid('microsoft.operationalinsights/workspaces/", parameters('workspacename'))]", "containedresources": ["[resourceid('microsoft.operationalinsights/workspaces/views/", parameters('workspacename'), variables('omssolutions').customsolution.name)]"]}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"type": "microsoft.compute/virtualmachinescalesets", "apiversion": "2019-03-01", "name": "[parameters('vmssname')]", "location": "[parameters('location')]", "tags": {"vmsstag": "automaticrepairs"}, "dependson": ["[resourceid('microsoft.network/loadbalancers/", variables('lbname'))]", "[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]"], "sku": {"name": "[parameters('vmsku')]", "tier": "standard", "capacity": "[parameters('instancecount')]"}, "properties": {"upgradepolicy": {"mode": "manual"}, "automaticrepairspolicy": {"enabled": true, "graceperiod": "pt30m"}, "virtualmachineprofile": {"storageprofile": {"imagereference": "[variables('imagereference')]"}, "osprofile": {"computernameprefix": "vmss", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "extensionprofile": {"extensions": [{"name": "customscripttoinstallapache", "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"fileuris": ["[uri(parameters('_artifactslocation'), concat('install_apache.sh", parameters('_artifactslocationsastoken')))]"], "commandtoexecute": "sh install_apache.sh"}}}]}, "networkprofile": {"healthprobe": {"id": "[resourceid('microsoft.network/loadbalancers/probes/", variables('lbname'), variables('probename'))]"}, "networkinterfaceconfigurations": [{"name": "nic1", "properties": {"primary": true, "ipconfigurations": [{"name": "ip1", "properties": {"subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('virtualnetworkname'), variables('subnetname'))]"}, "loadbalancerbackendaddresspools": [{"id": "[variables('bepoolid')]"}], "publicipaddressconfiguration": {"name": "pub1", "properties": {"idletimeoutinminutes": 15}}}}]}}]}}}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"type": "microsoft.compute/virtualmachines", "apiversion": "2020-06-01", "name": "[variables('vmname')]", "location": "[parameters('location')]", "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "microsoftwindowsserver", "offer": "windowsserver", "sku": "[parameters('windowsosversion')]", "version": "latest"}, "osdisk": {"createoption": "fromimage"}, "datadisks": [{"disksizegb": 1023, "lun": 0, "createoption": "empty"}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('networkinterfacename'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(resourceid('microsoft.storage/storageaccounts", variables('storageaccountname'))).primaryendpoints.blob]"}}}, "dependson": ["[resourceid('microsoft.network/networkinterfaces", variables('networkinterfacename'))]", "[resourceid('microsoft.storage/storageaccounts", variables('storageaccountname'))]"]}
Create a VM from a Windows Image with 4 Empty Data Disks
{"name": "[variables('chefbeavailname')]", "type": "microsoft.compute/availabilitysets", "location": "[resourcegroup().location]", "apiversion": "2017-12-01", "dependson": [], "tags": {"displayname": "beavailset", "provider": "[variables('tagvalues').provider]"}, "sku": {"name": "aligned"}, "properties": {"platformupdatedomaincount": 3, "platformfaultdomaincount": 3}}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"type": "microsoft.storage/storageaccounts", "apiversion": "2019-06-01", "name": "[parameters('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs", "tier": "standard"}, "kind": "storagev2", "properties": {"accesstier": "hot"}}{"type": "microsoft.storage/storageaccounts/fileservices/shares", "apiversion": "2019-06-01", "name": "[concat(parameters('storageaccountname'), "/default/", parameters('filesharename'))]", "dependson": ["[resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname'))]"]}
This template uses Azure Managed Identity to assign access to Azure Maps. See more at https://aka.ms/amauth
{"type": "microsoft.authorization/roleassignments", "apiversion": "2020-04-01-preview", "scope": "[format('microsoft.network/networkprofiles/{0}", variables('networkprofilename'))]", "name": "[guid(variables('networkroledefinitionid'), parameters('azurecontainerinstanceoid'), variables('networkprofilename'))]", "properties": {"roledefinitionid": "[variables('networkroledefinitionid')]", "principalid": "[parameters('azurecontainerinstanceoid')]"}, "dependson": ["[resourceid('microsoft.network/networkprofiles", variables('networkprofilename'))]"]}{"type": "microsoft.authorization/roleassignments", "apiversion": "2020-04-01-preview", "scope": "[format('microsoft.relay/namespaces/{0}", parameters('relaynamespacename'))]", "name": "[guid(variables('contributorroledefinitionid'), parameters('azurecontainerinstanceoid'), parameters('relaynamespacename'))]", "properties": {"roledefinitionid": "[variables('contributorroledefinitionid')]", "principalid": "[parameters('azurecontainerinstanceoid')]"}, "dependson": ["[resourceid('microsoft.relay/namespaces", parameters('relaynamespacename'))]"]}
Create a VM from a Windows Image with 4 Empty Data Disks
{"apiversion": "2017-03-30", "type": "microsoft.compute/availabilitysets", "location": "[parameters('location')]", "name": "[parameters('gw-availabilityset')]", "properties": {"platformupdatedomaincount": 20, "platformfaultdomaincount": 2}, "sku": {"name": "aligned"}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-07-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[parameters('dnslabelprefix')]"}}}{"apiversion": "2020-07-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('frontendnsgname')]", "location": "[parameters('location')]", "tags": {"displayname": "custom network security group"}, "properties": {"securityrules": [{"name": "default-allow-ssh", "properties": {"description": "allow ssh", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "22", "sourceaddressprefix": "internet", "destinationaddressprefix": "*", "access": "allow", "priority": 1000, "direction": "inbound"}}, {"name": "default-allow-tomcat", "properties": {"description": "allow web/tomcat", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "80", "sourceaddressprefix": "internet", "destinationaddressprefix": "*", "access": "allow", "priority": 1010, "direction": "inbound"}}, {"name": "default-allow-ftp", "properties": {"description": "allow ftp", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "21", "sourceaddressprefix": "internet", "destinationaddressprefix": "*", "access": "allow", "priority": 1020, "direction": "inbound"}}, {"name": "default-allow-ftps", "properties": {"description": "allow ftps", "protocol": "*", "sourceportrange": "*", "destinationportrange": "13450-13454", "sourceaddressprefix": "internet", "destinationaddressprefix": "*", "access": "allow", "priority": 1030, "direction": "inbound"}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups/", variables('frontendnsgname'))]"], "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnet1name')]", "properties": {"addressprefix": "[variables('subnet1prefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('frontendnsgname'))]"}}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/networkinterfaces", "name": "[variables('nicname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/publicipaddresses/", variables('publicipaddressname'))]", "[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]", "[resourceid('microsoft.network/networksecuritygroups/", variables('frontendnsgname'))]"], "properties": {"networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('frontendnsgname'))]"}, "ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('publicipaddressname'))]"}, "subnet": {"id": "[variables('subnet1ref')]"}}}]}}
This module creates a key resource in an existing KeyVault with apiVersion 2019-09-01.
{"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": [{"type": "providers/diagnosticsettings", "apiversion": "2017-05-01-preview", "name": "microsoft.insights/default", "dependson": ["[variables('keyvaultid')]", "[variables('workspaceid')]"], "properties": {"workspaceid": "[variables('workspaceid')]", "logs": [{"category": "auditevent", "enabled": true}], "metrics": [{"category": "allmetrics", "enabled": true}]}}]}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2020-12-01", "type": "microsoft.compute/virtualmachines", "name": "[variables('vmname')]", "location": "[parameters('location')]", "dependson": ["[variables('nicname')]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "microsoftwindowsserver", "offer": "windowsserver", "sku": "2016-datacenter", "version": "latest"}, "osdisk": {"createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}}, "resources": [{"type": "extensions", "name": "customscriptextension", "apiversion": "2020-12-01", "location": "[parameters('location')]", "dependson": ["[variables('vmname')]"], "properties": {"publisher": "microsoft.compute", "type": "customscriptextension", "typehandlerversion": "1.8", "autoupgrademinorversion": true, "settings": {"fileuris": ["[uri(parameters('_artifactslocation'), concat(variables('scriptfolder'),"/",variables('scriptfilename'), parameters('_artifactslocationsastoken')))]"], "commandtoexecute": "[concat('powershell -executionpolicy unrestricted -file ", variables('scriptfolder'), "/", variables('scriptfilename'), " ", variables('scriptparameters'))]"}}}]}
Create a VM from a Windows Image with 4 Empty Data Disks
{"apiversion": "2016-04-30-preview", "type": "microsoft.compute/virtualmachines", "name": "[variables('vmname')]", "location": "[parameters('location')]", "dependson": ["[variables('storageaccountname')]", "[variables('nicname')]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[variables('osversion')]", "version": "latest"}, "osdisk": {"caching": "readwrite", "createoption": "fromimage"}, "datadisks": [{"disksizegb": "[parameters('disksizegb')]", "lun": 0, "caching": "[parameters('datadiskhostcaching')]", "createoption": "empty"}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('nicname'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('storageaccountname'), "2021-01-01').primaryendpoints.blob]"}}}, "resources": [{"type": "extensions", "name": "customscriptextension", "apiversion": "2015-06-15", "dependson": ["[variables('vmname')]"], "location": "[parameters('location')]", "properties": {"publisher": "microsoft.ostcextensions", "type": "customscriptforlinux", "typehandlerversion": "1.5", "autoupgrademinorversion": true, "settings": {"fileuris": ["[uri(parameters('_artifactslocation'), concat(variables('scriptfolder'), "/", variables('testscriptfilename'), parameters('_artifactslocationsastoken')))]"], "commandtoexecute": "[concat('sudo bash ", variables('testscriptfilename'), " ", parameters('testsize'), " ", parameters('testtype'), " ", parameters('secondstoruntest'), " ", parameters('threadstoruntest'), " ", parameters('testblocksize'))]"}}}]}
Storage Account with Storage Service Encryption and a blob deletion retention policy
{"apiversion": "2021-01-01", "type": "microsoft.storage/storageaccounts", "name": "[variables('newstorageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "[variables('storageaccounttype')]"}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2015-06-15", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic"}}{"apiversion": "2015-06-15", "type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "[variables('subnetprefix')]"}}]}}{"apiversion": "2017-06-01", "name": "[variables('applicationgatewayname')]", "type": "microsoft.network/applicationgateways", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]", "[resourceid('microsoft.network/publicipaddresses/", variables('publicipaddressname'))]", "webserver1", "webserver2"], "properties": {"sku": {"name": "[parameters('size')]", "tier": "standard", "capacity": "[parameters('capacity')]"}, "gatewayipconfigurations": [{"name": "appgatewayipconfig", "properties": {"subnet": {"id": "[variables('subnetref')]"}}}], "frontendipconfigurations": [{"name": "appgatewayfrontendip", "properties": {"publicipaddress": {"id": "[variables('publicipref')]"}}}], "frontendports": [{"name": "appgatewayfrontendport", "properties": {"port": 80}}], "backendaddresspools": [{"name": "appgatewaybackendpool", "properties": {"backendaddresses": [{"ipaddress": "[reference('webserver1').outputs.fqdn.value]"}, {"ipaddress": "[reference('webserver2').outputs.fqdn.value]"}]}}], "backendhttpsettingscollection": [{"name": "appgatewaybackendhttpsettings", "properties": {"port": 80, "protocol": "http", "cookiebasedaffinity": "[parameters('cookiebasedaffinity')]", "requesttimeout": 30, "requestroutingrules": [{"id": "[resourceid('microsoft.network/applicationgateways/requestroutingrules/",variables('applicationgatewayname'), "rule1')]"}]}}], "httplisteners": [{"name": "appgatewayhttplistener", "properties": {"frontendipconfiguration": {"id": "[resourceid('microsoft.network/applicationgateways/frontendipconfigurations/",variables('applicationgatewayname'), "appgatewayfrontendip')]"}, "frontendport": {"id": "[resourceid('microsoft.network/applicationgateways/frontendports/",variables('applicationgatewayname'), "appgatewayfrontendport')]"}, "protocol": "http"}}], "requestroutingrules": [{"name": "rule1", "properties": {"ruletype": "basic", "httplistener": {"id": "[resourceid('microsoft.network/applicationgateways/httplisteners/",variables('applicationgatewayname'), "appgatewayhttplistener')]"}, "backendaddresspool": {"id": "[resourceid('microsoft.network/applicationgateways/backendaddresspools/",variables('applicationgatewayname'), "appgatewaybackendpool')]"}, "backendhttpsettings": {"id": "[resourceid('microsoft.network/applicationgateways/backendhttpsettingscollection/",variables('applicationgatewayname'), "appgatewaybackendhttpsettings')]"}}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-08-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic"}}{"comments": "default network security group for template", "type": "microsoft.network/networksecuritygroups", "apiversion": "2020-08-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "default-allow-3389", "properties": {"priority": 1000, "access": "allow", "direction": "inbound", "destinationportrange": "3389", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/publicipaddresses", "apiversion": "2020-05-01", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic", "dnssettings": {"domainnamelabel": "[parameters('domainnamelabel')]"}}}{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-05-01", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "[variables('subnetprefix')]"}}]}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"type": "microsoft.compute/availabilitysets", "name": "[variables('avsetnameascs')]", "apiversion": "2020-06-01", "location": "[parameters('location')]", "sku": {"name": "aligned"}, "condition": "[equals(length(parameters('availabilityzones')), 0)]", "properties": {"platformfaultdomaincount": 2, "platformupdatedomaincount": 10}}{"type": "microsoft.compute/virtualmachines", "name": "[concat(variables('vmnameascs'), "-", copyindex())]", "copy": {"name": "xscsvmloop", "count": "[variables('ascsvmcount')]"}, "dependson": ["nicascsloop", "[resourceid('microsoft.compute/availabilitysets", variables('avsetnameascs'))]"], "apiversion": "2020-06-01", "location": "[parameters('location')]", "zones": "[if(equals(length(parameters('availabilityzones')), 0), json('null'), array(variables('azarray')[mod(copyindex(), variables('azarraylength'))]))]", "properties": {"availabilityset": "[if(equals(variables('azarraylength'), 0), resourceid('microsoft.compute/availabilitysets", variables('avsetnameascs')), json('null'))]", "hardwareprofile": {"vmsize": "[variables('ascsvmsize')]"}, "osprofile": {"computername": "[concat(variables('vmnameascs'), "-", copyindex())]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[variables('images')[parameters('ostype')].publisher]", "offer": "[variables('images')[parameters('ostype')].offer]", "sku": "[variables('images')[parameters('ostype')].sku]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmnameascs'), "-", copyindex(), "-osdisk')]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "premium_lrs"}}, "datadisks": [{"lun": 0, "createoption": "empty", "disksizegb": 128}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", concat(variables('nicnameascs'), "-", copyindex()))]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(variables('vmnameascs'), "-", copyindex(), "/", variables('csextension')[variables('internalostype')].name)]", "apiversion": "2020-06-01", "location": "[parameters('location')]", "dependson": ["xscsvmloop"], "copy": {"name": "xscsextvmloop", "count": "[variables('ascsvmcount')]"}, "properties": {"publisher": "[variables('csextension')[variables('internalostype')].publisher]", "type": "[variables('csextension')[variables('internalostype')].name]", "typehandlerversion": "[variables('csextension')[variables('internalostype')].version]", "autoupgrademinorversion": true, "settings": {"fileuris": ["[variables('csextension')[variables('internalostype')].script]"], "commandtoexecute": "[concat(variables('csextension')[variables('internalostype')].scriptcall, " ", variables('scriptargumentsascsdi')[variables('internalostype')])]"}}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/networksecuritygroups", "name": "[concat(variables('nsgname'))]", "apiversion": "2020-07-01", "location": "[parameters('location')]", "condition": "[equals(length(parameters('subnetid')), 0)]", "properties": {"securityrules": "[variables('selectedsecurityrules')]"}}{"type": "microsoft.network/virtualnetworks", "name": "[variables('vnetname')]", "apiversion": "2020-07-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups/", variables('nsgname'))]"], "condition": "[equals(length(parameters('subnetid')), 0)]", "properties": {"addressspace": {"addressprefixes": ["10.0.0.0/16"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "10.0.0.0/24", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('nsgname'))]"}}}]}}{"type": "microsoft.network/publicipaddresses", "name": "[concat(variables('publicipnamedb'), "-", copyindex())]", "apiversion": "2020-07-01", "condition": "[equals(length(parameters('subnetid')), 0)]", "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('vnetname'))]"], "location": "[parameters('location')]", "copy": {"name": "dbpiploop", "count": "[variables('dbvmcount')]"}, "properties": {"publicipallocationmethod": "dynamic"}}{"type": "microsoft.network/loadbalancers", "name": "[variables('loadbalancernamedb')]", "apiversion": "2020-07-01", "location": "[parameters('location')]", "condition": "[greater(variables('dbvmcount') , 1)]", "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('vnetname'))]"], "properties": {"frontendipconfigurations": "[variables('lbfrontendconfigs')[parameters('dbtype')][variables('internalostype')]]", "backendaddresspools": "[variables('lbbackendpools')[parameters('dbtype')][variables('internalostype')]]", "loadbalancingrules": "[variables('lbrules')[parameters('dbtype')][variables('internalostype')]]", "probes": "[variables('lbprobes')[parameters('dbtype')][variables('internalostype')]]"}}{"type": "microsoft.network/networkinterfaces", "name": "[concat(variables('nicnamedb'), "-", copyindex())]", "apiversion": "2020-07-01", "copy": {"name": "dbnicloop", "count": "[variables('dbvmcount')]"}, "dependson": ["dbpiploop", "[resourceid('microsoft.network/virtualnetworks/", variables('vnetname'))]", "[resourceid('microsoft.network/loadbalancers/", variables('loadbalancernamedb'))]"], "location": "[parameters('location')]", "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": "[if(equals(length(parameters(\"subnetid\')), 0), json(concat(\"{"id": "\", resourceid(\"microsoft.network/publicipaddresses\", concat(variables(\"publicipnamedb\'), \"-\", copyindex())) ,\""}\')), json(\"null\'))]", "subnet": {"id": "[variables('selectedsubnetid')]"}, "loadbalancerbackendaddresspools": "[if(greater(variables('dbvmcount') , 1), variables('nicbackaddresspools')[parameters('dbtype')][variables('internalostype')], json('null'))]"}}], "enableacceleratednetworking": "[variables('sizes')[parameters('sapsystemsize')][parameters('dbtype')].usefastnetwork]"}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"name": "[concat(parameters('envprefixname'), "sqlsrv14')]", "type": "microsoft.compute/virtualmachines", "location": "[parameters('location')]", "apiversion": "2020-12-01", "dependson": ["[resourceid('microsoft.network/networkinterfaces/", variables('sqlsrvdbnicname'))]", "[resourceid('microsoft.network/publicipaddresses/", variables('sqlpublicip'))]"], "tags": {"displayname": "sql-svr-db"}, "properties": {"hardwareprofile": {"vmsize": "[variables('sqlvmsize')]"}, "osprofile": {"computername": "[variables('sqlsrvdbname')]", "adminusername": "[parameters('username')]", "adminpassword": "[parameters('password')]"}, "storageprofile": {"imagereference": {"publisher": "[variables('sqlimagepublisher')]", "offer": "[variables('sqlimageoffer')]", "sku": "[variables('sqlimagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(variables('sqlsrvdbname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "[parameters('disktype')]"}}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('sqlsrvdbnicname'))]"}]}}}{"apiversion": "2020-12-01", "type": "microsoft.compute/availabilitysets", "location": "[parameters('location')]", "name": "[variables('websrvavailabilitysetname')]", "properties": {"platformupdatedomaincount": 20, "platformfaultdomaincount": 2}, "tags": {"displayname": "websrvavailabilityset"}, "sku": {"name": "aligned"}}{"name": "[concat(variables('websrvname'), copyindex())]", "type": "microsoft.compute/virtualmachines", "location": "[parameters('location')]", "apiversion": "2020-12-01", "copy": {"name": "websrvmachineloop", "count": "[variables('websrvnumbofinstances')]"}, "dependson": ["[resourceid('microsoft.network/networkinterfaces/", concat(variables('websrvnicname'), copyindex()))]", "[resourceid('microsoft.compute/availabilitysets/", variables('websrvavailabilitysetname'))]"], "tags": {"displayname": "websrv"}, "properties": {"availabilityset": {"id": "[resourceid('microsoft.compute/availabilitysets",variables('websrvavailabilitysetname'))]"}, "hardwareprofile": {"vmsize": "[variables('websrvvmsize')]"}, "osprofile": {"computername": "[concat(variables('websrvname'),copyindex())]", "adminusername": "[parameters('username')]", "adminpassword": "[parameters('password')]"}, "storageprofile": {"imagereference": {"publisher": "microsoftwindowsserver", "offer": "windowsserver", "sku": "2012-r2-datacenter", "version": "latest"}, "osdisk": {"name": "[concat(concat(variables('websrvname'),copyindex(),"_osdisk'))]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "[parameters('disktype')]"}}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", concat(variables('websrvnicname'), copyindex()))]"}]}}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-07-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[parameters('vmdnsname')]"}}}{"comments": "default network security group for template", "type": "microsoft.network/networksecuritygroups", "apiversion": "2020-07-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "default-allow-22", "properties": {"priority": 1000, "access": "allow", "direction": "inbound", "destinationportrange": "22", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"], "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "[variables('subnetprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/networkinterfaces", "name": "[variables('nicname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/publicipaddresses/", variables('publicipaddressname'))]", "[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('publicipaddressname'))]"}, "subnet": {"id": "[variables('subnetref')]"}}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-07-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('apppublicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic", "dnssettings": {"domainnamelabel": "[parameters('dnslabelprefix')]"}}}{"apiversion": "2020-07-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('mysqlpublicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic"}}{"apiversion": "2020-07-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('mongopublicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic"}}{"apiversion": "2020-07-01", "type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[variables('nsgid')]"], "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "[variables('subnetprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups",variables('nsgname'))]"}}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('nsgname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "ssh", "properties": {"description": "ssh", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "22", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 200, "direction": "inbound"}}, {"name": "lms", "properties": {"description": "allow connection to open edx lms", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "80", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 201, "direction": "inbound"}}, {"name": "cms", "properties": {"description": "allow connection to open edx cms", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "18010", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 203, "direction": "inbound"}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/networkinterfaces", "name": "[concat(variables('appvmname'), copyindex(), "-nic')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]", "[resourceid('microsoft.network/loadbalancers/",variables('lbname'))]", "[resourceid('microsoft.network/loadbalancers/inboundnatrules",variables('lbname'),concat('ssh-vm", copyindex()))]"], "properties": {"ipconfigurations": [{"name": "ipconfignode", "properties": {"privateipallocationmethod": "dynamic", "subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('virtualnetworkname'), variables('subnetname'))]"}, "loadbalancerbackendaddresspools": [{"id": "[resourceid('microsoft.network/loadbalancers/backendaddresspools",variables('lbname'),"loadbalancerbackend')]"}], "loadbalancerinboundnatrules": [{"id": "[resourceid('microsoft.network/loadbalancers/inboundnatrules",variables('lbname'),concat('ssh-vm", copyindex()))]"}]}}]}, "copy": {"name": "appnetworkinterfacescopy", "count": "[parameters('appvmcount')]"}}{"apiversion": "2020-07-01", "type": "microsoft.network/networkinterfaces", "name": "[concat(variables('mysqlvmname'), "-nic')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/publicipaddresses/", variables('mysqlpublicipaddressname'))]", "[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfignode", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", variables('mysqlpublicipaddressname'))]"}, "subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('virtualnetworkname'), variables('subnetname'))]"}}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/networkinterfaces", "name": "[concat(variables('mongovmname'), "-nic')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/publicipaddresses/", variables('mongopublicipaddressname'))]", "[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfignode", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", variables('mongopublicipaddressname'))]"}, "subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('virtualnetworkname'), variables('subnetname'))]"}}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-07-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[parameters('dnsnameforpublicip')]"}}}{"comments": "default network security group for template", "type": "microsoft.network/networksecuritygroups", "apiversion": "2020-07-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "default-allow-22", "properties": {"priority": 1000, "access": "allow", "direction": "inbound", "destinationportrange": "22", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"], "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "[variables('subnetprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-07-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('apppublicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic", "dnssettings": {"domainnamelabel": "[parameters('dnslabelprefix')]"}}}{"apiversion": "2020-07-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('mysqlpublicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic"}}{"apiversion": "2020-07-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('mongopublicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic"}}{"apiversion": "2020-07-01", "type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[variables('nsgid')]"], "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "[variables('subnetprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups",variables('nsgname'))]"}}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('nsgname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "ssh", "properties": {"description": "ssh", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "22", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 200, "direction": "inbound"}}, {"name": "lms", "properties": {"description": "allow connection to open edx lms", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "80", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 201, "direction": "inbound"}}, {"name": "cms", "properties": {"description": "allow connection to open edx cms", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "18010", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 203, "direction": "inbound"}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/networkinterfaces", "name": "[concat(variables('appvmname'), copyindex(), "-nic')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]", "[resourceid('microsoft.network/loadbalancers/",variables('lbname'))]", "[resourceid('microsoft.network/loadbalancers/inboundnatrules",variables('lbname'),concat('ssh-vm", copyindex()))]"], "properties": {"ipconfigurations": [{"name": "ipconfignode", "properties": {"privateipallocationmethod": "dynamic", "subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('virtualnetworkname'), variables('subnetname'))]"}, "loadbalancerbackendaddresspools": [{"id": "[resourceid('microsoft.network/loadbalancers/backendaddresspools",variables('lbname'),"loadbalancerbackend')]"}], "loadbalancerinboundnatrules": [{"id": "[resourceid('microsoft.network/loadbalancers/inboundnatrules",variables('lbname'),concat('ssh-vm", copyindex()))]"}]}}]}, "copy": {"name": "appnetworkinterfacescopy", "count": "[parameters('appvmcount')]"}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"type": "microsoft.compute/virtualmachinescalesets", "apiversion": "2020-06-01", "name": "[parameters('vmssname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('vmsku')]", "tier": "standard", "capacity": "[parameters('instancecount')]"}, "dependson": ["[resourceid('microsoft.network/loadbalancers", variables('loadbalancername'))]", "[resourceid('microsoft.network/virtualnetworks", variables('virtualnetworkname'))]"], "properties": {"overprovision": "false", "upgradepolicy": {"mode": "manual"}, "virtualmachineprofile": {"storageprofile": {"osdisk": {"createoption": "fromimage", "caching": "readwrite"}, "imagereference": "[variables('imagereference')]"}, "osprofile": {"computernameprefix": "[parameters('vmssname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "networkprofile": {"networkinterfaceconfigurations": [{"name": "[variables('nicname')]", "properties": {"primary": true, "ipconfigurations": [{"name": "[variables('ipconfigname')]", "properties": {"subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('virtualnetworkname'), variables('subnetname'))]"}, "loadbalancerbackendaddresspools": [{"id": "[resourceid('microsoft.network/loadbalancers/backendaddresspools", variables('loadbalancername'), variables('bepoolname'))]"}], "loadbalancerinboundnatpools": [{"id": "[resourceid('microsoft.network/loadbalancers/inboundnatpools", variables('loadbalancername'), variables('natpoolname'))]"}, {"id": "[resourceid('microsoft.network/loadbalancers/inboundnatpools", variables('loadbalancername'), variables('natpool2name'))]"}]}}]}}]}, "extensionprofile": {"extensions": [{"name": "lapextension", "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"fileuris": ["[uri(parameters('_artifactslocation'), concat('installserver.sh", parameters('_artifactslocationsastoken')))]", "[uri(parameters('_artifactslocation'), concat('workserver.py", parameters('_artifactslocationsastoken')))]"], "commandtoexecute": "bash installserver.sh"}}}]}}}}
This template provides a easy way to deploy a puckel/docker-airflow image (latest tag) on a Linux Web App with Azure database for PostgreSQL.
{"comments": "this is the airflow linux web app running puckel/docker-airflow docker image", "type": "microsoft.web/sites", "name": "[parameters('sitename')]", "apiversion": "2020-06-01", "location": "[parameters('location')]", "dependson": ["[variables('hostingplanname')]", "[variables('databasename')]"], "properties": {"siteconfig": {"linuxfxversion": "docker|puckel/docker-airflow:latest"}, "name": "[parameters('sitename')]", "serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]"}, "resources": [{"name": "appsettings", "type": "config", "apiversion": "2020-06-01", "dependson": ["[resourceid('microsoft.web/sites", parameters('sitename'))]"], "tags": {"displayname": "airflowappsettings"}, "comments": "this are the generated settings for the airflow sql alchemy connectionstring", "properties": {"airflow__core__sql_alchemy_conn": "[concat('postgresql://", variables('airflowusername'),":",parameters('administratorloginpassword'),"@",reference(resourceid('microsoft.dbforpostgresql/servers",variables('servername'))).fullyqualifieddomainname,":5432/",variables('databasename'))]", "airflow__core__load_examples": "true", "websites_enable_app_service_storage": "true"}}]}{"apiversion": "2020-06-01", "name": "[variables('hostingplanname')]", "type": "microsoft.web/serverfarms", "location": "[parameters('location')]", "properties": {"name": "[variables('hostingplanname')]", "workersizeid": "1", "reserved": true, "numberofworkers": "1"}, "sku": {"tier": "[parameters('serviceplantier')]", "name": "[parameters('serviceplansku')]"}, "kind": "linux"}
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'))]"}]}}
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", "apiversion": "2018-11-30", "name": "[variables('aksclusteruserdefinedmanagedidentityname')]", "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')]"}
Create an Azure Automation account and create a new Azure Monitor Log Analytics workspace if it doesn't exist, and then link them together.
{"name": "[parameters('automationaccountname')]", "type": "microsoft.automation/automationaccounts", "apiversion": "2021-04-01", "location": "[parameters('automationregion')]", "properties": {"sku": {"name": "[parameters('automationpricingtier')]"}}, "resources": [{"name": "[variables('automation').runbook.publishomshypervreplica.name]", "type": "runbooks", "apiversion": "2015-10-31", "location": "[parameters('automationregion')]", "dependson": ["[resourceid('microsoft.automation/automationaccounts/", parameters('automationaccountname'))]"], "properties": {"runbooktype": "[variables('automation').runbook.publishomshypervreplica.type]", "logprogress": false, "logverbose": false, "description": "[variables('automation').runbook.publishomshypervreplica.description]", "publishcontentlink": {"uri": "[uri(parameters('_artifactslocation'), concat('scripts/", variables('automation').runbook.publishomshypervreplica.name, ".ps1", parameters('_artifactslocationsastoken')))]", "version": "1.0.0.0"}}}, {"name": "[concat(parameters('automationaccountname'), "/", variables('automation').asset.omshypervreplicarunnumber.name)]", "type": "microsoft.automation/automationaccounts/variables", "apiversion": "2021-04-01", "location": "[parameters('automationregion')]", "dependson": ["[resourceid('microsoft.automation/automationaccounts/", parameters('automationaccountname'))]"], "properties": {"description": "[variables('automation').asset.omshypervreplicarunnumber.description]", "isencrypted": false, "type": "[variables('automation').asset.omshypervreplicarunnumber.type]", "value": "[variables('automation').asset.omshypervreplicarunnumber.value]"}}, {"name": "[concat(parameters('automationaccountname'), "/", variables('automation').asset.omshypervreplicarunasaccount.name)]", "type": "microsoft.automation/automationaccounts/credentials", "apiversion": "2021-04-01", "location": "[parameters('automationregion')]", "dependson": ["[resourceid('microsoft.automation/automationaccounts/", parameters('automationaccountname'))]"], "properties": {"username": "[parameters('onpremisesrunasusername')]", "password": "[parameters('onpremisesrunaspassword')]", "description": "[variables('automation').asset.omshypervreplicarunasaccount.description]"}}, {"name": "[concat(parameters('automationaccountname'), "/", variables('automation').module.omsdatainjection.name)]", "type": "microsoft.automation/automationaccounts/modules", "apiversion": "2021-04-01", "location": "[parameters('automationregion')]", "dependson": ["[resourceid('microsoft.automation/automationaccounts/", parameters('automationaccountname'))]"], "properties": {"contentlink": {"uri": "[uri(parameters('_artifactslocation'), concat('assets/", variables('automation').module.omsdatainjection.name, ".zip", parameters('_artifactslocationsastoken')))]"}}}, {"name": "[concat(parameters('automationaccountname'), "/", variables('automation').connection.omsdatainjection.name)]", "type": "microsoft.automation/automationaccounts/connections", "apiversion": "2021-04-01", "location": "[parameters('automationregion')]", "dependson": ["[resourceid('microsoft.automation/automationaccounts/", parameters('automationaccountname'))]", "[resourceid('microsoft.automation/automationaccounts/modules", parameters('automationaccountname'), variables('automation').module.omsdatainjection.name)]"], "properties": {"name": "[variables('automation').connection.omsdatainjection.name]", "description": "[variables('automation').connection.omsdatainjection.description]", "isglobal": false, "connectiontype": {"name": "[variables('automation').connection.omsdatainjection.type]"}, "fielddefinitionvalues": {"omsworkspaceid": "[parameters('workspaceid')]", "primarykey": "[parameters('workspaceprimarykey')]"}}}]}
Creates and optionally secures a Key Vault with logging linked to a storage account.
{"type": "microsoft.keyvault/vaults", "apiversion": "2021-04-01-preview", "name": "[variables('keyvaultname')]", "location": "[parameters('location')]", "properties": {"tenantid": "[variables('tenantid')]", "sku": {"name": "standard", "family": "a"}, "accesspolicies": [], "enablesoftdelete": true, "enablepurgeprotection": true}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2020-06-01", "type": "microsoft.compute/virtualmachines", "name": "[variables('vmname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts/", parameters('newstorageaccountname'))]", "[resourceid('microsoft.network/networkinterfaces/", variables('nicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[parameters('ubuntuosversion')]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}}}
This template creates an App Service Plan, a Web App, a scheduler job collection and a job.
{"name": "[variables('schedulerjobcollectionname')]", "type": "microsoft.scheduler/jobcollections", "apiversion": "2016-03-01", "location": "[parameters('location')]", "properties": {"sku": {"name": "standard"}}, "resources": [{"type": "jobs", "name": "[variables('schedulerjobname')]", "apiversion": "2016-03-01", "dependson": ["[resourceid('microsoft.scheduler/jobcollections", variables('schedulerjobcollectionname'))]", "[variables('queuesendonlykeyname')]"], "properties": {"state": "enabled", "action": {"type": "servicebusqueue", "servicebusqueuemessage": {"namespace": "[variables('servicebusnamespacename')]", "queuename": "[parameters('queuename')]", "transporttype": "amqp", "authentication": {"saskey": "[listkeys(variables('queuesendonlykeyname'), "2018-01-01-preview').primarykey]", "saskeyname": "[listkeys(variables('queuesendonlykeyname'), "2018-01-01-preview').keyname]", "type": "sharedaccesskey"}, "message": "[parameters('messagecontents')]"}}, "recurrence": "[parameters('postrecurrence')]"}}]}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/privateendpoints", "apiversion": "2020-07-01", "name": "[parameters('filestorageaccountprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('filestorageaccountid')]", "[variables('fileshareid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('filestorageaccountprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('filestorageaccountid')]", "groupids": ["[variables('filestorageaccountprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}}}{"type": "microsoft.network/privateendpoints/privatednszonegroups", "apiversion": "2020-06-01", "name": "[variables('fileprivatednszonegroup')]", "location": "[parameters('location')]", "dependson": ["[variables('fileprivatednszoneid')]", "[variables('filestorageaccountprivateendpointid')]"], "properties": {"privatednszoneconfigs": [{"name": "dnsconfig", "properties": {"privatednszoneid": "[variables('fileprivatednszoneid')]"}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[concat(tolower(parameters('vmname')), uniquestring(resourcegroup().id))]"}}}{"apiversion": "2019-08-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('nsgname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allowsshinbound", "properties": {"priority": 100, "access": "allow", "direction": "inbound", "destinationportrange": "22", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"apiversion": "2019-11-01", "type": "microsoft.network/virtualnetworks", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[variables('nsgid')]"], "properties": {"addressspace": {"addressprefixes": ["[parameters('virtualnetworkaddressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetaddressprefix')]", "networksecuritygroup": {"id": "[variables('nsgid')]"}, "privateendpointnetworkpolicies": "disabled", "privatelinkservicenetworkpolicies": "enabled"}}]}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"condition": "[parameters('useexistingvnetandsubnet')]", "type": "microsoft.resources/deployments", "apiversion": "2019-10-01", "name": "[format('{0}-subnet-delegation-{1}", parameters('subnetname'), variables('unistr'))]", "resourcegroup": "[parameters('vnetresourcegroupname')]", "properties": {"expressionevaluationoptions": {"scope": "inner"}, "mode": "incremental", "parameters": {"virtualnetworkname": {"value": "[parameters('virtualnetworkname')]"}, "subnetname": {"value": "[parameters('subnetname')]"}, "subnetaddressprefix": {"value": "[parameters('subnetaddressprefix')]"}}, "template": {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymenttemplate.json#", "contentversion": "1.0.0.0", "parameters": {"virtualnetworkname": {"type": "string", "metadata": {"description": "required. the virtual network (vnet) name."}}, "subnetname": {"type": "string", "metadata": {"description": "required. the subnet name of asev3."}}, "subnetaddressprefix": {"type": "string", "metadata": {"description": "required. the subnet name of asev3."}}}, "functions": [], "resources": [{"type": "microsoft.network/virtualnetworks/subnets", "apiversion": "2020-11-01", "name": "[format('{0}/{1}", parameters('virtualnetworkname'), parameters('subnetname'))]", "properties": {"addressprefix": "[parameters('subnetaddressprefix')]", "delegations": [{"name": "microsoft.web.hostingenvironments", "properties": {"servicename": "microsoft.web/hostingenvironments"}}]}}]}}}{"condition": "[and(parameters('createprivatedns'), equals(parameters('internalloadbalancingmode'), 3))]", "type": "microsoft.resources/deployments", "apiversion": "2019-10-01", "name": "[format('private-dns-zone-deployment-{0}", variables('unistr'))]", "properties": {"expressionevaluationoptions": {"scope": "inner"}, "mode": "incremental", "parameters": {"privatednszonename": {"value": "[reference(resourceid('microsoft.web/hostingenvironments", parameters('asename'))).dnssuffix]"}, "virtualnetworkid": {"value": "[variables('virtualnetworkid')]"}, "asename": {"value": "[parameters('asename')]"}}, "template": {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymenttemplate.json#", "contentversion": "1.0.0.0", "parameters": {"asename": {"type": "string", "metadata": {"description": "required. ase name."}}, "privatednszonename": {"type": "string", "metadata": {"description": "required. private dns zone name."}}, "virtualnetworkid": {"type": "string", "metadata": {"description": "required. network id."}}}, "functions": [], "resources": [{"type": "microsoft.network/privatednszones", "apiversion": "2020-06-01", "name": "[parameters('privatednszonename')]", "location": "global", "properties": {}}, {"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2020-06-01", "name": "[format('{0}/{1}", parameters('privatednszonename'), "vnetlink')]", "location": "global", "properties": {"virtualnetwork": {"id": "[parameters('virtualnetworkid')]"}, "registrationenabled": false}, "dependson": ["[resourceid('microsoft.network/privatednszones", parameters('privatednszonename'))]"]}, {"type": "microsoft.network/privatednszones/a", "apiversion": "2020-06-01", "name": "[format('{0}/{1}", parameters('privatednszonename'), "*')]", "properties": {"ttl": 3600, "arecords": [{"ipv4address": "[reference(resourceid('microsoft.web/hostingenvironments/configurations", split(format('{0}/networking", parameters('asename')), "/')[0], split(format('{0}/networking", parameters('asename')), "/')[1]), "2021-01-15').internalinboundipaddresses[0]]"}]}, "dependson": ["[resourceid('microsoft.network/privatednszones", parameters('privatednszonename'))]"]}, {"type": "microsoft.network/privatednszones/a", "apiversion": "2020-06-01", "name": "[format('{0}/{1}", parameters('privatednszonename'), "*.scm')]", "properties": {"ttl": 3600, "arecords": [{"ipv4address": "[reference(resourceid('microsoft.web/hostingenvironments/configurations", split(format('{0}/networking", parameters('asename')), "/')[0], split(format('{0}/networking", parameters('asename')), "/')[1]), "2021-01-15').internalinboundipaddresses[0]]"}]}, "dependson": ["[resourceid('microsoft.network/privatednszones", parameters('privatednszonename'))]"]}, {"type": "microsoft.network/privatednszones/a", "apiversion": "2020-06-01", "name": "[format('{0}/{1}", parameters('privatednszonename'), "@')]", "properties": {"ttl": 3600, "arecords": [{"ipv4address": "[reference(resourceid('microsoft.web/hostingenvironments/configurations", split(format('{0}/networking", parameters('asename')), "/')[0], split(format('{0}/networking", parameters('asename')), "/')[1]), "2021-01-15').internalinboundipaddresses[0]]"}]}, "dependson": ["[resourceid('microsoft.network/privatednszones", parameters('privatednszonename'))]"]}]}}, "dependson": ["[resourceid('microsoft.web/hostingenvironments", parameters('asename'))]"]}
Create a VM from a Windows Image with 4 Empty Data Disks
{"apiversion": "2020-12-01", "type": "microsoft.compute/virtualmachines", "name": "[variables('vmname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts/", parameters('newstorageaccountname'))]", "[resourceid('microsoft.network/networkinterfaces/", variables('nicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[parameters('imagepublisher')]", "offer": "[parameters('imageoffer')]", "sku": "[parameters('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}}}
This template will deploy RedHat (RHEL) VM, using the Pay-As-You-Go RHEL VM image. Additional charges apply.
{"apiversion": "2020-06-01", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "tags": {"tag1": "managedvm"}, "dependson": ["[resourceid('microsoft.network/networkinterfaces/", variables('nicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[parameters('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[variables('imagesku')]", "version": "latest"}, "datadisks": [{"name": "[variables('datadisk1name')]", "disksizegb": 100, "lun": 0, "createoption": "empty"}, {"name": "[variables('datadisk2name')]", "disksizegb": 100, "lun": 1, "createoption": "empty"}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('nicname'))]"}]}}}
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'))]"]}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-07-01", "type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "location": "[variables('computelocation')]", "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnet0name')]", "properties": {"addressprefix": "[variables('subnet0prefix')]"}}]}, "tags": {"resourcetype": "service fabric", "clustername": "[parameters('clustername')]"}}{"apiversion": "2020-07-01", "type": "microsoft.network/publicipaddresses", "name": "[concat(variables('lbipname'),"-",variables('vmnodetype0name'))]", "location": "[variables('computelocation')]", "properties": {"dnssettings": {"domainnamelabel": "[variables('dnsname')]"}, "publicipallocationmethod": "dynamic"}, "tags": {"resourcetype": "service fabric", "clustername": "[parameters('clustername')]"}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-11-01", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["10.0.0.0/16"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "10.0.0.0/24"}}]}}{"type": "microsoft.network/networksecuritygroups", "apiversion": "2020-11-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "remoteconnection", "properties": {"description": "allow ssh traffic", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "22", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 101, "direction": "inbound"}}, {"name": "webtraffic", "properties": {"description": "allow web traffic", "protocol": "tcp", "sourceportrange": "80", "destinationportrange": "80", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 100, "direction": "inbound"}}]}}{"type": "microsoft.network/publicipaddresses", "apiversion": "2020-11-01", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "sku": {"name": "standard"}, "properties": {"publicipallocationmethod": "static", "dnssettings": {"domainnamelabel": "[parameters('dnsname')]"}}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"apiversion": "2020-06-01", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[variables('vmnicid')]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[parameters('vmname')]", "adminusername": "[parameters('vmadminusername')]", "adminpassword": "[parameters('vmadminpasswordorkey')]", "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('vmnicname'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('blobstorageaccountid')).primaryendpoints["blob"]]"}}}}{"apiversion": "2020-06-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'),"/", variables('omsagentforlinuxname'))]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]", "[variables('workspaceid')]"], "properties": {"publisher": "microsoft.enterprisecloud.monitoring", "type": "omsagentforlinux", "typehandlerversion": "1.12", "settings": {"workspaceid": "[reference(variables('workspaceid'), "2020-03-01-preview').customerid]", "stoponmultipleconnections": false}, "protectedsettings": {"workspacekey": "[listkeys(variables('workspaceid'),"2020-03-01-preview').primarysharedkey]"}}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[variables('vmname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts/", variables('newstorageaccountname'))]", "[resourceid('microsoft.network/networkinterfaces/", variables('nicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmname')]", "adminusername": "[parameters('vmadminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[variables('ubuntuosversion')]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(variables('vmname'),"/newuserscript')]", "apiversion": "2019-12-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", variables('vmname'))]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"fileuris": ["[uri(parameters('_artifactslocation'), concat(variables('installscriptname'), parameters('_artifactslocationsastoken')))]", "[uri(parameters('_artifactslocation'), concat('forcetls.ldif", parameters('_artifactslocationsastoken')))]", "[uri(parameters('_artifactslocation'), concat('settlsconfig.ldif", parameters('_artifactslocationsastoken')))]"]}, "protectedsettings": {"commandtoexecute": "[variables('installcommand')]"}}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"type": "microsoft.compute/virtualmachines", "apiversion": "2019-07-01", "name": "[parameters('vm_name')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces", parameters('nic_name'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "storageprofile": {"imagereference": {"publisher": "[variables('vmimagepublisher')]", "offer": "[variables('vmimageoffer')]", "sku": "[variables('sku')]", "version": "latest"}, "osdisk": {"ostype": "windows", "name": "[concat(parameters('vm_name'), "_osdisk')]", "createoption": "fromimage", "caching": "readwrite"}}, "osprofile": {"computername": "[parameters('vm_name')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", parameters('nic_name'))]"}]}}}{"name": "[concat(parameters('vm_name'),"/gpudrivers')]", "type": "microsoft.compute/virtualmachines/extensions", "location": "[parameters('location')]", "apiversion": "2019-07-01", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", parameters('vm_name'))]", "[resourceid('microsoft.compute/virtualmachines/extensions", parameters('vm_name'), "setupchocolatey')]"], "tags": {"displayname": "gpu-nvidia-drivers"}, "properties": {"publisher": "microsoft.hpccompute", "type": "nvidiagpudriverwindows", "typehandlerversion": "1.2", "autoupgrademinorversion": true}}{"name": "[concat(parameters('vm_name'),"/setupchocolatey')]", "apiversion": "2019-07-01", "type": "microsoft.compute/virtualmachines/extensions", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", parameters('vm_name'))]"], "tags": {"displayname": "config-choco"}, "properties": {"publisher": "microsoft.compute", "type": "customscriptextension", "typehandlerversion": "1.10", "autoupgrademinorversion": true, "settings": {"fileuris": ["[variables('setupscriptlocation')]"], "commandtoexecute": "[concat('powershell -executionpolicy bypass -file ", parameters('setupchocolateyscriptfilename')," -chocopackages ",parameters('chocopackages'))]"}}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"type": "microsoft.compute/virtualmachines", "apiversion": "2020-12-01", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces/", variables('networkinterfacename'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "storageprofile": {"osdisk": {"createoption": "fromimage", "manageddisk": {"storageaccounttype": "[variables('osdisktype')]"}}, "imagereference": {"publisher": "canonical", "offer": "ubuntuserver", "sku": "18.04-lts", "version": "latest"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('networkinterfacename'))]"}]}, "osprofile": {"computername": "[parameters('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminkey')]", "linuxconfiguration": {"disablepasswordauthentication": true, "ssh": {"publickeys": [{"path": "[concat('/home/", parameters('adminusername'), "/.ssh/authorized_keys')]", "keydata": "[parameters('adminkey')]"}]}}}}}{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'),"/customscript')]", "location": "[parameters('location')]", "apiversion": "2020-12-01", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", parameters('vmname'))]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "protectedsettings": {"commandtoexecute": "[concat('bash ", variables('masterscriptfilename'), " ", parameters('spclientid'), " ", parameters('spclientsecret'), " ", resourcegroup().name, " ", variables('subscriptionid'), " ", variables('tenantid'))]", "fileuris": ["[uri(parameters('_artifactslocation'), concat(variables('scriptsdir'), "/", variables('masterscriptfilename'), parameters('_artifactslocationsastoken')))]"]}}}{"type": "microsoft.compute/virtualmachinescalesets", "apiversion": "2020-12-01", "name": "[parameters('vmssname')]", "tags": {"cluster-autoscaler-enabled": "true", "cluster-autoscaler-name": "[resourcegroup().name]", "min": "[parameters('minnodecount')]", "max": "[parameters('maxnodecount')]", "poolname": "[parameters('vmssname')]"}, "dependson": ["[resourceid('microsoft.network/networkinterfaces/", variables('networkinterfacename'))]"], "location": "[parameters('location')]", "sku": {"name": "[parameters('vmsize')]", "tier": "standard", "capacity": "[parameters('defaultnodecount')]"}, "properties": {"overprovision": false, "upgradepolicy": {"mode": "manual"}, "virtualmachineprofile": {"storageprofile": {"osdisk": {"createoption": "fromimage", "caching": "readwrite"}, "imagereference": {"publisher": "canonical", "offer": "ubuntuserver", "sku": "18.04-lts", "version": "latest"}}, "osprofile": {"computernameprefix": "[parameters('vmssname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminkey')]", "linuxconfiguration": {"disablepasswordauthentication": true, "ssh": {"publickeys": [{"path": "[concat('/home/", parameters('adminusername'), "/.ssh/authorized_keys')]", "keydata": "[parameters('adminkey')]"}]}}}, "networkprofile": {"networkinterfaceconfigurations": [{"name": "[concat('nic", parameters('vmssname'))]", "properties": {"primary": true, "ipconfigurations": [{"name": "[concat('ipconfigvmss", parameters('vmssname'))]", "properties": {"subnet": {"id": "[variables('vmsssubnetref')]"}, "publicipaddressconfiguration": {"name": "[variables('vmsspublicipaddressname')]", "properties": {"idletimeoutinminutes": 10, "dnssettings": {"domainnamelabel": "[parameters('vmssdnslabelprefix')]"}}}}}]}}]}, "extensionprofile": {"extensions": [{"name": "customvmssscript", "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "protectedsettings": {"commandtoexecute": "[concat('bash ", variables('vmssscriptfilename'), " ", parameters('spclientid'), " ", parameters('spclientsecret'), " ", resourcegroup().name, " ", variables('subscriptionid'), " ", variables('tenantid'), " ", parameters('location'), " ", parameters('vmsssubnetname'), " ", parameters('virtualnetworkname'))]", "fileuris": ["[uri(parameters('_artifactslocation'), concat(variables('scriptsdir'), "/", variables('vmssscriptfilename'), parameters('_artifactslocationsastoken')))]"]}}}]}}}}
Deploy an empty edge node and add it to an existing HDInsight cluster
{"name": "[concat(parameters('clustername'),"/", variables('applicationname'))]", "type": "microsoft.hdinsight/clusters/applications", "apiversion": "2021-06-01", "properties": {"marketplaceidentifier": "emptynode", "computeprofile": {"roles": [{"name": "edgenode", "targetinstancecount": 1, "hardwareprofile": {"vmsize": "[parameters('edgenodevirtualmachinesize')]"}}]}, "installscriptactions": [{"name": "[concat('emptynode","-" ,uniquestring(variables('applicationname')))]", "uri": "[uri(parameters('_artifactslocation'), concat(parameters('installscriptactionfolder'), "/", parameters('installscriptaction'), parameters('_artifactslocationsastoken')))]", "roles": ["edgenode"]}], "sshendpoints": [{"location": "[concat(variables('applicationname'),".",parameters('clustername'),"-ssh.azurehdinsight.net')]", "destinationport": 22, "publicport": 22}], "applicationtype": "customapplication"}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2017-03-30", "type": "microsoft.compute/virtualmachines", "name": "[variables('vmname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts/", variables('storageaccountname'))]", "[resourceid('microsoft.network/networkinterfaces/", concat(variables('vmname'), "-nic'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[variables('osimagepublisher')]", "offer": "[variables('osimageoffer')]", "sku": "[variables('osimagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",concat(variables('vmname'), "-nic'))]"}]}}}{"apiversion": "2015-06-15", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(variables('vmname'), "/installscript')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", variables('vmname'))]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"fileuris": ["[concat(variables('scriptdownloaduri'), variables('installscript'))]", "[concat(variables('scriptdownloaduri'), "server-vars.yml')]"], "commandtoexecute": "[variables('installcommand')]"}}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "apiversion": "2020-08-01", "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "[variables('subnetprefix')]"}}, {"name": "[variables('appgwsubnetname')]", "properties": {"addressprefix": "[variables('appgwsubnetprefix')]"}}]}}
This module creates a key resource in an existing KeyVault with apiVersion 2019-09-01.
{"type": "microsoft.keyvault/vaults", "apiversion": "2021-04-01-preview", "name": "[parameters('keyvaultname')]", "location": "[parameters('location')]", "properties": {"enabledfordeployment": "[parameters('enabledfordeployment')]", "enabledfordiskencryption": "[parameters('enabledfordiskencryption')]", "enabledfortemplatedeployment": "[parameters('enabledfortemplatedeployment')]", "enablerbacauthorization": true, "tenantid": "[parameters('tenantid')]", "sku": {"name": "[parameters('skuname')]", "family": "a"}, "networkacls": {"defaultaction": "allow", "bypass": "azureservices"}}}{"type": "microsoft.keyvault/vaults/secrets", "apiversion": "2021-04-01-preview", "name": "[format('{0}/{1}", parameters('keyvaultname'), parameters('secretname'))]", "properties": {"value": "[parameters('secretvalue')]"}, "dependson": ["[resourceid('microsoft.keyvault/vaults", parameters('keyvaultname'))]"]}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"name": "shared", "type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('sharedtemplateurl')]", "contentversion": "1.0.0.0"}, "parameters": {"networksettings": {"value": "[variables('networksettings')]"}, "location": {"value": "[parameters('location')]"}}}}{"name": "haproxynode", "type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "dependson": ["[resourceid('microsoft.resources/deployments/", "shared')]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('haproxytemplateurl')]", "contentversion": "1.0.0.0"}, "parameters": {"adminusername": {"value": "[parameters('adminusername')]"}, "mysqlpassword": {"value": "[parameters('mysqlpassword')]"}, "namespace": {"value": "[variables('namespace')]"}, "vmbasename": {"value": "haproxy"}, "subnet": {"value": "[variables('networksettings').subnet.dse]"}, "dnsname": {"value": "[parameters('dnsnameprefix')]"}, "staticip": {"value": "[variables('networksettings').statics.haproxyip]"}, "vmsize": {"value": "[parameters('haproxyvmsize')]"}, "ossettings": {"value": "[variables('haproxyossettings')]"}, "authenticationtype": {"value": "[parameters('authenticationtype')]"}, "adminpasswordorkey": {"value": "[parameters('adminpasswordorkey')]"}, "location": {"value": "[parameters('location')]"}}}}{"name": "masternode", "type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "dependson": ["[resourceid('microsoft.resources/deployments/", "shared')]", "[resourceid('microsoft.resources/deployments/", "haproxynode')]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('mastertemplateurl')]", "contentversion": "1.0.0.0"}, "parameters": {"adminusername": {"value": "[parameters('adminusername')]"}, "mysqlpassword": {"value": "[parameters('mysqlpassword')]"}, "namespace": {"value": "[variables('namespace')]"}, "vmbasename": {"value": "master"}, "masternodeip": {"value": "[variables('networksettings').statics.masterip]"}, "subnet": {"value": "[variables('networksettings').subnet.dse]"}, "vmsize": {"value": "[parameters('mysqlvmsize')]"}, "ossettings": {"value": "[variables('masterossettings')]"}, "authenticationtype": {"value": "[parameters('authenticationtype')]"}, "adminpasswordorkey": {"value": "[parameters('adminpasswordorkey')]"}, "location": {"value": "[parameters('location')]"}}}}{"name": "slavenode01", "type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "dependson": ["[resourceid('microsoft.resources/deployments/", "shared')]", "[resourceid('microsoft.resources/deployments/", "haproxynode')]", "[resourceid('microsoft.resources/deployments/", "masternode')]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('slavetemplateurl01')]", "contentversion": "1.0.0.0"}, "parameters": {"adminusername": {"value": "[parameters('adminusername')]"}, "mysqlpassword": {"value": "[parameters('mysqlpassword')]"}, "namespace": {"value": "[variables('namespace')]"}, "vmbasename": {"value": "slave01"}, "slavestaticip": {"value": "[variables('networksettings').statics.slaveip01]"}, "subnet": {"value": "[variables('networksettings').subnet.dse]"}, "vmsize": {"value": "[parameters('mysqlvmsize')]"}, "ossettings": {"value": "[variables('slaveossettings01')]"}, "authenticationtype": {"value": "[parameters('authenticationtype')]"}, "adminpasswordorkey": {"value": "[parameters('adminpasswordorkey')]"}, "location": {"value": "[parameters('location')]"}}}}{"name": "slavenode02", "type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "dependson": ["[resourceid('microsoft.resources/deployments/", "shared')]", "[resourceid('microsoft.resources/deployments/", "haproxynode')]", "[resourceid('microsoft.resources/deployments/", "masternode')]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('slavetemplateurl02')]", "contentversion": "1.0.0.0"}, "parameters": {"adminusername": {"value": "[parameters('adminusername')]"}, "mysqlpassword": {"value": "[parameters('mysqlpassword')]"}, "namespace": {"value": "[variables('namespace')]"}, "vmbasename": {"value": "slave02"}, "slavestaticip": {"value": "[variables('networksettings').statics.slaveip02]"}, "subnet": {"value": "[variables('networksettings').subnet.dse]"}, "vmsize": {"value": "[parameters('mysqlvmsize')]"}, "ossettings": {"value": "[variables('slaveossettings02')]"}, "authenticationtype": {"value": "[parameters('authenticationtype')]"}, "adminpasswordorkey": {"value": "[parameters('adminpasswordorkey')]"}, "location": {"value": "[parameters('location')]"}}}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/networksecuritygroups", "apiversion": "2021-05-01", "name": "[parameters('networksecuritygroupname')]", "location": "[parameters('location')]"}{"type": "microsoft.network/virtualnetworks", "apiversion": "2021-05-01", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('addressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('addressprefix')]"}}]}}
Storage Account with Storage Service Encryption and a blob deletion retention policy
{"apiversion": "2021-08-01", "type": "microsoft.storage/storageaccounts", "name": "[parameters('blobstorageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storagev2"}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-04-01", "name": "[parameters('virtualnetwork_name')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('virtualnetwork_cidr')]"]}}}{"type": "microsoft.network/virtualnetworks/subnets", "apiversion": "2020-04-01", "name": "[concat(parameters('virtualnetwork_name'),"/", parameters('subnet1_name'))]", "dependson": ["[resourceid('microsoft.network/virtualnetworks", parameters('virtualnetwork_name'))]"], "properties": {"addressprefix": "[parameters('subnet1_cidr')]", "privateendpointnetworkpolicies": "disabled"}}{"type": "microsoft.network/privateendpoints", "apiversion": "2019-04-01", "name": "[parameters('privateendpoint_name')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/sites", parameters('site_name'))]", "[resourceid('microsoft.network/virtualnetworks/subnets", parameters('virtualnetwork_name'), parameters('subnet1_name'))]"], "properties": {"subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", parameters('virtualnetwork_name'), parameters('subnet1_name'))]"}, "privatelinkserviceconnections": [{"name": "[parameters('privatelinkconnection_name')]", "properties": {"privatelinkserviceid": "[resourceid('microsoft.web/sites", parameters('site_name'))]", "groupids": ["sites"]}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2019-08-01", "type": "microsoft.network/publicipaddresses", "name": "publicip", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic", "dnssettings": {"domainnamelabel": "[parameters('publicdnsname')]"}}}{"apiversion": "2019-08-01", "type": "microsoft.network/publicipaddresses", "name": "vmsqlip", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic"}}{"comments": "simple network security group for subnet [subnet]", "type": "microsoft.network/networksecuritygroups", "apiversion": "2019-08-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/publicipaddresses", "apiversion": "2020-06-01", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic", "dnssettings": {"domainnamelabel": "[parameters('dnslabelprefix')]"}}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-05-01", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('networksettings').virtualnetworkaddressprefix]"]}, "subnets": [{"name": "default", "properties": {"addressprefix": "[variables('networksettings').subnetaddressprefix]"}}]}}{"type": "microsoft.network/networkinterfaces", "name": "[concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ni')]", "apiversion": "2020-05-01", "location": "[parameters('location')]", "copy": {"name": "nicopy", "count": "[add(add(length(variables('vminfo')),length(variables('siteinfo'))),length(variables('clientrole')))]"}, "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]", "[resourceid('microsoft.network/publicipaddresses/", concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ip'))]", "[resourceid('microsoft.network/networksecuritygroups/", concat(tolower(tolower(parameters('prefix'))), "-nsg'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"subnet": {"id": "[variables('networksettings').subnetref]"}, "privateipallocationmethod": "[variables('networksettings').privateipallocationmethod]", "privateipaddress": "[concat(variables('networksettings').virtualmachinesipaddress,add(copyindex(),int('4')))]", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ip'))]"}}}], "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", concat(tolower(parameters('prefix')), "-nsg'))]"}}}{"type": "microsoft.network/publicipaddresses", "apiversion": "2020-05-01", "name": "[concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ip')]", "location": "[parameters('location')]", "copy": {"name": "ipcopy", "count": "[add(add(length(variables('vminfo')),length(variables('siteinfo'))),length(variables('clientrole')))]"}, "properties": {"publicipallocationmethod": "[variables('networksettings').publicipallocationmethod]"}}{"type": "microsoft.network/networksecuritygroups", "apiversion": "2020-05-01", "name": "[concat(tolower(parameters('prefix')), "-nsg')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "[variables('securitygrouprulename')]", "properties": "[variables('securitygrouprule')]"}]}}
Storage Account with Storage Service Encryption and a blob deletion retention policy
{"name": "[concat(variables('storageaccountnameprefix')[copyindex()],uniquestring(resourcegroup().id))]", "type": "microsoft.storage/storageaccounts", "location": "[parameters('location')]", "apiversion": "2021-01-01", "copy": {"count": "[length(variables('storageaccounttype'))]", "name": "storageaccountcopy"}, "tags": {"displayname": "[concat(variables('storageaccountnameprefix')[copyindex()],uniquestring(resourcegroup().id))]"}, "sku": {"name": "[variables('storageaccounttype')[copyindex()]]"}}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"type": "microsoft.storage/storageaccounts", "apiversion": "2019-06-01", "name": "[parameters('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storagev2", "properties": {"encryption": {"services": {"blob": {"enabled": true}, "file": {"enabled": true}}, "keysource": "microsoft.storage"}, "supportshttpstrafficonly": true}}
Deploy an Azure SQL Server with Threat Detection enabled and a user-defined number of Azure SQL Databases with Threat Detection enabled, with an email address to receive alerts for each database.
{"type": "microsoft.sql/servers", "apiversion": "2020-02-02-preview", "location": "[variables('databaseserverlocation')]", "name": "[variables('databaseservername')]", "properties": {"administratorlogin": "[variables('databaseserveradminlogin')]", "administratorloginpassword": "[variables('databaseserveradminloginpassword')]", "version": "12.0"}, "tags": {"displayname": "[variables('databaseservername')]"}}{"apiversion": "2020-02-02-preview", "type": "microsoft.sql/servers/databases", "sku": {"name": "s0", "tier": "standard"}, "kind": "v12.0,user", "location": "[variables('databaseserverlocation')]", "name": "[concat(string(variables('databaseservername')), "/", string(variables('databasenames')[copyindex()]))]", "dependson": ["[resourceid('microsoft.sql/servers", variables('databaseservername'))]"], "tags": {"displayname": "[variables('databaseservername')]"}, "copy": {"name": "databasecopy", "count": "[length(variables('databasenames'))]"}, "properties": {}, "resources": [{"apiversion": "2020-02-02-preview", "type": "securityalertpolicies", "name": "default", "dependson": ["[resourceid('microsoft.sql/servers/databases", variables('databaseservername'), variables('databasenames')[copyindex()])]"], "properties": {"state": "enabled"}}]}
Storage Account with Storage Service Encryption and a blob deletion retention policy
{"type": "microsoft.storage/storageaccounts", "name": "[variables('vhdstoragenamers')]", "apiversion": "2021-01-01", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storage", "tags": {"displayname": "datastorageaccountrs"}, "properties": {}}{"type": "microsoft.storage/storageaccounts", "name": "[variables('vhdstoragenamecatalog')]", "apiversion": "2021-01-01", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storage", "tags": {"displayname": "datastorageaccountcatalog"}, "properties": {}}{"name": "[variables('diagnosticsstorageaccountname')]", "type": "microsoft.storage/storageaccounts", "location": "[parameters('location')]", "apiversion": "2021-01-01", "sku": {"name": "standard_lrs"}, "kind": "storage", "tags": {"displayname": "diagnosticsstorageaccount"}, "properties": {}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"type": "microsoft.compute/virtualmachines", "name": "[concat('tableau", copyindex(1))]", "apiversion": "2020-12-01", "location": "[parameters('location')]", "copy": {"name": "virtualmachineloop", "count": "[variables('numberofinstances')]"}, "dependson": ["nicloop"], "properties": {"hardwareprofile": {"vmsize": "[variables('virtualmachinesize')]"}, "osprofile": {"computername": "[concat('tableauvm", copyindex(1))]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": "[variables('imagereference')[parameters('os')]]", "osdisk": {"caching": "readwrite", "createoption": "fromimage"}, "copy": [{"name": "datadisks", "count": 1, "input": {"disksizegb": 64, "lun": "[copyindex('datadisks')]", "createoption": "empty"}}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",concat('tabnic", copyindex(1)))]"}]}}, "resources": [{"condition": "[equals(parameters('accept_eula'), "yes')]", "name": "[concat('tableau", copyindex(1),"/customscript')]", "type": "microsoft.compute/virtualmachines/extensions", "location": "[parameters('location')]", "apiversion": "2020-12-01", "dependson": ["[resourceid('microsoft.compute/virtualmachines", concat('tableau", copyindex(1)))]"], "tags": {"displayname": "customscriptextension"}, "properties": "[if(variables('os_is_linux'),variables('lin_cse_properties'),variables('win_cse_properties'))]"}]}
Create an Azure Security Center Automation which will be triggered by any Security Center Recommendation and state
{"apiversion": "2019-01-01-preview", "location": "[parameters('location')]", "name": "[parameters('automationname')]", "type": "microsoft.security/automations", "properties": {"description": "[format(variables('automationdescription'),"{0}", parameters('subscriptionid'))]", "isenabled": true, "actions": [{"actiontype": "logicapp", "logicappresourceid": "[resourceid('microsoft.logic/workflows", parameters('logicappname'))]", "uri": "[listcallbackurl(resourceid(parameters('subscriptionid'), parameters('logicappresourcegroupname'), "microsoft.logic/workflows/triggers", parameters('logicappname'), "manual'), "2019-05-01').value]"}], "scopes": [{"description": "[format(variables('scopedescription'),"{0}", parameters('subscriptionid'))]", "scopepath": "[subscription().id]"}], "sources": [{"eventsource": "assessments", "eventversiontype": "api", "copy": [{"name": "rulesets", "count": "[length(parameters('assessmentsettings').assessmentseveritymapping)]", "input": {"rules": [{"propertyjpath": "[parameters('assessmentsettings').assessmentseveritymapping[copyindex('rulesets')].jpath]", "propertytype": "string", "expectedvalue": "[parameters('assessmentsettings').assessmentseveritymapping[copyindex('rulesets')].assessmentname]", "operator": "[parameters('assessmentsettings').assessmentseveritymapping[copyindex('rulesets')].operator]"}, {"propertyjpath": "properties.status.code", "propertytype": "string", "expectedvalue": "[parameters('assessmentsettings').assessmentseveritymapping[copyindex('rulesets')].state]", "operator": "contains"}]}}]}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2019-06-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "sku": {"name": "basic"}, "properties": {"publicipallocationmethod": "dynamic"}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-05-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('appgatewaypubipname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[parameters('publicipaddresstype')]"}}{"apiversion": "2020-05-01", "type": "microsoft.network/publicipaddresses", "name": "[concat(parameters('appserverspublicipprefix'), copyindex())]", "location": "[parameters('location')]", "copy": {"name": "foo", "count": "[variables('appscalecount')]"}, "properties": {"publicipallocationmethod": "[parameters('publicipaddresstype')]"}}{"apiversion": "2020-05-01", "type": "microsoft.network/virtualnetworks", "name": "[variables('vnetname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups/", variables('fensgname'))]", "[resourceid('microsoft.network/networksecuritygroups/", variables('appnsgname'))]", "[resourceid('microsoft.network/networksecuritygroups/", variables('bensgname'))]"], "properties": {"addressspace": {"addressprefixes": ["[variables('vnetaddressprefix')]"]}, "subnets": [{"name": "[variables('fesubnetname')]", "properties": {"addressprefix": "[variables('frontendprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('fensgname'))]"}}}, {"name": "[variables('appsubnetname')]", "properties": {"addressprefix": "[variables('appprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('appnsgname'))]"}}}, {"name": "[variables('besubnetname')]", "properties": {"addressprefix": "[variables('backendprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('bensgname'))]"}}}]}}{"apiversion": "2020-05-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('fensgname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "rdp_rule", "properties": {"description": "allow rdp", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "3389", "sourceaddressprefix": "internet", "destinationaddressprefix": "*", "access": "allow", "priority": 100, "direction": "inbound"}}, {"name": "web_rule", "properties": {"description": "allow website", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "80", "sourceaddressprefix": "internet", "destinationaddressprefix": "*", "access": "allow", "priority": 200, "direction": "inbound"}}, {"name": "app_subnet_rule", "properties": {"description": "outbound to app", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "[variables('appprefix')]", "access": "allow", "priority": 1000, "direction": "outbound"}}, {"name": "block_internal_network", "properties": {"description": "outbound to internal network", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "virtualnetwork", "access": "deny", "priority": 2000, "direction": "outbound"}}]}}{"apiversion": "2020-05-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('appnsgname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "fe_rule", "properties": {"description": "allow frontend", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "[variables('frontendprefix')]", "destinationaddressprefix": "*", "access": "allow", "priority": 100, "direction": "inbound"}}, {"name": "rdp_rule", "properties": {"description": "allow rdp", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "3389", "sourceaddressprefix": "internet", "destinationaddressprefix": "*", "access": "allow", "priority": 200, "direction": "inbound"}}, {"name": "vnet_rule", "properties": {"description": "block internal network", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "deny", "priority": 300, "direction": "inbound"}}, {"name": "db_outbound_rule", "properties": {"description": "allow outbound db", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "[variables('backendprefix')]", "access": "allow", "priority": 1000, "direction": "outbound"}}, {"name": "deny_internet", "properties": {"description": "deny_internet", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "internet", "access": "deny", "priority": 2000, "direction": "outbound"}}]}}{"apiversion": "2020-05-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('bensgname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "app_rule", "properties": {"description": "allow app servers", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "[variables('appprefix')]", "destinationaddressprefix": "*", "access": "allow", "priority": 100, "direction": "inbound"}}, {"name": "vnet_rule", "properties": {"description": "block internal network", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "deny", "priority": 200, "direction": "inbound"}}, {"name": "deny_internet", "properties": {"description": "deny_internet", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "internet", "access": "deny", "priority": 1000, "direction": "outbound"}}]}}
Storage Account with Storage Service Encryption and a blob deletion retention policy
{"type": "microsoft.storage/storageaccounts", "apiversion": "2021-02-01", "name": "[variables('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storage", "properties": {}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-05-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]"}}{"comments": "default network security group for template", "type": "microsoft.network/networksecuritygroups", "apiversion": "2020-05-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "default-allow-22", "properties": {"priority": 1000, "access": "allow", "direction": "inbound", "destinationportrange": "22", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"apiversion": "2020-05-01", "type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"], "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "[variables('subnetprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}}}]}}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"name": "[tolower(parameters('storageaccountname'))]", "type": "microsoft.storage/storageaccounts", "apiversion": "2019-06-01", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storagev2"}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"type": "microsoft.storage/storageaccounts", "name": "[variables('storageaccountname')]", "apiversion": "2016-01-01", "location": "[parameters('location')]", "sku": {"name": "[variables('storageaccounttype')]"}, "kind": "storage", "properties": {}}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"type": "microsoft.storage/storageaccounts", "name": "[parameters('newstorageaccountname')]", "apiversion": "2019-06-01", "location": "[parameters('location')]", "sku": {"name": "[variables('storageaccounttype')]"}, "kind": "storagev2"}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2021-07-01", "type": "microsoft.compute/virtualmachines", "name": "[variables('vmname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts/", variables('storageaccountname'))]", "[resourceid('microsoft.network/networkinterfaces/", concat(variables('vmname'), "-nic'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[variables('osimagepublisher')]", "offer": "[variables('osimageoffer')]", "sku": "[variables('osimagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",concat(variables('vmname'), "-nic'))]"}]}}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/publicipaddresses", "apiversion": "2020-04-01", "location": "[variables('location')]", "name": "[variables('agentipaddressname')]", "properties": {"dnssettings": {"domainnamelabel": "[variables('agentendpointdnsnameprefix')]"}, "publicipallocationmethod": "dynamic"}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"name": "nodes", "type": "microsoft.resources/deployments", "apiversion": "2016-02-01", "dependson": ["[concat('microsoft.network/virtualnetworks/", variables('vnetname'))]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('nodestemplateurl')]", "contentversion": "1.0.0.0"}, "parameters": {"location": {"value": "[variables('location')]"}, "uniquestring": {"value": "[variables('uniquestring')]"}, "adminusername": {"value": "[parameters('adminusername')]"}, "nodecount": {"value": "[parameters('nodecount')]"}, "vmsize": {"value": "[parameters('vmsize')]"}, "ossettings": {"value": "[variables('ossettings')]"}, "vnetname": {"value": "[variables('vnetname')]"}, "subnetname": {"value": "[variables('subnetname')]"}, "namespace": {"value": "dc0"}, "authenticationtype": {"value": "[parameters('authenticationtype')]"}, "adminpasswordorkey": {"value": "[parameters('adminpasswordorkey')]"}}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "dependson": ["microsoft.resources/deployments/networktemplate"], "name": "dbtemplate", "properties": {"mode": "incremental", "parameters": {"maharacommon": {"value": "[variables('maharacommon')]"}, "lbpubip": {"value": "[reference('networktemplate').outputs.lbpubip.value]"}, "ctlrpubip": {"value": "[reference('networktemplate').outputs.ctlrpubip.value]"}, "dbloginpassword": {"value": "[parameters('dbloginpassword')]"}}, "templatelink": {"uri": "[concat(variables('maharacommon').basetemplateurl, parameters('dbservertype'), ".json", parameters('_artifactslocationsastoken'))]"}}}{"condition": "[parameters('azurebackupswitch')]", "type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "recoverytemplate", "properties": {"mode": "incremental", "parameters": {"maharacommon": {"value": "[variables('maharacommon')]"}}, "templatelink": {"uri": "[concat(variables('maharacommon').basetemplateurl,"recoveryservices.json",parameters('_artifactslocationsastoken'))]"}}}{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "networktemplate", "properties": {"mode": "incremental", "parameters": {"maharacommon": {"value": "[variables('maharacommon')]"}}, "templatelink": {"uri": "[concat(variables('maharacommon').basetemplateurl,"network.json",parameters('_artifactslocationsastoken'))]"}}}{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "dependson": ["microsoft.resources/deployments/networktemplate", "microsoft.resources/deployments/recoverytemplate"], "name": "searchtemplate", "properties": {"mode": "incremental", "templatelink": {"uri": "[concat(variables('maharacommon').basetemplateurl, parameters('searchtype'), "-search.json", parameters('_artifactslocationsastoken'))]"}}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2021-02-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('lbpublicipname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "static", "dnssettings": {"domainnamelabel": "[parameters('dnsname')]"}}}{"apiversion": "2015-06-15", "type": "microsoft.network/virtualnetworks", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('vnetaddressprefix')]"]}, "subnets": [{"name": "[parameters('dbsubnetname')]", "properties": {"addressprefix": "[parameters('dbsubnetaddressprefix')]"}}]}}{"apiversion": "2015-06-15", "type": "microsoft.network/networkinterfaces", "name": "[variables('nicname1')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks/", parameters('virtualnetworkname'))]", "[resourceid('microsoft.network/loadbalancers/", variables('lbname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "static", "privateipaddress": "[parameters('vmip1')]", "subnet": {"id": "[variables('dbsubnetref')]"}, "loadbalancerbackendaddresspools": [{"id": "[variables('ilbbackendaddresspoolid')]"}], "loadbalancerinboundnatrules": [{"id": "[variables('sshnatruleid1')]"}]}}]}}{"apiversion": "2015-06-15", "type": "microsoft.network/networkinterfaces", "name": "[variables('nicname2')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks/", parameters('virtualnetworkname'))]", "[resourceid('microsoft.network/loadbalancers/", variables('lbname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "static", "privateipaddress": "[parameters('vmip2')]", "subnet": {"id": "[variables('dbsubnetref')]"}, "loadbalancerbackendaddresspools": [{"id": "[variables('ilbbackendaddresspoolid')]"}], "loadbalancerinboundnatrules": [{"id": "[variables('sshnatruleid2')]"}]}}]}}{"apiversion": "2015-06-15", "type": "microsoft.network/networkinterfaces", "name": "[variables('nicname3')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks/", parameters('virtualnetworkname'))]", "[resourceid('microsoft.network/loadbalancers/", variables('lbname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "static", "privateipaddress": "[parameters('vmip3')]", "subnet": {"id": "[variables('dbsubnetref')]"}, "loadbalancerbackendaddresspools": [{"id": "[variables('ilbbackendaddresspoolid')]"}], "loadbalancerinboundnatrules": [{"id": "[variables('sshnatruleid3')]"}]}}]}}
Template for deploying VMSS with Public IP Prefix
{"type": "microsoft.compute/virtualmachinescalesets", "apiversion": "2020-06-01", "name": "[parameters('vmssname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('vmsku')]", "tier": "standard", "capacity": "[parameters('instancecount')]"}, "properties": {"overprovision": false, "upgradepolicy": {"mode": "manual"}, "virtualmachineprofile": {"storageprofile": {"osdisk": {"caching": "readonly", "createoption": "fromimage"}, "imagereference": "[variables('imagereference')]"}, "osprofile": {"computernameprefix": "[parameters('vmssname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "networkprofile": {"networkinterfaceconfigurations": [{"name": "[variables('nicname')]", "properties": {"primary": true, "ipconfigurations": [{"name": "[variables('ipconfigname')]", "properties": {"subnet": {"id": "[format('{0}/subnets/{1}", resourceid('microsoft.network/virtualnetworks", variables('virtualnetworkname')), variables('subnetname'))]"}, "publicipaddressconfiguration": {"name": "pub1", "properties": {"idletimeoutinminutes": 15, "publicipprefix": {"id": "[resourceid('microsoft.network/publicipprefixes", variables('publicipprefixname'))]"}}}, "loadbalancerbackendaddresspools": [{"id": "[format('{0}/backendaddresspools/{1}", resourceid('microsoft.network/loadbalancers", variables('loadbalancername')), variables('bepoolname'))]"}], "loadbalancerinboundnatpools": [{"id": "[format('{0}/inboundnatpools/{1}", resourceid('microsoft.network/loadbalancers", variables('loadbalancername')), variables('natpoolname'))]"}]}}]}}]}}}, "dependson": ["[resourceid('microsoft.network/loadbalancers", variables('loadbalancername'))]", "[resourceid('microsoft.network/publicipprefixes", variables('publicipprefixname'))]", "[resourceid('microsoft.network/virtualnetworks", variables('virtualnetworkname'))]"]}
Create a VM from a Windows Image with 4 Empty Data Disks
{"type": "microsoft.compute/availabilitysets", "name": "[variables('availabilitysetname')]", "apiversion": "2019-12-01", "location": "[parameters('location')]", "sku": {"name": "aligned"}, "properties": {"platformfaultdomaincount": 2, "platformupdatedomaincount": 2}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[concat(variables('vmname'), copyindex())]", "copy": {"name": "virtualmachineloop", "count": "[variables('numberofinstances')]"}, "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts", variables('newstorageaccountname'))]", "[resourceid('microsoft.compute/availabilitysets", variables('availabilitysetname'))]"], "properties": {"availabilityset": {"id": "[resourceid('microsoft.compute/availabilitysets", variables('availabilitysetname'))]"}, "hardwareprofile": {"vmsize": "[parameters('windowsvmsize')]"}, "osprofile": {"computername": "[concat(variables('vmname'), copyindex())]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[parameters('windowsvmsku')]", "version": "latest"}, "osdisk": {"createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", concat(variables('vmname'),copyindex()))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('newstorageaccountname')).primaryendpoints.blob]"}}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "vmsql", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts", variables('newstorageaccountname'))]", "[resourceid('microsoft.network/networkinterfaces", variables('nicsql'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('sqlvmsize')]"}, "osprofile": {"computername": "[concat(variables('vmname'), "sql')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "[variables('sqlimagepublisher')]", "offer": "[parameters('sqlvmoffer')]", "sku": "[parameters('sqlvmsku')]", "version": "latest"}, "osdisk": {"createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicsql'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('newstorageaccountname')).primaryendpoints.blob]"}}}}
Establish connection to a VNET via an ExpressRoute circuit
{"name": "[variables('virtualnetworkname')]", "type": "microsoft.network/virtualnetworks", "location": "[parameters('location')]", "apiversion": "2020-11-01", "dependson": ["[resourceid('microsoft.network/networksecuritygroups/", variables('networksecuritygroupname'))]"], "tags": {"displayname": "[variables('virtualnetworkname')]"}, "properties": {"addressspace": {"addressprefixes": ["[variables('virtualnetworkprefix')]"]}, "subnets": [{"name": "[variables('virtualnetworksubnetname')]", "properties": {"addressprefix": "[variables('virtualnetworksubnetprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}}}]}}{"type": "microsoft.network/networksecuritygroups", "name": "[variables('networksecuritygroupname')]", "apiversion": "2020-11-01", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "default-allow-ssh", "properties": {"description": "allow secure shell connections", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "22", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 1000, "direction": "inbound"}}, {"name": "neo4j-allow-bolt", "properties": {"description": "allow bolt protocol connections", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "7687", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 1010, "direction": "inbound"}}, {"name": "neo4j-allow-http", "properties": {"description": "allow http connections", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "7474", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 1020, "direction": "inbound"}}, {"name": "neo4j-allow-https", "properties": {"description": "allow https connections", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "7473", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 1030, "direction": "inbound"}}]}}{"name": "[variables('networkinterfacename')]", "type": "microsoft.network/networkinterfaces", "location": "[parameters('location')]", "apiversion": "2020-11-01", "dependson": ["[resourceid('microsoft.network/virtualnetworks", variables('virtualnetworkname'))]", "[resourceid('microsoft.network/publicipaddresses", variables('publicipaddressname'))]"], "tags": {"displayname": "[variables('networkinterfacename')]"}, "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "subnet": {"id": "[variables('networkinterfacesubnetref')]"}, "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", variables('publicipaddressname'))]"}}}]}}{"name": "[variables('publicipaddressname')]", "type": "microsoft.network/publicipaddresses", "location": "[parameters('location')]", "apiversion": "2020-11-01", "tags": {"displayname": "[variables('publicipaddressname')]"}, "properties": {"publicipallocationmethod": "dynamic", "dnssettings": {"domainnamelabel": "[parameters('publicipaddressdns')]"}}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"type": "microsoft.compute/virtualmachines", "apiversion": "2020-12-01", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces", variables('nicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[parameters('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[variables('imagesku')]", "version": "latest"}, "osdisk": {"caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('nicname'))]"}]}}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('vnetaddressprefix')]"]}}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2020-12-01", "type": "microsoft.compute/availabilitysets", "name": "[variables('haproxyavailabilitysetname')]", "location": "[parameters('location')]", "properties": {"platformupdatedomaincount": 3, "platformfaultdomaincount": 2}, "sku": {"name": "aligned"}}{"apiversion": "2020-12-01", "type": "microsoft.compute/availabilitysets", "name": "[variables('appavailabilitysetname')]", "location": "[parameters('location')]", "properties": {"platformupdatedomaincount": 3, "platformfaultdomaincount": 2}, "sku": {"name": "aligned"}}{"apiversion": "2020-12-01", "type": "microsoft.compute/virtualmachines", "name": "[concat(parameters('haproxyvmnameprefix'), copyindex())]", "copy": {"name": "haproxyvmloop", "count": "[variables('numberofhaproxyinstances')]"}, "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts/", variables('storageaccountname'))]", "[resourceid('microsoft.network/networkinterfaces/", concat(parameters('haproxyvmnameprefix'), variables('nicnameprefix'), copyindex()))]", "[resourceid('microsoft.compute/availabilitysets/", variables('haproxyavailabilitysetname'))]"], "properties": {"availabilityset": {"id": "[resourceid('microsoft.compute/availabilitysets",variables('haproxyavailabilitysetname'))]"}, "hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[concat(parameters('haproxyvmnameprefix'), copyindex())]", "adminusername": "[parameters('adminusername')]", "linuxconfiguration": {"disablepasswordauthentication": true, "ssh": {"publickeys": [{"path": "[variables('sshkeypath')]", "keydata": "[parameters('sshkeydata')]"}]}}}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[parameters('ubuntuosversion')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('haproxyvmnameprefix'), "osdisk-", copyindex())]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "[variables('storageaccounttype')]"}}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",concat(parameters('haproxyvmnameprefix'), variables('nicnameprefix'),copyindex()))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[concat(reference(resourceid('microsoft.storage/storageaccounts", variables('storageaccountname')), "2021-01-01').primaryendpoints.blob)]"}}}}{"apiversion": "2020-12-01", "type": "microsoft.compute/virtualmachines", "name": "[concat(parameters('appvmnameprefix'), copyindex())]", "copy": {"name": "appvmloop", "count": "[variables('numberofappinstances')]"}, "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts/", variables('storageaccountname'))]", "[resourceid('microsoft.network/networkinterfaces/", concat(parameters('appvmnameprefix'), variables('nicnameprefix'), copyindex()))]", "[resourceid('microsoft.compute/availabilitysets/", variables('appavailabilitysetname'))]"], "properties": {"availabilityset": {"id": "[resourceid('microsoft.compute/availabilitysets",variables('appavailabilitysetname'))]"}, "hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[concat(parameters('appvmnameprefix'), copyindex())]", "adminusername": "[parameters('adminusername')]", "linuxconfiguration": {"disablepasswordauthentication": true, "ssh": {"publickeys": [{"path": "[variables('sshkeypath')]", "keydata": "[parameters('sshkeydata')]"}]}}}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[parameters('ubuntuosversion')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('appvmnameprefix'), "osdisk-", copyindex())]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "[variables('storageaccounttype')]"}}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",concat(parameters('appvmnameprefix'), variables('nicnameprefix'),copyindex()))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[concat(reference(resourceid('microsoft.storage/storageaccounts", variables('storageaccountname')), "2021-01-01').primaryendpoints.blob)]"}}}}{"apiversion": "2020-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('appvmnameprefix'), copyindex(), "/configureappvm')]", "copy": {"name": "appvmextensionsloop", "count": "[variables('numberofappinstances')]"}, "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", concat(parameters('appvmnameprefix'), copyindex()))]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"fileuris": "[variables('appvmscripts').fileuris]"}, "protectedsettings": {"commandtoexecute": "[variables('appvmscripts').commandtoexecute]"}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"name": "shared", "type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('sharedtemplateurl')]", "contentversion": "1.0.0.0"}, "parameters": {"networksettings": {"value": "[variables('networksettings')]"}, "namespace": {"value": "[variables('namespace')]"}, "location": {"value": "[parameters('location')]"}}}}{"name": "[concat('webnode", copyindex())]", "type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "dependson": ["[resourceid('microsoft.resources/deployments/", "shared')]"], "copy": {"name": "vmloop", "count": "[parameters('webnodecount')]"}, "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('webtemplateurl')]", "contentversion": "1.0.0.0"}, "parameters": {"adminusername": {"value": "[parameters('adminusername')]"}, "mysqlpassword": {"value": "[parameters('mysqlpassword')]"}, "namespace": {"value": "[variables('namespace')]"}, "vmbasename": {"value": "[concat('web", copyindex())]"}, "subnet": {"value": "[variables('networksettings').subnet.web]"}, "sizeofdatadiskingb": {"value": "[variables('sizeofdatadiskingb')]"}, "vmsize": {"value": "[parameters('webnodevmsize')]"}, "zabbixserveripaddress": {"value": "[parameters('zabbixserveripaddress')]"}, "ossettings": {"value": "[variables('webossettings')]"}, "authenticationtype": {"value": "[parameters('authenticationtype')]"}, "adminpasswordorkey": {"value": "[parameters('adminpasswordorkey')]"}, "location": {"value": "[parameters('location')]"}}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"apiversion": "2020-06-01", "name": "deploy", "type": "microsoft.resources/deployments", "resourcegroup": "[parameters('virtualnetworkresourcegroupname')]", "dependson": ["new-nsg"], "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'), concat('nested/updatesubnet.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"virtualnetworkname": {"value": "[parameters('virtualnetworkname')]"}, "subnetname": {"value": "[parameters('subnetname')]"}, "subnetaddressprefix": {"value": "[reference(resourceid(parameters('virtualnetworkresourcegroupname'), "microsoft.network/virtualnetworks/subnets", parameters('virtualnetworkname'), parameters('subnetname')), "2020-08-01').addressprefix]"}, "nsgid": {"value": "[resourceid('microsoft.network/networksecuritygroups", "new-nsg')]"}, "location": {"value": "[parameters('location')]"}}}}
This template creates a metric alert rule that monitors the CPU Percentage metric of a virtual machine using a static threshold condition type.
{"name": "[parameters('alertname')]", "type": "microsoft.insights/metricalerts", "location": "global", "apiversion": "2018-03-01", "properties": {"description": "[parameters('alertdescription')]", "severity": "[parameters('alertseverity')]", "enabled": "[parameters('isenabled')]", "scopes": ["[parameters('resourceid')]"], "evaluationfrequency": "[parameters('evaluationfrequency')]", "windowsize": "[parameters('windowsize')]", "criteria": {"odata.type": "microsoft.azure.monitor.singleresourcemultiplemetriccriteria", "allof": [{"name": "1st criterion", "metricname": "[parameters('metricname')]", "operator": "[parameters('operator')]", "threshold": "[parameters('threshold')]", "timeaggregation": "[parameters('timeaggregation')]"}]}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"apiversion": "2018-05-01", "name": "deploy-ddos-attack-oms-resource", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('omstemplateuri')]"}, "parameters": {"omsworkspacename": {"value": "[variables('omsworkspacename')]"}, "omssolutionsname": {"value": "[variables('omssolutions')]"}, "sku": {"value": "[parameters('omssku')]"}, "location": {"value": "[parameters('location')]"}, "tags": {"value": "[variables('tags')]"}}}}{"apiversion": "2018-05-01", "name": "[concat(parameters('vnetname'),"-","-resource')]", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('vnettemplateuri')]"}, "parameters": {"vnetname": {"value": "[parameters('vnetname')]"}, "addressprefix": {"value": "[parameters('vnetaddressspace')]"}, "subnets": {"value": "[variables('subnets')]"}, "location": {"value": "[parameters('location')]"}, "tags": {"value": "[variables('tags')]"}}}}{"apiversion": "2018-05-01", "name": "[concat(variables('nsgname'),"-","-resource')]", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('nsgtemplateuri')]"}, "parameters": {"nsgname": {"value": "[variables('nsgname')]"}, "securityrules": {"value": "[variables('nsgsecurityrules')]"}, "location": {"value": "[parameters('location')]"}, "tags": {"value": "[variables('tags')]"}}}}{"apiversion": "2018-05-01", "name": "[concat(variables('vmname'),"-pip","-resource')]", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('piptemplateuri')]"}, "parameters": {"publicipaddressname": {"value": "[concat(variables('vmname'),"-pip')]"}, "publicipaddresstype": {"value": "[parameters('pipaddresstype')]"}, "dnsnameforpublicip": {"value": "[concat(variables('vmname'),uniquestring(resourcegroup().id, "pip'),"-pip')]"}, "location": {"value": "[parameters('location')]"}, "tags": {"value": "[variables('tags')]"}}}}
Establish connection to a VNET via an ExpressRoute circuit
{"condition": "[parameters('rebuildvnet')]", "apiversion": "2020-05-01", "type": "microsoft.network/virtualnetworks", "name": "[parameters('vnetname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('vnetaddressprefix')]"]}}, "resources": [{"condition": "[parameters('rebuildvnet')]", "apiversion": "2020-05-01", "type": "subnets", "location": "[parameters('location')]", "name": "[parameters('subnet1name')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks", parameters('vnetname'))]"], "properties": {"addressprefix": "[parameters('subnet1prefix')]", "delegations": [{"name": "integrationserviceenvironments", "properties": {"servicename": "microsoft.logic/integrationserviceenvironments"}}]}}, {"condition": "[parameters('rebuildvnet')]", "apiversion": "2020-05-01", "type": "subnets", "location": "[parameters('location')]", "name": "[parameters('subnet2name')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks/", parameters('vnetname'))]", "[resourceid('microsoft.network/virtualnetworks/subnets", parameters('vnetname'), parameters('subnet1name'))]"], "properties": {"addressprefix": "[parameters('subnet2prefix')]"}}, {"condition": "[parameters('rebuildvnet')]", "apiversion": "2020-05-01", "type": "subnets", "location": "[parameters('location')]", "name": "[parameters('subnet3name')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks/", parameters('vnetname'))]", "[resourceid('microsoft.network/virtualnetworks/subnets", parameters('vnetname'), parameters('subnet2name'))]"], "properties": {"addressprefix": "[parameters('subnet3prefix')]"}}, {"condition": "[parameters('rebuildvnet')]", "apiversion": "2020-05-01", "type": "subnets", "location": "[parameters('location')]", "name": "[parameters('subnet4name')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks/", parameters('vnetname'))]", "[resourceid('microsoft.network/virtualnetworks/subnets", parameters('vnetname'), parameters('subnet3name'))]"], "properties": {"addressprefix": "[parameters('subnet4prefix')]"}}]}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2019-03-01", "type": "microsoft.compute/virtualmachines", "name": "[concat(variables('vmname'), copyindex())]", "location": "[parameters('location')]", "copy": {"name": "vmloop", "count": "[parameters('numberofvms')]"}, "dependson": ["[variables('storageaccountname')]", "nicloop"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[concat(variables('vmname'), copyindex())]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "microsoftwindowsserver", "offer": "windowsserver", "sku": "[parameters('windowsosversion')]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'), copyindex(),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}, "copy": [{"name": "datadisks", "count": "[parameters('numdatadisks')]", "input": {"caching": "readwrite", "disksizegb": "[parameters('sizeofdatadisksingb')]", "lun": "[copyindex('datadisks')]", "name": "[concat(variables('vmname'), "-datadisk",copyindex(), copyindex('datadisks'))]", "createoption": "empty"}}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", concat(variables('nicname'), copyindex()))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('storageaccountname')).primaryendpoints.blob]"}}}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"apiversion": "2015-06-15", "type": "microsoft.compute/availabilitysets", "name": "[variables('ossavailabilitysetsettings').name]", "location": "[parameters('location')]", "sku": {"name": "aligned"}, "properties": {"platformfaultdomaincount": "[variables('ossavailabilitysetsettings').faultdomaincount]", "platformupdatedomaincount": "[variables('ossavailabilitysetsettings').updatedomaincount]"}}{"apiversion": "2017-03-30", "type": "microsoft.compute/virtualmachines", "name": "[concat(parameters('vmnameprefix'),"mgs')]", "plan": {"publisher": "intel", "product": "lustre-cloud-edition-gs-image", "name": "eval-lustre-2-7"}, "location": "[parameters('location')]", "dependson": ["storageaccountscopy", "[concat('microsoft.network/networkinterfaces/", parameters('vmnameprefix'), "mgs')]"], "tags": {"lustretype": "mgt"}, "properties": {"hardwareprofile": {"vmsize": "[parameters('mgsvmsize')]"}, "osprofile": {"computername": "[concat(parameters('vmnameprefix'),"mgs')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]", "linuxconfiguration": "[variables('linuxconfiguration')]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagereferencelustre').publisher]", "offer": "[variables('imagereferencelustre').offer]", "sku": "[variables('imagereferencelustre').sku]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('vmnameprefix'),"mgs","_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}, "datadisks": [{"name": "[concat(parameters('vmnameprefix'),"mgs","_datadisk1')]", "disksizegb": 5, "lun": 0, "caching": "none", "createoption": "empty"}, {"name": "[concat(parameters('vmnameprefix'),"mgs","_datadisk2')]", "disksizegb": 16, "lun": 1, "caching": "none", "createoption": "empty"}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",concat(parameters('vmnameprefix'),"mgs'))]"}]}}}{"apiversion": "2015-06-15", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmnameprefix'), "mgs", "/init')]", "location": "[parameters('location')]", "dependson": ["[concat('microsoft.compute/virtualmachines/", concat(parameters('vmnameprefix'), "mgs'))]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"fileuris": ["[variables('scripturllustre')]"], "commandtoexecute": "[concat('sh lustre.sh", " -n mgs", " -i 0", " -d ", variables('mgsdiskcount'), " -m ", reference(resourceid('microsoft.network/networkinterfaces", concat(parameters('vmnameprefix'), "mgs'))).ipconfigurations[0].properties.privateipaddress, " -l ", reference(resourceid('microsoft.network/networkinterfaces", concat(parameters('vmnameprefix'), "mgs'))).ipconfigurations[0].properties.privateipaddress, " -f ", parameters('filesystemname'))]"}}}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"type": "microsoft.storage/storageaccounts", "apiversion": "2019-06-01", "name": "[variables('storageaccountname')]", "location": "[parameters('existingvnetlocation')]", "dependson": ["[resourceid(parameters('existingdatafactoryresourcegroup'), "microsoft.resources/deployments", "nestedtemplate')]"], "sku": {"name": "standard_lrs"}, "kind": "storage", "properties": {}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"type": "microsoft.compute/availabilitysets", "name": "[variables('avsetnameascs')]", "apiversion": "2020-06-01", "location": "[parameters('location')]", "sku": {"name": "aligned"}, "condition": "[equals(length(parameters('availabilityzones')), 0)]", "properties": {"platformfaultdomaincount": 2, "platformupdatedomaincount": 10}}{"type": "microsoft.compute/virtualmachines", "name": "[concat(variables('vmnameascs'), "-", copyindex())]", "copy": {"name": "xscsvmloop", "count": "[variables('ascsvmcount')]"}, "dependson": ["nicascsloop", "[resourceid('microsoft.compute/availabilitysets", variables('avsetnameascs'))]"], "apiversion": "2020-06-01", "location": "[parameters('location')]", "zones": "[if(equals(length(parameters('availabilityzones')), 0), json('null'), array(variables('azarray')[mod(copyindex(), variables('azarraylength'))]))]", "properties": {"availabilityset": "[if(equals(variables('azarraylength'), 0), resourceid('microsoft.compute/availabilitysets", variables('avsetnameascs')), json('null'))]", "hardwareprofile": {"vmsize": "[variables('ascsvmsize')]"}, "osprofile": {"computername": "[concat(variables('vmnameascs'), "-", copyindex())]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[variables('images')[parameters('ostype')].publisher]", "offer": "[variables('images')[parameters('ostype')].offer]", "sku": "[variables('images')[parameters('ostype')].sku]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmnameascs'), "-", copyindex(), "-osdisk')]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "premium_lrs"}}, "datadisks": [{"lun": 0, "createoption": "empty", "disksizegb": 128}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", concat(variables('nicnameascs'), "-", copyindex()))]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(variables('vmnameascs'), "-", copyindex(), "/", variables('csextension')[variables('internalostype')].name)]", "apiversion": "2020-06-01", "location": "[parameters('location')]", "dependson": ["xscsvmloop"], "copy": {"name": "xscsextvmloop", "count": "[variables('ascsvmcount')]"}, "properties": {"publisher": "[variables('csextension')[variables('internalostype')].publisher]", "type": "[variables('csextension')[variables('internalostype')].name]", "typehandlerversion": "[variables('csextension')[variables('internalostype')].version]", "autoupgrademinorversion": true, "settings": {"fileuris": ["[variables('csextension')[variables('internalostype')].script]"], "commandtoexecute": "[concat(variables('csextension')[variables('internalostype')].scriptcall, " ", variables('scriptargumentsascsdi')[variables('internalostype')])]"}}}{"type": "microsoft.compute/availabilitysets", "name": "[variables('avsetnamedb')]", "apiversion": "2020-06-01", "location": "[parameters('location')]", "sku": {"name": "aligned"}, "condition": "[equals(length(parameters('availabilityzones')), 0)]", "properties": {"platformfaultdomaincount": 2, "platformupdatedomaincount": 10}}{"type": "microsoft.compute/virtualmachines", "name": "[concat(variables('vmnamedb'), "-", copyindex())]", "copy": {"name": "dbvmloop", "count": "[variables('dbvmcount')]"}, "dependson": ["nicdbloop", "[resourceid('microsoft.compute/availabilitysets", variables('avsetnamedb'))]"], "apiversion": "2020-06-01", "location": "[parameters('location')]", "zones": "[if(equals(length(parameters('availabilityzones')), 0), json('null'), array(variables('azarray')[mod(copyindex(), variables('azarraylength'))]))]", "properties": {"availabilityset": "[if(equals(variables('azarraylength'), 0), resourceid('microsoft.compute/availabilitysets", variables('avsetnamedb')), json('null'))]", "hardwareprofile": {"vmsize": "[variables('dbvmsize')]"}, "osprofile": {"computername": "[concat(variables('vmnamedb'), "-", copyindex())]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[variables('images')[parameters('ostype')].publisher]", "offer": "[variables('images')[parameters('ostype')].offer]", "sku": "[variables('images')[parameters('ostype')].sku]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmnamedb'), "-", copyindex(), "-osdisk')]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "premium_lrs"}}, "datadisks": "[variables('dbdisks')]"}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", concat(variables('nicnamedb'), "-", copyindex()))]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(variables('vmnamedb'), "-", copyindex(), "/", variables('csextension')[variables('internalostype')].name)]", "apiversion": "2020-06-01", "location": "[parameters('location')]", "dependson": ["dbvmloop"], "copy": {"name": "dbextvmloop", "count": "[variables('dbvmcount')]"}, "properties": {"publisher": "[variables('csextension')[variables('internalostype')].publisher]", "type": "[variables('csextension')[variables('internalostype')].name]", "typehandlerversion": "[variables('csextension')[variables('internalostype')].version]", "autoupgrademinorversion": true, "settings": {"fileuris": ["[variables('csextension')[variables('internalostype')].script]"], "commandtoexecute": "[concat(variables('csextension')[variables('internalostype')].scriptcall, " ", variables('sizes')[parameters('sapsystemsize')][parameters('dbtype')].scriptarguments[variables('internalostype')])]"}}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"type": "microsoft.compute/virtualmachines", "apiversion": "2019-07-01", "name": "vslab", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts", variables('storagename'))]", "[resourceid('microsoft.network/networkinterfaces", "vslab-nic')]"], "tags": {"displayname": "vs2019 lab vm"}, "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "labvm", "adminusername": "[parameters('adminuser')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "microsoftvisualstudio", "offer": "visualstudio", "sku": "vs-2017-comm-latest-ws2016", "version": "latest"}, "osdisk": {"name": "labvmosdisk", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", "vslab-nic')]"}]}}}
Storage Account with Storage Service Encryption and a blob deletion retention policy
{"type": "microsoft.storage/storageaccounts", "apiversion": "2021-04-01", "name": "[variables('supportlogstorageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storage", "tags": {"resourcetype": "service fabric", "clustername": "[parameters('clustername')]"}, "properties": {}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"type": "microsoft.compute/availabilitysets", "name": "[variables('avsetnamedb')]", "apiversion": "2020-12-01", "location": "[parameters('location')]", "sku": {"name": "aligned"}, "properties": {"platformfaultdomaincount": 2, "platformupdatedomaincount": 20}}{"type": "microsoft.compute/virtualmachines", "name": "[concat(variables('vmnamedb'), "-", copyindex())]", "copy": {"name": "dbvmloop", "count": "[variables('dbvmcount')]"}, "dependson": ["dbnicloop", "[resourceid('microsoft.compute/availabilitysets/", variables('avsetnamedb'))]"], "apiversion": "2020-12-01", "location": "[parameters('location')]", "properties": {"availabilityset": {"id": "[resourceid('microsoft.compute/availabilitysets", variables('avsetnamedb'))]"}, "hardwareprofile": {"vmsize": "[variables('sizes')[parameters('sapsystemsize')][parameters('dbtype')].vmsize]"}, "osprofile": {"computername": "[concat(variables('vmnamedb'), "-", copyindex())]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[variables('images')[parameters('ostype')].publisher]", "offer": "[variables('images')[parameters('ostype')].offer]", "sku": "[variables('images')[parameters('ostype')].sku]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmnamedb'), "-", copyindex(), "-osdisk')]", "caching": "readwrite", "createoption": "fromimage", "disksizegb": "[variables('images')[parameters('ostype')].osdisksize]", "manageddisk": {"storageaccounttype": "premium_lrs"}}, "datadisks": "[variables('sizes')[parameters('sapsystemsize')][parameters('dbtype')].disks]"}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", concat(variables('nicnamedb'), "-", copyindex()))]"}]}}}
Storage Account with Storage Service Encryption and a blob deletion retention policy
{"type": "microsoft.storage/storageaccounts", "name": "[variables('storageaccountname')]", "apiversion": "2021-02-01", "location": "[parameters('location')]", "sku": {"name": "[variables('storageaccounttype')]"}}
Storage Account with Storage Service Encryption and a blob deletion retention policy
{"type": "microsoft.storage/storageaccounts", "name": "[variables('defaultstorageaccount').name]", "location": "[parameters('location')]", "apiversion": "2021-04-01", "sku": {"name": "[variables('defaultstorageaccount').type]"}, "kind": "storage", "properties": {}}
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('key_vault_name')]", "location": "[parameters('location')]", "properties": {"enabledfordeployment": true, "enabledfordiskencryption": false, "enabledfortemplatedeployment": true, "enablesoftdelete": false, "tenantid": "[variables('tenantid')]", "accesspolicies": [{"objectid": "[parameters('keyvaultownerid')]", "tenantid": "[variables('tenantid')]", "permissions": {"keys": "[variables('keyspermissions')]", "secrets": "[variables('secretspermissions')]"}}], "sku": {"name": "[variables('skuname')]", "family": "a"}, "networkacls": {"defaultaction": "allow", "bypass": "azureservices"}}}{"type": "microsoft.keyvault/vaults/secrets", "apiversion": "2019-09-01", "name": "[concat(variables('key_vault_name'), "/", variables('key_vault_secretname_sasinst'))]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.keyvault/vaults", variables('key_vault_name'))]"], "properties": {"value": "[parameters('sasinternalpassword')]"}}{"type": "microsoft.keyvault/vaults/secrets", "apiversion": "2019-09-01", "name": "[concat(variables('key_vault_name'), "/", variables('key_vault_secretname_sasext'))]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.keyvault/vaults", variables('key_vault_name'))]"], "properties": {"value": "[parameters('sasexternalpassword')]"}}
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.operationalinsights/workspaces/{0}", parameters('name'))]", "name": "[variables('lockname')]", "properties": {"level": "cannotdelete"}, "dependson": ["[resourceid('microsoft.operationalinsights/workspaces", parameters('name'))]"]}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-05-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "sku": {"name": "standard"}, "properties": {"publicipallocationmethod": "static", "dnssettings": {"domainnamelabel": "[parameters('dnsname')]"}}}{"apiversion": "2020-05-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "remoteconnection", "properties": {"description": "allow rdp/ssh", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "[if(equals(parameters('windowsorubuntu'), "windows'), 3389, 22)]", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 100, "direction": "inbound"}}]}}
This template disables data disk encryption on a running Linux VM which was encrypted without AAD
{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'),"/","azurediskencryptionforlinux')]", "location": "[parameters('location')]", "apiversion": "2020-12-01", "properties": {"publisher": "microsoft.azure.security", "type": "azurediskencryptionforlinux", "typehandlerversion": "1.1", "autoupgrademinorversion": true, "forceupdatetag": "[parameters('forceupdatetag')]", "settings": {"encryptionoperation": "disableencryption", "volumetype": "[parameters('volumetype')]"}}}
Storage Account with Storage Service Encryption and a blob deletion retention policy
{"type": "microsoft.storage/storageaccounts", "name": "[variables('storageaccountname')]", "apiversion": "2017-06-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks/", parameters('vnetname'))]"], "sku": {"name": "[parameters('storageaccounttype')]"}, "kind": "storage", "properties": {"networkacls": {"bypass": "none", "virtualnetworkrules": [{"id": "[variables('subnetid')[0]]", "action": "allow"}], "defaultaction": "deny"}}}
This template creates a Front Door Standard/Premium including a web application firewall with a custom rule.
{"type": "microsoft.cdn/profiles", "apiversion": "2021-06-01", "name": "[variables('profilename')]", "location": "global", "sku": {"name": "[parameters('frontdoorskuname')]"}}{"type": "microsoft.cdn/profiles/afdendpoints", "apiversion": "2021-06-01", "name": "[format('{0}/{1}", variables('profilename'), parameters('endpointname'))]", "location": "global", "properties": {"enabledstate": "enabled"}, "dependson": ["[resourceid('microsoft.cdn/profiles", variables('profilename'))]"]}{"type": "microsoft.cdn/profiles/origingroups", "apiversion": "2021-06-01", "name": "[format('{0}/{1}", variables('profilename'), variables('origingroupname'))]", "properties": {"loadbalancingsettings": {"samplesize": 4, "successfulsamplesrequired": 3}, "healthprobesettings": {"probepath": "/", "proberequesttype": "head", "probeprotocol": "http", "probeintervalinseconds": 100}}, "dependson": ["[resourceid('microsoft.cdn/profiles", variables('profilename'))]"]}{"type": "microsoft.cdn/profiles/origingroups/origins", "apiversion": "2021-06-01", "name": "[format('{0}/{1}/{2}", variables('profilename'), variables('origingroupname'), variables('originname'))]", "properties": {"hostname": "[parameters('originhostname')]", "httpport": 80, "httpsport": 443, "originhostheader": "[parameters('originhostname')]", "priority": 1, "weight": 1000}, "dependson": ["[resourceid('microsoft.cdn/profiles/origingroups", variables('profilename'), variables('origingroupname'))]", "[resourceid('microsoft.cdn/profiles", variables('profilename'))]"]}{"type": "microsoft.cdn/profiles/afdendpoints/routes", "apiversion": "2021-06-01", "name": "[format('{0}/{1}/{2}", variables('profilename'), parameters('endpointname'), variables('routename'))]", "properties": {"origingroup": {"id": "[resourceid('microsoft.cdn/profiles/origingroups", variables('profilename'), variables('origingroupname'))]"}, "supportedprotocols": ["http", "https"], "patternstomatch": ["/*"], "forwardingprotocol": "httpsonly", "linktodefaultdomain": "enabled", "httpsredirect": "enabled"}, "dependson": ["[resourceid('microsoft.cdn/profiles/afdendpoints", variables('profilename'), parameters('endpointname'))]", "[resourceid('microsoft.cdn/profiles/origingroups/origins", variables('profilename'), variables('origingroupname'), variables('originname'))]", "[resourceid('microsoft.cdn/profiles/origingroups", variables('profilename'), variables('origingroupname'))]", "[resourceid('microsoft.cdn/profiles", variables('profilename'))]"]}{"type": "microsoft.cdn/profiles/securitypolicies", "apiversion": "2021-06-01", "name": "[format('{0}/{1}", variables('profilename'), variables('securitypolicyname'))]", "properties": {"parameters": {"type": "webapplicationfirewall", "wafpolicy": {"id": "[resourceid('microsoft.network/frontdoorwebapplicationfirewallpolicies", variables('wafpolicyname'))]"}, "associations": [{"domains": [{"id": "[resourceid('microsoft.cdn/profiles/afdendpoints", variables('profilename'), parameters('endpointname'))]"}], "patternstomatch": ["/*"]}]}}, "dependson": ["[resourceid('microsoft.cdn/profiles/afdendpoints", variables('profilename'), parameters('endpointname'))]", "[resourceid('microsoft.cdn/profiles", variables('profilename'))]", "[resourceid('microsoft.network/frontdoorwebapplicationfirewallpolicies", variables('wafpolicyname'))]"]}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "pid-738e3eec-68d4-4667-8377-c05c77c21f1b", "properties": {"mode": "incremental", "template": {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymenttemplate.json#", "contentversion": "1.0.0.0", "resources": []}}}{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "dbtemplate", "properties": {"mode": "incremental", "parameters": {"moodlecommon": {"value": "[variables('moodlecommon')]"}, "location": {"value": "[parameters('location')]"}}, "templatelink": {"uri": "[concat(variables('moodlecommon').basetemplateurl, parameters('dbservertype'), ".json", parameters('_artifactslocationsastoken'))]"}}}{"condition": "[parameters('azurebackupswitch')]", "type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "recoverytemplate", "properties": {"mode": "incremental", "parameters": {"moodlecommon": {"value": "[variables('moodlecommon')]"}, "location": {"value": "[parameters('location')]"}}, "templatelink": {"uri": "[concat(variables('moodlecommon').basetemplateurl,"recoveryservices.json",parameters('_artifactslocationsastoken'))]"}}}{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "redistemplate", "dependson": ["microsoft.resources/deployments/networktemplate"], "properties": {"mode": "incremental", "parameters": {"moodlecommon": {"value": "[variables('moodlecommon')]"}, "location": {"value": "[parameters('location')]"}}, "templatelink": {"uri": "[concat(variables('moodlecommon').basetemplateurl,"redis.json",parameters('_artifactslocationsastoken'))]"}}}{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "networktemplate", "properties": {"mode": "incremental", "parameters": {"moodlecommon": {"value": "[variables('moodlecommon')]"}, "location": {"value": "[parameters('location')]"}}, "templatelink": {"uri": "[concat(variables('moodlecommon').basetemplateurl,"network.json",parameters('_artifactslocationsastoken'))]"}}}{"condition": "[parameters('installelasticsearchswitch')]", "type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "dependson": ["microsoft.resources/deployments/networktemplate", "microsoft.resources/deployments/recoverytemplate"], "name": "elastictemplate", "properties": {"mode": "incremental", "parameters": {"moodlecommon": {"value": "[variables('moodlecommon')]"}, "location": {"value": "[parameters('location')]"}}, "templatelink": {"uri": "[concat(variables('moodlecommon').basetemplateurl,"elastic.json",parameters('_artifactslocationsastoken'))]"}}}{"condition": "[equals(parameters('fileservertype'),"gluster')]", "type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "dependson": ["microsoft.resources/deployments/networktemplate", "microsoft.resources/deployments/recoverytemplate"], "name": "glustertemplate", "properties": {"mode": "incremental", "parameters": {"moodlecommon": {"value": "[variables('moodlecommon')]"}, "location": {"value": "[parameters('location')]"}}, "templatelink": {"uri": "[concat(variables('moodlecommon').basetemplateurl,"gluster.json",parameters('_artifactslocationsastoken'))]"}}}{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "dependson": ["microsoft.resources/deployments/elastictemplate", "microsoft.resources/deployments/glustertemplate", "microsoft.resources/deployments/recoverytemplate", "microsoft.resources/deployments/redistemplate", "microsoft.resources/deployments/storageaccounttemplate"], "name": "controllertemplate", "properties": {"mode": "incremental", "parameters": {"moodlecommon": {"value": "[variables('moodlecommon')]"}, "location": {"value": "[parameters('location')]"}}, "templatelink": {"uri": "[concat(variables('moodlecommon').basetemplateurl,"controller.json",parameters('_artifactslocationsastoken'))]"}}}{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "dependson": ["microsoft.resources/deployments/controllertemplate", "microsoft.resources/deployments/redistemplate", "microsoft.resources/deployments/dbtemplate"], "name": "scalesettemplate", "properties": {"mode": "incremental", "parameters": {"moodlecommon": {"value": "[variables('moodlecommon')]"}, "location": {"value": "[parameters('location')]"}}, "templatelink": {"uri": "[concat(variables('moodlecommon').basetemplateurl,"webvmss.json",parameters('_artifactslocationsastoken'))]"}}}
Deploy an Azure Databricks workspace with a custom virtual network.
{"comments": "the resource group specified will be locked after deployment.", "type": "microsoft.databricks/workspaces", "apiversion": "2018-04-01", "name": "[parameters('workspacename')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('pricingtier')]"}, "properties": {"managedresourcegroupid": "[variables('managedresourcegroupid')]", "parameters": {"customvirtualnetworkid": {"value": "[parameters('customvirtualnetworkid')]"}, "custompublicsubnetname": {"value": "[parameters('custompublicsubnetname')]"}, "customprivatesubnetname": {"value": "[parameters('customprivatesubnetname')]"}, "enablenopublicip": {"value": "[parameters('disablepublicip')]"}}}}
Storage Account with Storage Service Encryption and a blob deletion retention policy
{"type": "microsoft.storage/storageaccounts", "name": "[parameters('vmdiagnosticsstorageaccountname')]", "apiversion": "2021-01-01", "location": "[parameters('location')]", "sku": {"name": "[variables('storatetype')]"}}
Storage Account with Storage Service Encryption and a blob deletion retention policy
{"type": "microsoft.storage/storageaccounts", "name": "[parameters('storagename')]", "apiversion": "2021-01-01", "location": "[parameters('location')]", "sku": {"name": "[parameters('storagetype')]"}}
README.md exists but content is empty. Use the Edit dataset card button to edit it.
Downloads last month
0
Edit dataset card