Description
stringlengths
21
195
IaC
stringlengths
201
6.84k
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-08-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('securitygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "ssh", "properties": {"description": "allows ssh traffic", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "22", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 100, "direction": "inbound"}}]}}{"apiversion": "2015-06-15", "type": "microsoft.network/virtualnetworks", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('addressprefix')]"]}, "subnets": [{"name": "[parameters('subnet1name')]", "properties": {"addressprefix": "[parameters('subnet1prefix')]"}}]}}{"apiversion": "2020-08-01", "type": "microsoft.network/publicipaddresses", "name": "publicip", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic", "dnssettings": {"domainnamelabel": "[parameters('dnsname')]"}}}{"apiversion": "2015-06-15", "type": "microsoft.network/networkinterfaces", "name": "nic", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks/", parameters('virtualnetworkname'))]", "[resourceid('microsoft.network/publicipaddresses/", "publicip')]", "[resourceid('microsoft.network/networksecuritygroups/", variables('securitygroupname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", "publicip')]"}, "subnet": {"id": "[variables('subnet1ref')]"}}}], "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('securitygroupname'))]"}}}
This template deploys a Disk pool into an exsisting vnet.
{"type": "microsoft.storagepool/diskpools", "apiversion": "2021-08-01", "name": "[parameters('diskpoolname')]", "sku": {"name": "[parameters('diskpoolsku')]"}, "location": "[parameters('diskpoollocation')]", "properties": {"availabilityzones": ["[parameters('diskpoolavailabilityzone')]"], "subnetid": "[variables('subnetid')]", "disks": [{"id": "[variables('diskid')]"}]}}{"type": "microsoft.storagepool/diskpools/iscsitargets", "apiversion": "2021-08-01", "name": "[format('{0}/{1}", parameters('diskpoolname'), parameters('targetname'))]", "properties": {"targetiqn": "iqn.2021-04.org.microsoft.com:target", "aclmode": "dynamic", "luns": [{"manageddiskazureresourceid": "[variables('diskid')]", "name": "lun0"}]}, "dependson": ["[resourceid('microsoft.storagepool/diskpools", parameters('diskpoolname'))]"]}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/publicipaddresses", "apiversion": "2019-11-01", "name": "vslab-publicip", "location": "[parameters('location')]", "tags": {"displayname": "publicipaddress"}, "properties": {"publicipallocationmethod": "dynamic", "dnssettings": {"domainnamelabel": "[variables('vm-dns')]"}}}{"type": "microsoft.network/networksecuritygroups", "apiversion": "2020-04-01", "name": "vslab-nsg", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "nsgrule1", "properties": {"description": "description", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "3389", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 100, "direction": "inbound"}}]}}{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-04-01", "name": "vslab-virtualnetwork", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups", "vslab-nsg')]"], "tags": {"displayname": "vslab-virtualnetwork"}, "properties": {"addressspace": {"addressprefixes": ["10.0.0.0/16"]}, "subnets": [{"name": "vslab-vnet-subnet", "properties": {"addressprefix": "10.0.0.0/24", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", "vslab-nsg')]"}}}]}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"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 sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"name": "provisionconfiguration", "type": "microsoft.resources/deployments", "apiversion": "2018-02-01", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('provisionconfigurationurl')]", "contentversion": "1.0.0.0"}, "parameters": {"_artifactslocation": {"value": "[parameters('_artifactslocation')]"}, "_artifactslocationsastoken": {"value": "[parameters('_artifactslocationsastoken')]"}, "automationaccountname": {"value": "[variables('automationaccountname')]"}, "location": {"value": "[parameters('location')]"}, "compilename": {"value": "[parameters('compilename')]"}}}}{"name": "provisionnetwork", "type": "microsoft.resources/deployments", "apiversion": "2018-02-01", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('provisionnetworkurl')]", "contentversion": "1.0.0.0"}, "parameters": {"location": {"value": "[parameters('location')]"}, "virtualnetworkname": {"value": "[variables('virtualnetworkname')]"}, "virtualnetworkaddressrange": {"value": "[parameters('virtualnetworkaddressrange')]"}, "virtualnetworksubnets": {"value": "[variables('virtualnetworksubnets')]"}, "publicipaddressname": {"value": "[variables('publicipaddressname')]"}, "publicipaddresstype": {"value": "[variables('publicipaddresstype')]"}, "loadbalancername": {"value": "[variables('loadbalancername')]"}}}}{"name": "provisionserver", "type": "microsoft.resources/deployments", "apiversion": "2018-02-01", "dependson": ["provisionnetwork", "provisionconfiguration"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('provisionserverurl')]", "contentversion": "1.0.0.0"}, "parameters": {"location": {"value": "[parameters('location')]"}, "vmssname": {"value": "[parameters('vmssname')]"}, "instancecount": {"value": "[parameters('instancecount')]"}, "vmsize": {"value": "[parameters('vmsize')]"}, "adminusername": {"value": "[parameters('adminusername')]"}, "adminpassword": {"value": "[parameters('adminpassword')]"}, "nicname": {"value": "[variables('nicname')]"}, "virtualnetworkname": {"value": "[variables('virtualnetworkname')]"}, "subnetname": {"value": "[variables('virtualnetworksubnetname')]"}, "loadbalancername": {"value": "[variables('loadbalancername')]"}, "automationaccountname": {"value": "[variables('automationaccountname')]"}}}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[variables('vnetname')]", "location": "[variables('location')]", "properties": {"addressspace": {"addressprefixes": ["172.16.0.0/16"]}, "enableddosprotection": false, "enablevmprotection": false, "subnets": [{"name": "[parameters('frontendsubnet')]", "properties": {"addressprefix": "172.16.0.0/24", "serviceendpoints": [{"service": "microsoft.sql"}], "privateendpointnetworkpolicies": "disabled", "privatelinkservicenetworkpolicies": "disabled"}}, {"name": "[parameters('backendsubnet')]", "properties": {"addressprefix": "172.16.1.0/24", "privateendpointnetworkpolicies": "disabled", "privatelinkservicenetworkpolicies": "disabled"}}, {"name": "[parameters('gatewaysubnet')]", "properties": {"addressprefix": "172.16.255.0/27", "privateendpointnetworkpolicies": "disabled", "privatelinkservicenetworkpolicies": "disabled"}}]}}{"type": "microsoft.network/virtualnetworks/subnets", "apiversion": "2020-06-01", "name": "[concat(variables('vnetname'), "/",parameters('frontendsubnet'))]", "dependson": ["[resourceid('microsoft.network/virtualnetworks", variables('vnetname'))]"], "properties": {"addressprefix": "172.16.0.0/24", "serviceendpoints": [{"service": "microsoft.sql"}], "privateendpointnetworkpolicies": "disabled", "privatelinkservicenetworkpolicies": "disabled"}}{"type": "microsoft.network/virtualnetworks/subnets", "apiversion": "2020-06-01", "name": "[concat(variables('vnetname'), "/",parameters('backendsubnet'))]", "dependson": ["[resourceid('microsoft.network/virtualnetworks", variables('vnetname'))]"], "properties": {"addressprefix": "172.16.1.0/24", "privateendpointnetworkpolicies": "disabled", "privatelinkservicenetworkpolicies": "disabled"}}{"type": "microsoft.network/virtualnetworks/subnets", "apiversion": "2020-06-01", "name": "[concat(variables('vnetname'), "/",parameters('gatewaysubnet'))]", "dependson": ["[resourceid('microsoft.network/virtualnetworks", variables('vnetname'))]"], "properties": {"addressprefix": "172.16.255.0/27", "privateendpointnetworkpolicies": "disabled", "privatelinkservicenetworkpolicies": "disabled"}}{"type": "microsoft.network/networkinterfaces", "apiversion": "2020-06-01", "name": "[variables('nicname')]", "location": "[variables('location')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks", variables('vnetname'))]"], "properties": {"ipconfigurations": [{"name": "[concat( parameters('stackname'),"vmip')]", "properties": {"privateipallocationmethod": "dynamic", "subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('vnetname'), parameters('backendsubnet'))]"}}}]}}{"type": "microsoft.network/privateendpoints", "apiversion": "2019-04-01", "name": "[variables('privatedbendpointname')]", "location": "[variables('location')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks", variables('vnetname'))]", "[resourceid('microsoft.sql/servers", parameters('stackname'))]"], "properties": {"subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('vnetname'), parameters('backendsubnet'))]"}, "privatelinkserviceconnections": [{"name": "[variables('privatedbendpointname')]", "properties": {"privatelinkserviceid": "[resourceid('microsoft.sql/servers",parameters('stackname'))]", "groupids": ["sqlserver"]}}]}}{"type": "microsoft.network/privatednszones", "apiversion": "2020-06-01", "name": "[variables('privatedbdnszonename')]", "location": "global", "dependson": ["[resourceid('microsoft.network/virtualnetworks", variables('vnetname'))]"]}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2020-06-01", "name": "[concat(variables('privatedbdnszonename'), "/", variables('privatedbdnszonename'), "-link')]", "location": "global", "dependson": ["[resourceid('microsoft.network/privatednszones", variables('privatedbdnszonename'))]", "[resourceid('microsoft.network/virtualnetworks", variables('vnetname'))]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[resourceid('microsoft.network/virtualnetworks", variables('vnetname'))]"}}}{"type": "microsoft.network/privateendpoints/privatednszonegroups", "apiversion": "2020-03-01", "name": "[variables('privatedbdnsgroupname')]", "location": "[variables('location')]", "dependson": ["[resourceid('microsoft.network/privatednszones", variables('privatedbdnszonename'))]", "[variables('privatedbendpointname')]"], "properties": {"privatednszoneconfigs": [{"name": "config1", "properties": {"privatednszoneid": "[resourceid('microsoft.network/privatednszones", variables('privatedbdnszonename'))]"}}]}}{"apiversion": "2020-06-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('gatewaypublicipname')]", "location": "[variables('location')]", "properties": {"publicipallocationmethod": "dynamic"}}
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": ["[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'))]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(variables('vmname'),"/newuserscript')]", "apiversion": "2020-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('scripts/install_postgresql.sh", parameters('_artifactslocationsastoken')))]"], "commandtoexecute": "bash install_postgresql.sh"}}}
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'))]"}}}
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": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[parameters('dnslabelprefix')]"}}}{"comments": "default network security group for template", "type": "microsoft.network/networksecuritygroups", "apiversion": "2019-08-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": "2015-06-15", "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('subnet1name')]", "properties": {"addressprefix": "[variables('subnet1prefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}}}]}}
Create a SQL Server Virtual Machine with performance optimized storage settings on PremiumSSD
{"type": "microsoft.sqlvirtualmachine/sqlvirtualmachines", "apiversion": "2017-03-01-preview", "name": "[parameters('virtualmachinename')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines", parameters('virtualmachinename'))]"], "properties": {"virtualmachineresourceid": "[resourceid('microsoft.compute/virtualmachines", parameters('virtualmachinename'))]", "sqlmanagement": "full", "sqlserverlicensetype": "payg", "storageconfigurationsettings": {"diskconfigurationtype": "[variables('diskconfigurationtype')]", "storageworkloadtype": "[parameters('storageworkloadtype')]", "sqldatasettings": {"luns": "[variables('datadisksluns')]", "defaultfilepath": "[parameters('datapath')]"}, "sqllogsettings": {"luns": "[variables('logdisksluns')]", "defaultfilepath": "[parameters('logpath')]"}, "sqltempdbsettings": {"defaultfilepath": "[variables('tempdbpath')]"}}}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/networkinterfaces", "apiversion": "2020-08-01", "name": "[variables('networkinterfacename')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/publicipaddresses", variables('publicipaddressename'))]", "[resourceid('microsoft.network/virtualnetworks/subnets", variables('virtualnetworkname'), variables('privatesubnet'))]", "[resourceid('microsoft.network/virtualnetworks/subnets", variables('virtualnetworkname'), variables('publicsubnet'))]", "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"], "tags": {"name": "vns3 controller"}, "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "static", "privateipaddress": "[variables('vnsstaticip')]", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", variables('publicipaddressename'))]"}, "subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('virtualnetworkname'), variables('publicsubnet'))]"}, "privateipaddressversion": "ipv4"}}], "enableacceleratednetworking": false, "enableipforwarding": true, "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}}}{"type": "microsoft.network/networksecuritygroups", "apiversion": "2020-08-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "tags": {"name": "vns3 controller"}, "properties": {"securityrules": [{"name": "vns3_web_api_port", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "8000", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 100, "direction": "inbound"}}, {"name": "vns3_udp_1194", "properties": {"protocol": "udp", "sourceportrange": "1194", "destinationportrange": "1194", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 200, "direction": "inbound"}}, {"name": "vns3_udp_500", "properties": {"protocol": "udp", "sourceportrange": "500", "destinationportrange": "500", "sourceaddressprefix": "internet", "destinationaddressprefix": "*", "access": "allow", "priority": 300, "direction": "inbound"}}, {"name": "vns3_nat_t", "properties": {"protocol": "udp", "sourceportrange": "4500", "destinationportrange": "4500", "sourceaddressprefix": "1.2.3.4/32", "destinationaddressprefix": "*", "access": "allow", "priority": 400, "direction": "inbound"}}]}}{"type": "microsoft.network/publicipaddresses", "apiversion": "2020-08-01", "name": "[variables('publicipaddressename')]", "location": "[parameters('location')]", "sku": {"name": "basic", "tier": "regional"}, "tags": {"name": "vns3 controller"}, "properties": {"publicipaddressversion": "ipv4", "publicipallocationmethod": "static", "idletimeoutinminutes": 4}}{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-08-01", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('vnetsubnet')]"]}, "subnets": [{"name": "[variables('publicsubnet')]", "properties": {"addressprefix": "[variables('vnetpublicsubnet')]"}}, {"name": "[variables('privatesubnet')]", "properties": {"addressprefix": "[variables('vnetprivatesubnet')]"}}], "enableddosprotection": false, "enablevmprotection": false}}{"type": "microsoft.network/virtualnetworks/subnets", "apiversion": "2020-06-01", "name": "[concat(variables('virtualnetworkname'), "/", variables('publicsubnet'))]", "dependson": ["[resourceid('microsoft.network/virtualnetworks", variables('virtualnetworkname'))]"], "properties": {"addressprefix": "[variables('vnetpublicsubnet')]"}}{"type": "microsoft.network/virtualnetworks/subnets", "apiversion": "2020-06-01", "name": "[concat(variables('virtualnetworkname'), "/", variables('privatesubnet'))]", "dependson": ["[resourceid('microsoft.network/virtualnetworks", variables('virtualnetworkname'))]"], "properties": {"addressprefix": "[variables('vnetprivatesubnet')]", "routetable": {"id": "[resourceid('microsoft.network/routetables", variables('routetablename'))]"}}}{"type": "microsoft.network/routetables", "apiversion": "2020-11-01", "name": "[variables('routetablename')]", "location": "[parameters('location')]", "properties": {"disablebgproutepropagation": false, "routes": [{"name": "natgateway", "properties": {"addressprefix": "0.0.0.0/0", "nexthoptype": "virtualappliance", "nexthopipaddress": "10.10.10.10", "hasbgpoverride": false}}]}}{"type": "microsoft.network/routetables/routes", "apiversion": "2020-06-01", "name": "[concat(variables('routetablename'),"/","natgateway')]", "dependson": ["[resourceid('microsoft.network/routetables", variables('routetablename'))]", "[resourceid('microsoft.network/virtualnetworks", variables('virtualnetworkname'))]"], "properties": {"addressprefix": "0.0.0.0/0", "nexthoptype": "internet", "hasbgpoverride": false}}
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('servicebusnamespaceprivatednszonename')]", "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('servicebusnamespaceprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('servicebusnamespaceprivatednszoneid')]", "[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('servicebusnamespaceprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetid')]", "[variables('servicebusnamespaceid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('servicebusnamespaceprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('servicebusnamespaceid')]", "groupids": ["[variables('servicebusnamespaceprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}, "customdnsconfigs": [{"fqdn": "[concat(parameters('servicebusnamespacename'), variables('servicebuspublicdnszoneforwarder'))]"}]}}{"type": "microsoft.network/privateendpoints", "apiversion": "2020-04-01", "name": "[parameters('blobstorageaccountprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetid')]", "[variables('blobstorageaccountid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('blobstorageaccountprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('blobstorageaccountid')]", "groupids": ["[variables('blobstorageaccountprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}, "customdnsconfigs": [{"fqdn": "[concat(parameters('blobstorageaccountname'), variables('blobpublicdnszoneforwarder'))]"}]}}{"type": "microsoft.network/privateendpoints/privatednszonegroups", "apiversion": "2020-03-01", "name": "[variables('servicebusnamespaceprivatednszonegroup')]", "location": "[parameters('location')]", "dependson": ["[variables('servicebusnamespaceprivatednszoneid')]", "[variables('servicebusnamespaceprivateendpointid')]"], "properties": {"privatednszoneconfigs": [{"name": "dnsconfig", "properties": {"privatednszoneid": "[variables('servicebusnamespaceprivatednszoneid')]"}}]}}{"type": "microsoft.network/privateendpoints/privatednszonegroups", "apiversion": "2020-03-01", "name": "[variables('blobprivatednszonegroup')]", "location": "[parameters('location')]", "dependson": ["[variables('blobprivatednszoneid')]", "[variables('blobstorageaccountprivateendpointid')]"], "properties": {"privatednszoneconfigs": [{"name": "dnsconfig", "properties": {"privatednszoneid": "[variables('blobprivatednszoneid')]"}}]}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"type": "microsoft.compute/virtualmachinescalesets", "apiversion": "2020-06-01", "name": "[variables('vmnodetype0name')]", "location": "[parameters('location')]", "sku": {"name": "[variables('vmnodetype0size')]", "capacity": "[parameters('nt0instancecount')]", "tier": "standard"}, "dependson": ["[variables('virtualnetworkname')]", "[variables('lbname')]", "[variables('supportlogstorageaccountname')]", "[variables('applicationdiagnosticsstorageaccountname')]"], "tags": {"resourcetype": "service fabric", "clustername": "[parameters('clustername')]"}, "properties": {"overprovision": "[variables('overprovision')]", "upgradepolicy": {"mode": "automatic"}, "virtualmachineprofile": {"extensionprofile": {"extensions": [{"name": "[concat('servicefabricnodevmext","_vmnodetype0name')]", "properties": {"type": "servicefabricnode", "autoupgrademinorversion": true, "protectedsettings": {"storageaccountkey1": "[listkeys(resourceid('microsoft.storage/storageaccounts", variables('supportlogstorageaccountname')),"2021-01-01').keys[0].value]", "storageaccountkey2": "[listkeys(resourceid('microsoft.storage/storageaccounts", variables('supportlogstorageaccountname')),"2021-01-01').keys[1].value]"}, "publisher": "microsoft.azure.servicefabric", "settings": {"clusterendpoint": "[reference(parameters('clustername')).clusterendpoint]", "nodetyperef": "[variables('vmnodetype0name')]", "datapath": "[concat(if(equals(parameters('nodedatadrive'), "os'), "c", "d'), ":\\\\svcfab')]", "durabilitylevel": "silver", "nicprefixoverride": "[variables('subnet0prefix')]", "certificate": {"thumbprint": "[parameters('certificatethumbprint')]", "x509storename": "[parameters('certificatestorevalue')]"}}, "typehandlerversion": "1.0"}}, {"name": "[concat('vmdiagnosticsvmext","_vmnodetype0name')]", "properties": {"type": "iaasdiagnostics", "autoupgrademinorversion": true, "protectedsettings": {"storageaccountname": "[variables('applicationdiagnosticsstorageaccountname')]", "storageaccountkey": "[listkeys(resourceid('microsoft.storage/storageaccounts", variables('applicationdiagnosticsstorageaccountname')),"2021-01-01').keys[0].value]", "storageaccountendpoint": "[concat('https://", environment().suffixes.storage)]"}, "publisher": "microsoft.azure.diagnostics", "settings": {"wadcfg": {"diagnosticmonitorconfiguration": {"overallquotainmb": "50000", "etwproviders": {"etweventsourceproviderconfiguration": [{"provider": "microsoft-servicefabric-actors", "scheduledtransferkeywordfilter": "1", "scheduledtransferperiod": "pt5m", "defaultevents": {"eventdestination": "servicefabricreliableactoreventtable"}}, {"provider": "microsoft-servicefabric-services", "scheduledtransferperiod": "pt5m", "defaultevents": {"eventdestination": "servicefabricreliableserviceeventtable"}}], "etwmanifestproviderconfiguration": [{"provider": "cbd93bc2-71e5-4566-b3a7-595d8eeca6e8", "scheduledtransferloglevelfilter": "information", "scheduledtransferkeywordfilter": "4611686018427387904", "scheduledtransferperiod": "pt5m", "defaultevents": {"eventdestination": "servicefabricsystemeventtable"}}]}}}, "storageaccount": "[variables('applicationdiagnosticsstorageaccountname')]"}, "typehandlerversion": "1.5"}}]}, "networkprofile": {"networkinterfaceconfigurations": [{"name": "[concat(variables('nicname'), "-0')]", "properties": {"ipconfigurations": [{"name": "[concat(variables('nicname'),"-",0)]", "properties": {"loadbalancerbackendaddresspools": [{"id": "[variables('lbpoolid0')]"}], "loadbalancerinboundnatpools": [{"id": "[variables('lbnatpoolid0')]"}], "subnet": {"id": "[variables('subnet0ref')]"}}}], "primary": true}}]}, "osprofile": {"adminpassword": "[parameters('adminpassword')]", "adminusername": "[parameters('adminusername')]", "computernameprefix": "[variables('vmnodetype0name')]", "secrets": [{"sourcevault": {"id": "[parameters('sourcevaultresourceid')]"}, "vaultcertificates": [{"certificatestore": "[parameters('certificatestorevalue')]", "certificateurl": "[parameters('certificateurlvalue')]"}]}]}, "storageprofile": {"imagereference": {"publisher": "[parameters('vmimagepublisher')]", "offer": "[parameters('vmimageoffer')]", "sku": "[parameters('vmimagesku')]", "version": "[parameters('vmimageversion')]"}, "osdisk": {"manageddisk": {"storageaccounttype": "standardssd_lrs"}, "caching": "readonly", "createoption": "fromimage"}}}}}
This template deploys a Custom Linux Image behind a load balancer with HTTP load balancing rules and an update script for deploying and updating an app.
{"type": "microsoft.compute/images", "apiversion": "2020-06-01", "name": "[variables('imagename')]", "location": "[parameters('location')]", "properties": {"hypervgeneration": "v1", "storageprofile": {"osdisk": {"ostype": "linux", "osstate": "generalized", "bloburi": "[parameters('sourceimagevhduri')]", "storageaccounttype": "standard_lrs"}}}}{"type": "microsoft.compute/virtualmachinescalesets", "name": "[variables('vmssuniquename')]", "location": "[parameters('location')]", "apiversion": "2020-06-01", "dependson": ["[resourceid('microsoft.network/virtualnetworks", variables('virtualnetworkname'))]", "[resourceid('microsoft.compute/images",variables('imagename'))]"], "sku": {"name": "[parameters('vmsku')]", "tier": "standard", "capacity": "[parameters('capacity')]"}, "properties": {"upgradepolicy": {"mode": "manual"}, "virtualmachineprofile": {"storageprofile": {"imagereference": {"id": "[resourceid('microsoft.compute/images", variables('imagename'))]"}}, "osprofile": {"computernameprefix": "[variables('vmssuniquename')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "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('lbname'), variables('bepoolname'))]"}], "loadbalancerinboundnatpools": [{"id": "[resourceid('microsoft.network/loadbalancers/inboundnatpools", variables('lbname'), variables('natpoolname'))]"}]}}]}}]}, "extensionprofile": {"extensions": [{"name": "updatescriptextension", "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"fileuris": ["[uri(parameters('_artifactslocation'), concat('scripts/updateapp.sh", parameters('_artifactslocationsastoken')))]", "[uri(parameters('_artifactslocation'), concat('app/package.tar.gz", parameters('_artifactslocationsastoken')))]"], "commandtoexecute": "[format(\"sudo bash {0} "{1}" {2} {3}\", \"updateapp.sh\", \"package.tar.gz\", \"/nodeserver\", \"mainsite.service\')]"}}}]}}}}
Storage Account with Storage Service Encryption and a blob deletion retention policy
{"type": "microsoft.storage/storageaccounts", "apiversion": "2021-02-01", "name": "[parameters('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('storageskuname')]", "tier": "[parameters('storageskutier')]"}, "kind": "[parameters('storagekind')]", "properties": {"accesstier": "[parameters('accesstier')]", "allowsharedkeyaccess": false, "supportshttpstrafficonly": true, "allowblobpublicaccess": false, "minimumtlsversion": "tls1_2"}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2016-03-30", "type": "microsoft.network/networksecuritygroups", "name": "[variables('vmnsgname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "ssh", "properties": {"description": "allows ssh traffic", "protocol": "tcp", "sourceportrange": "22", "destinationportrange": "22", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 100, "direction": "inbound"}}]}}{"apiversion": "2016-03-30", "type": "microsoft.network/publicipaddresses", "name": "[variables('vmpipname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "static"}}
Storage Account with Storage Service Encryption and a blob deletion retention policy
{"type": "microsoft.storage/storageaccounts", "name": "[parameters('newstorageaccountname')]", "apiversion": "2021-02-01", "location": "[parameters('location')]", "sku": {"name": "[variables('storageaccounttype')]"}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"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}}{"name": "[variables('cheffeavailname')]", "type": "microsoft.compute/availabilitysets", "location": "[resourcegroup().location]", "apiversion": "2017-12-01", "dependson": [], "tags": {"displayname": "feavailset", "provider": "[variables('tagvalues').provider]"}, "sku": {"name": "aligned"}, "properties": {"platformupdatedomaincount": 3, "platformfaultdomaincount": 3}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2015-06-15", "type": "microsoft.network/publicipaddresses", "name": "[concat(variables('publicipaddressname'), copyindex())]", "location": "[parameters('location')]", "copy": {"name": "publiciploop", "count": 1}, "tags": {"displayname": "publicipaddress"}, "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[concat(variables('dnsname'), copyindex())]"}}}{"apiversion": "2015-06-15", "type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "tags": {"displayname": "virtualnetwork"}, "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "[variables('subnetprefix')]"}}]}}{"apiversion": "2015-06-15", "type": "microsoft.network/networkinterfaces", "name": "[concat(variables('nicname'), copyindex())]", "location": "[parameters('location')]", "copy": {"name": "nicloop", "count": 1}, "tags": {"displayname": "networkinterface"}, "dependson": ["publiciploop", "[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", concat(variables('publicipaddressname'), copyindex()))]"}, "subnet": {"id": "[variables('subnetref')]"}}}]}}{"name": "[variables('nicname')]", "type": "microsoft.network/networkinterfaces", "location": "[parameters('location')]", "apiversion": "2015-06-15", "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]", "[resourceid('microsoft.network/publicipaddresses/", variables('publicipaddressname'))]"], "tags": {"displayname": "rsnetworkinterface"}, "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "subnet": {"id": "[variables('subnetref')]"}, "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", variables('publicipaddressname'))]"}}}]}}{"name": "[variables('publicipaddressname')]", "type": "microsoft.network/publicipaddresses", "location": "[parameters('location')]", "apiversion": "2015-06-15", "tags": {"displayname": "publicrsipaddress"}, "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[variables('dnsname')]"}}}
Deploy SQL Always ON setup with existing SQL Virtual Machines.
{"type": "microsoft.sqlvirtualmachine/sqlvirtualmachines", "apiversion": "2017-03-01-preview", "name": "[trim(variables('existingvmlistarray')[copyindex()])]", "location": "[parameters('location')]", "copy": {"name": "sqlvirtualmachineloop", "count": "[length(variables('existingvmlistarray'))]"}, "properties": {"virtualmachineresourceid": "[resourceid(parameters('existingvmresourcegroup'), "microsoft.compute/virtualmachines", trim(variables('existingvmlistarray')[copyindex()]))]", "sqlserverlicensetype": "[parameters('sqlserverlicensetype')]"}}{"type": "microsoft.sqlvirtualmachine/sqlvirtualmachinegroups", "apiversion": "2017-03-01-preview", "name": "[parameters('failoverclustername')]", "location": "[parameters('location')]", "properties": {"sqlimageoffer": "[parameters('sqlserverimagetype')]", "sqlimagesku": "enterprise", "wsfcdomainprofile": {"domainfqdn": "[parameters('existingfullyqualifieddomainname')]", "oupath": "[parameters('existingoupath')]", "clusterbootstrapaccount": "[parameters('existingdomainaccount')]", "clusteroperatoraccount": "[parameters('existingdomainaccount')]", "sqlserviceaccount": "[parameters('existingsqlserviceaccount')]", "storageaccounturl": "[reference(resourceid('microsoft.storage/storageaccounts", parameters('cloudwitnessname')), "2018-07-01').primaryendpoints["blob"]]", "storageaccountprimarykey": "[listkeys(resourceid('microsoft.storage/storageaccounts", parameters('cloudwitnessname')), "2018-07-01').keys[0].value]"}}}
Create an Application Gateway with Public IP
{"apiversion": "2020-05-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic"}}{"apiversion": "2020-05-01", "type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('addressprefix')]"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "[parameters('subnetprefix')]"}}]}}{"apiversion": "2020-05-01", "name": "[variables('applicationgatewayname')]", "type": "microsoft.network/applicationgateways", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]", "[resourceid('microsoft.network/publicipaddresses/", variables('publicipaddressname'))]"], "properties": {"sku": {"name": "[parameters('skuname')]", "tier": "standard", "capacity": "[parameters('capacity')]"}, "sslcertificates": [{"name": "appgatewaysslcert", "properties": {"data": "[parameters('certdata')]", "password": "[parameters('certpassword')]"}}], "gatewayipconfigurations": [{"name": "appgatewayipconfig", "properties": {"subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('virtualnetworkname'), variables('subnetname'))]"}}}], "frontendipconfigurations": [{"name": "appgatewayfrontendip", "properties": {"publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('publicipaddressname'))]"}}}], "frontendports": [{"name": "appgatewayfrontendport", "properties": {"port": 443}}], "backendaddresspools": [{"name": "appgatewaybackendpool", "properties": {"backendaddresses": [{"ipaddress": "[parameters('backendipaddress1')]"}, {"ipaddress": "[parameters('backendipaddress2')]"}]}}], "backendhttpsettingscollection": [{"name": "appgatewaybackendhttpsettings", "properties": {"port": 80, "protocol": "http", "cookiebasedaffinity": "disabled"}}], "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": "https", "sslcertificate": {"id": "[resourceid('microsoft.network/applicationgateways/sslcertificates",variables('applicationgatewayname'), "appgatewaysslcert')]"}}}], "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')]"}}}]}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"type": "microsoft.compute/virtualmachines", "apiversion": "2020-12-01", "name": "[variables('vmname')[copyindex()]]", "location": "[parameters('location')]", "zones": ["[copyindex(1)]"], "dependson": ["nicloop"], "copy": {"name": "vmloop", "count": 2}, "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmname')[copyindex()]]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[variables('imagesku')]", "version": "latest"}, "osdisk": {"caching": "readonly", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "standardssd_lrs"}}, "datadisks": [{"disksizegb": 64, "lun": 0, "createoption": "empty"}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('nicname')[copyindex()])]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "apiversion": "2020-12-01", "name": "[concat(variables('vmname')[0], "/createadforest')]", "location": "[parameters('location')]", "dependson": ["vmloop"], "properties": {"publisher": "microsoft.powershell", "type": "dsc", "typehandlerversion": "2.24", "autoupgrademinorversion": true, "settings": {"configuration": {"url": "[uri(parameters('_artifactslocation'), "dsc/createadpdc.ps1.zip')]", "script": "createadpdc.ps1", "function": "createadpdc"}, "configurationarguments": {"domainname": "[parameters('domainname')]"}}, "protectedsettings": {"configurationurlsastoken": "[parameters('_artifactslocationsastoken')]", "configurationarguments": {"admincreds": {"username": "[parameters('adminusername')]", "password": "[parameters('adminpassword')]"}}}}}
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", variables('nicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmname')]", "adminusername": "[parameters('adminusername')]", "linuxconfiguration": {"disablepasswordauthentication": true, "ssh": {"publickeys": [{"path": "[concat('/home/",parameters('adminusername'),"/.ssh/authorized_keys')]", "keydata": "[parameters('sshpublickey')]"}]}}}, "storageprofile": {"imagereference": {"publisher": "canonical", "offer": "ubuntuserver", "sku": "18.04-lts", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('nicname'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[concat(reference(resourceid('microsoft.storage/storageaccounts", variables('storageaccountname')), "2020-08-01-preview').primaryendpoints.blob)]"}}}, "resources": [{"type": "extensions", "name": "[variables('vmextensionname')]", "apiversion": "2017-03-30", "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('scripts/", variables('_extensionscript'), parameters('_artifactslocationsastoken')))]"]}, "protectedsettings": {"commandtoexecute": "[concat('sh tigscript.sh", " ", variables('_configfilelocation'))]"}}}]}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"type": "microsoft.compute/availabilitysets", "name": "[concat(variables('availabilitysetname'), "-", copyindex())]", "apiversion": "2020-06-01", "location": "[parameters('location')]", "copy": {"name": "asloop", "count": 2}, "properties": {"platformfaultdomaincount": 2, "platformupdatedomaincount": 2}, "sku": {"name": "aligned"}}{"type": "microsoft.compute/virtualmachines", "name": "[concat('myvm", copyindex())]", "apiversion": "2020-06-01", "location": "[parameters('location')]", "copy": {"name": "virtualmachineloop", "count": "[parameters('numberofinstances')]"}, "dependson": ["[resourceid('microsoft.network/networkinterfaces", concat('nic", copyindex()))]", "asloop"], "properties": {"availabilityset": {"id": "[resourceid('microsoft.compute/availabilitysets", concat(variables('availabilitysetname'), "-", mod(copyindex(),2)))]"}, "hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[concat('vm", copyindex())]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": "[variables('imagereference')[parameters('os')]]", "osdisk": {"createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", concat('nic", copyindex()))]"}]}}}
This template creates an automation rule that triggers on incident creation (with certain conditions), executes a playbook and modifies two incident properies
{"type": "microsoft.securityinsights/automationrules", "name": "[variables('automationruleguid')]", "scope": "[concat('microsoft.operationalinsights/workspaces/", parameters('existingworkspacename'))]", "apiversion": "2019-01-01-preview", "properties": {"displayname": "[parameters('automationrulename')]", "order": 2, "triggeringlogic": {"isenabled": true, "expirationtimeutc": none, "triggerson": "incidents", "triggerswhen": "created", "conditions": [{"conditiontype": "property", "conditionproperties": {"propertyname": "incidentrelatedanalyticruleids", "operator": "contains", "propertyvalues": ["[resourceid('microsoft.operationalinsights/workspaces/providers/alertrules",parameters('existingworkspacename'),"microsoft.securityinsights",parameters('existingruleid'))]"]}}, {"conditiontype": "property", "conditionproperties": {"propertyname": "incidentseverity", "operator": "equals", "propertyvalues": ["high"]}}, {"conditiontype": "property", "conditionproperties": {"propertyname": "incidenttactics", "operator": "contains", "propertyvalues": ["initialaccess", "execution"]}}, {"conditiontype": "property", "conditionproperties": {"propertyname": "incidenttitle", "operator": "contains", "propertyvalues": ["urgent"]}}]}, "actions": [{"order": 2, "actiontype": "modifyproperties", "actionconfiguration": {"status": "closed", "classification": "undetermined", "classificationreason": none}}, {"order": 3, "actiontype": "modifyproperties", "actionconfiguration": {"labels": [{"labelname": "tag"}]}}]}}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"apiversion": "2021-04-01", "type": "microsoft.storage/storageaccounts", "name": "[variables('storageaccountname')]", "location": "[variables('location')]", "sku": {"name": "standard_ragrs"}, "kind": "storagev2", "properties": {"supportshttpstrafficonly": false, "accesstier": "hot", "encryption": {"services": {"blob": {"enabled": true}, "file": {"enabled": true}}, "keysource": "microsoft.storage"}}}
Creates a new VM with two NICs which connect to two different subnets within the same VNet.
{"type": "microsoft.compute/virtualmachines", "apiversion": "2020-06-01", "name": "[variables('virtualmachinename')]", "location": "[parameters('location')]", "properties": {"osprofile": {"computername": "[variables('virtualmachinename')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]", "windowsconfiguration": {"provisionvmagent": true}}, "hardwareprofile": {"vmsize": "[parameters('virtualmachinesize')]"}, "storageprofile": {"imagereference": {"publisher": "microsoftwindowsserver", "offer": "windowsserver", "sku": "2019-datacenter", "version": "latest"}, "osdisk": {"createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"properties": {"primary": true}, "id": "[resourceid('microsoft.network/networkinterfaces", variables('nic1name'))]"}, {"properties": {"primary": false}, "id": "[resourceid('microsoft.network/networkinterfaces", variables('nic2name'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(resourceid('microsoft.storage/storageaccounts", variables('diagstorageaccountname'))).primaryendpoints.blob]"}}}, "dependson": ["[resourceid('microsoft.storage/storageaccounts", variables('diagstorageaccountname'))]", "[resourceid('microsoft.network/networkinterfaces", variables('nic1name'))]", "[resourceid('microsoft.network/networkinterfaces", variables('nic2name'))]"]}
Provision an Azure Cognitive Search service
{"type": "microsoft.search/searchservices", "apiversion": "2020-08-01", "name": "[parameters('name')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('sku')]"}, "properties": {"replicacount": "[parameters('replicacount')]", "partitioncount": "[parameters('partitioncount')]", "hostingmode": "[parameters('hostingmode')]"}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"type": "microsoft.compute/virtualmachines", "apiversion": "2020-12-01", "name": "[variables('vns3controllername')]", "location": "[parameters('location')]", "plan": {"name": "cohesive-vns3-4_11_x-free", "product": "vns3_4x_network_security", "publisher": "cohesive"}, "dependson": ["[resourceid('microsoft.network/networkinterfaces", variables('networkinterfacename'))]", "[resourceid('microsoft.storage/storageaccounts", variables('storageaccount'))]"], "tags": {"name": "vns3 controller"}, "properties": {"hardwareprofile": {"vmsize": "[parameters('instancesize')]"}, "storageprofile": {"imagereference": {"publisher": "cohesive", "offer": "vns3_4x_network_security", "sku": "cohesive-vns3-4_11_x-free", "version": "latest"}, "osdisk": {"ostype": "linux", "name": "[concat(variables('vns3controllername'), "-disc')]", "createoption": "fromimage", "caching": "readwrite", "manageddisk": {"storageaccounttype": "standardssd_lrs"}, "disksizegb": 30}}, "osprofile": {"computername": "[variables('vns3controllername')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]", "linuxconfiguration": {"disablepasswordauthentication": false, "provisionvmagent": true}, "allowextensionoperations": true}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('networkinterfacename'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('storageaccount'),"2021-01-01').primaryendpoints["blob"]]"}}}}{"type": "microsoft.compute/virtualmachines", "apiversion": "2020-12-01", "name": "[concat('ubuntuvm", copyindex())]", "location": "[parameters('location')]", "copy": {"name": "virtualmachineloop", "count": "[parameters('numberofinstances')]"}, "dependson": ["nicloop"], "properties": {"hardwareprofile": {"vmsize": "[parameters('instancesize')]"}, "osprofile": {"computername": "[concat('ubuntuvm", copyindex())]", "adminusername": "[parameters('adminusernameubuntu')]", "adminpassword": "[parameters('adminpasswordubuntu')]"}, "storageprofile": {"imagereference": "[variables('ubuntu')]", "osdisk": {"createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",concat('nic-ubuntuvm", copyindex()))]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "apiversion": "2020-12-01", "name": "[concat('ubuntuvm", copyindex(), "/", variables('customscriptforlinux'))]", "location": "[parameters('location')]", "copy": {"name": "customscriploop", "count": "[parameters('numberofinstances')]"}, "dependson": ["virtualmachineloop"], "properties": {"publisher": "microsoft.azure.extensions", "type": "[variables('customscriptforlinux')]", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"fileuris": ["[variables('scriptfileuri')]"], "commandtoexecute": "[variables('customscriptcommandtoexecute')]"}}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"type": "microsoft.compute/virtualmachines", "apiversion": "2020-06-01", "name": "[concat(variables('virtualmachines_myvm_name'), copyindex(1))]", "location": "[parameters('location')]", "copy": {"name": "vm-loop", "count": 2}, "dependson": ["[resourceid('microsoft.network/networkinterfaces", concat(variables('net_interface'), copyindex(1)))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "storageprofile": {"imagereference": {"publisher": "microsoftwindowsserver", "offer": "windowsserver", "sku": "2016-datacenter", "version": "latest"}, "osdisk": {"ostype": "windows", "createoption": "fromimage", "caching": "readwrite", "manageddisk": {"storageaccounttype": "standardssd_lrs"}, "disksizegb": 127}}, "osprofile": {"computername": "[concat(variables('virtualmachines_myvm_name'), copyindex(1))]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]", "windowsconfiguration": {"provisionvmagent": true, "enableautomaticupdates": true}, "allowextensionoperations": true}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", concat(variables('net_interface'), copyindex(1)))]"}]}}}
Storage Account with Storage Service Encryption and a blob deletion retention policy
{"type": "microsoft.storage/storageaccounts", "name": "[variables('newstorageaccount')]", "apiversion": "2021-02-01", "location": "[parameters('location')]", "sku": {"name": "[variables('storageaccounttype')]"}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"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/", 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('imagesku')]", "version": "[variables('imageversion')]"}, "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": "2015-06-15", "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('configure-eth-cpp.sh", parameters('_artifactslocationsastoken')))]"], "commandtoexecute": "[concat('sh configure-eth-cpp.sh ", parameters('adminusername'))]"}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"apiversion": "2019-10-01", "type": "microsoft.resources/deployments", "name": "[variables('solacesecuritytemplatename')]", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('securitysharedtemplateuri')]", "contentversion": "1.0.0.0"}, "parameters": {"securitygroupname": {"value": "[parameters('securitygroupname')]"}, "subnetprefix": {"value": "[parameters('subnetprefix')]"}, "location": {"value": "[parameters('location')]"}}}}
This template creates a Service Bus namespace and 2 queues and sets auto forwarding.
{"apiversion": "2017-04-01", "name": "[parameters('servicebusnamespacename')]", "type": "microsoft.servicebus/namespaces", "location": "[parameters('location')]", "sku": {"name": "standard"}, "properties": {}, "resources": [{"apiversion": "2017-04-01", "name": "[parameters('servicebusqueuename1')]", "type": "queues", "dependson": ["[resourceid('microsoft.servicebus/namespaces", parameters('servicebusnamespacename'))]"], "properties": {"lockduration": "pt5m", "maxsizeinmegabytes": "1024", "requiresduplicatedetection": "false", "requiressession": "false", "defaultmessagetimetolive": "p10675199dt2h48m5.4775807s", "deadletteringonmessageexpiration": "false", "duplicatedetectionhistorytimewindow": "pt10m", "maxdeliverycount": "10", "autodeleteonidle": "p10675199dt2h48m5.4775807s", "enablepartitioning": "false", "enableexpress": "false"}}, {"apiversion": "2017-04-01", "name": "[parameters('servicebusqueuename2')]", "type": "queues", "dependson": ["[resourceid('microsoft.servicebus/namespaces", parameters('servicebusnamespacename'))]", "[resourceid('microsoft.servicebus/namespaces/queues/", parameters('servicebusnamespacename'),parameters('servicebusqueuename1'))]"], "properties": {"lockduration": "pt5m", "maxsizeinmegabytes": "1024", "requiresduplicatedetection": "false", "requiressession": "false", "defaultmessagetimetolive": "p10675199dt2h48m5.4775807s", "deadletteringonmessageexpiration": "false", "duplicatedetectionhistorytimewindow": "pt10m", "maxdeliverycount": "10", "autodeleteonidle": "p10675199dt2h48m5.4775807s", "enablepartitioning": "false", "enableexpress": "false", "forwardto": "[parameters('servicebusqueuename1')]", "forwarddeadletteredmessagesto": "[parameters('servicebusqueuename1')]"}}]}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"apiversion": "2021-04-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": "2020-05-01", "name": "[variables('lbname')]", "type": "microsoft.network/loadbalancers", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/publicipaddresses/", variables('publicipaddressname'))]"], "properties": {"frontendipconfigurations": [{"name": "loadbalancerfrontend", "properties": {"publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", variables('publicipaddressname'))]"}}}], "backendaddresspools": [{"name": "backendpool1"}], "inboundnatrules": [{"name": "rdp-vm0", "properties": {"frontendipconfiguration": {"id": "[resourceid('microsoft.network/loadbalancers/frontendipconfigurations", variables('lbname'), "loadbalancerfrontend')]"}, "protocol": "tcp", "frontendport": 50001, "backendport": 3389, "enablefloatingip": false}}]}}
This template creates a data collection rule defining the data source (Syslog) and the destination workspace.
{"type": "microsoft.insights/components", "apiversion": "2020-02-02", "name": "[variables('applicationinsightsname')]", "location": "[if(or(equals(parameters('location'),"eastus2'), equals(parameters('location'),"westcentralus')),"southcentralus",parameters('location'))]", "kind": "web", "properties": {"application_type": "web"}}
which shows how we can correlate messages over Logic Apps using Azure Service Bus
{"type": "microsoft.logic/workflows", "apiversion": "2019-05-01", "name": "[parameters('logicappname')]", "dependson": ["[resourceid('microsoft.web/connections", parameters('slackconnectionname'))]"], "location": "[parameters('location')]", "properties": {"definition": {"$schema": "https://schema.management.azure.com/providers/microsoft.logic/schemas/2016-06-01/workflowdefinition.json#", "contentversion": "1.0.0.0", "parameters": {"$connections": {"defaultvalue": {}, "type": "object"}}, "triggers": {"manual": {"type": "request", "kind": "http", "inputs": {"schema": {"$schema": "http://json-schema.org/draft-04/schema#", "properties": {"context": {"properties": {"name": {"type": "string"}, "portallink": {"type": "string"}, "resourcename": {"type": "string"}}, "required": ["name", "portallink", "resourcename"], "type": "object"}, "status": {"type": "string"}}, "required": ["status", "context"], "type": "object"}}}}, "actions": {"http": {"type": "http", "inputs": {"body": {"longurl": "@{triggerbody()["context"]["portallink"]}"}, "headers": {"content-type": "application/json"}, "method": "post", "uri": "https://www.googleapis.com/urlshortener/v1/url?key=aizasybkt1brba-uulhz8hmuai0ywjtpnlxhshi"}}, "post_message": {"type": "apiconnection", "inputs": {"host": {"connection": {"name": "@parameters('$connections')["slack"]["connectionid"]"}}, "method": "post", "path": "/chat.postmessage", "queries": {"channel": "[parameters('slackchannel')]", "text": "azure alert - "@{triggerbody()["context"]["name"]}" @{triggerbody()["status"]} on "@{triggerbody()["context"]["resourcename"]}". details: @{body('http')["id"]}"}}, "runafter": {"http": ["succeeded"]}}}, "outputs": {}}, "parameters": {"$connections": {"value": {"slack": {"id": "[subscriptionresourceid('microsoft.web/locations/managedapis", parameters('location'), "slack')]", "connectionid": "[resourceid('microsoft.web/connections", parameters('slackconnectionname'))]"}}}}}}
Create and assign a standard App Service Certificate
{"type": "microsoft.web/sites/domainownershipidentifiers", "name": "[concat(parameters('existingappname'), concat('/", parameters('certificateordername')))]", "apiversion": "2016-08-01", "location": "[parameters('existingapplocation')]", "dependson": ["[resourceid('microsoft.certificateregistration/certificateorders", parameters('certificateordername'))]"], "properties": {"id": "[reference(resourceid('microsoft.certificateregistration/certificateorders", parameters('certificateordername'))).domainverificationtoken]"}}{"type": "microsoft.web/certificates", "name": "[parameters('certificateordername')]", "apiversion": "2015-08-01", "location": "[parameters('existingapplocation')]", "dependson": ["[resourceid('microsoft.certificateregistration/certificateorders/certificates", parameters('certificateordername'), parameters('certificateordername'))]"], "properties": {"keyvaultid": "[parameters('existingkeyvaultid')]", "keyvaultsecretname": "[parameters('certificateordername')]"}}{"type": "microsoft.web/sites", "name": "[parameters('existingappname')]", "apiversion": "2015-08-01", "location": "[parameters('existingapplocation')]", "dependson": ["[resourceid('microsoft.web/certificates", parameters('certificateordername'))]"], "properties": {"name": "[parameters('existingappname')]", "hostnamesslstates": [{"name": "[parameters('roothostname')]", "sslstate": 1, "thumbprint": "[reference(resourceid('microsoft.certificateregistration/certificateorders", parameters('certificateordername'))).signedcertificate.thumbprint]", "toupdate": true}, {"name": "[variables('wwwhostname')]", "sslstate": 1, "thumbprint": "[reference(resourceid('microsoft.certificateregistration/certificateorders", parameters('certificateordername'))).signedcertificate.thumbprint]", "toupdate": true}]}}
Storage Account with Storage Service Encryption and a blob deletion retention policy
{"name": "[variables('blobstorageaccountname')]", "type": "microsoft.storage/storageaccounts", "apiversion": "2019-06-01", "tags": {"displayname": "[variables('blobstorageaccountname')]"}, "location": "[parameters('location')]", "kind": "storagev2", "sku": {"name": "standard_lrs", "tier": "standard"}, "properties": {"networkacls": {"bypass": "azureservices", "defaultaction": "deny"}}, "resources": [{"type": "blobservices/containers", "apiversion": "2019-06-01", "name": "default/defaultcontainer", "dependson": ["[resourceid('microsoft.storage/storageaccounts", variables('blobstorageaccountname'))]"]}]}
This template creates a data collection rule defining the data source (Syslog) and the destination workspace.
{"type": "microsoft.insights/actiongroups", "apiversion": "2019-06-01", "name": "[parameters('actiongroupname')]", "location": "global", "properties": {"groupshortname": "[parameters('actiongroupshortname')]", "enabled": true, "emailreceivers": [{"name": "emailreceiver", "emailaddress": "[parameters('emailaddress')]"}]}}
This template creates a Service Bus namespace and a queue.
{"type": "microsoft.servicebus/namespaces", "apiversion": "2017-04-01", "name": "[parameters('servicebusnamespacename')]", "location": "[parameters('location')]", "sku": {"name": "standard"}, "properties": {}}{"type": "microsoft.servicebus/namespaces/queues", "apiversion": "2017-04-01", "name": "[format('{0}/{1}", parameters('servicebusnamespacename'), parameters('servicebusqueuename'))]", "properties": {"lockduration": "pt5m", "maxsizeinmegabytes": 1024, "requiresduplicatedetection": false, "requiressession": false, "defaultmessagetimetolive": "p10675199dt2h48m5.4775807s", "deadletteringonmessageexpiration": false, "duplicatedetectionhistorytimewindow": "pt10m", "maxdeliverycount": 10, "autodeleteonidle": "p10675199dt2h48m5.4775807s", "enablepartitioning": false, "enableexpress": false}, "dependson": ["[resourceid('microsoft.servicebus/namespaces", parameters('servicebusnamespacename'))]"]}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2015-05-01-preview", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[variables('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[variables('uniquednsnameforpublicip')]"}}}{"apiversion": "2015-05-01-preview", "type": "microsoft.network/networksecuritygroups", "name": "[variables('nsgname')]", "location": "[variables('location')]", "properties": {"securityrules": [{"name": "nsgsrule", "properties": {"protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 101, "direction": "inbound"}}]}}{"apiversion": "2015-05-01-preview", "type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "location": "[variables('location')]", "dependson": ["[concat('microsoft.network/networksecuritygroups/", variables('nsgname'))]"], "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "[variables('subnetprefix')]", "networksecuritygroup": {"id": "[variables('nsgid')]"}}}]}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"type": "microsoft.resources/deployments", "name": "storageaccount", "apiversion": "2021-01-01", "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'),concat('nested/storageaccount.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"storageaccountname": {"value": "[variables('storageaccountname')]"}, "storageaccounttype": {"value": "[variables('storageaccounttype')]"}, "location": {"value": "[parameters('location')]"}}}}{"type": "microsoft.resources/deployments", "name": "datafactory", "apiversion": "2021-01-01", "dependson": ["kibanaesdeployedvm"], "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'),concat('nested/datafactory.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"kibanaesdeployedvmip": {"value": "[reference('kibanaesdeployedvm').outputs.publicipaddress.value]"}, "storageaccountname": {"value": "[variables('storageaccountname')]"}, "_artifactslocation": {"value": "[variables('artloc')]"}, "_artifactslocationsastoken": {"value": "[parameters('_artifactslocationsastoken')]"}, "datafactoryname": {"value": "[parameters('datafactoryname')]"}, "datafactorylocation": {"value": "[parameters('location')]"}, "blobcontainer": {"value": "[variables('blobcontainer')]"}, "serviceprincipalid": {"value": "[parameters('serviceprincipalid')]"}, "serviceprincipalkey": {"value": "[parameters('serviceprincipalkey')]"}}}}{"type": "microsoft.resources/deployments", "name": "datalakeanalytics", "apiversion": "2021-01-01", "dependson": ["storageaccount"], "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'),concat('nested/datalakeanalytics.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"adlanalyticsname": {"value": "[parameters('adlanalyticsname')]"}, "adlstorename": {"value": "[parameters('adlstorename')]"}, "storageaccountname": {"value": "[variables('storageaccountname')]"}, "datalakeanalyticslocation": {"value": "[parameters('datalakeanalyticslocation')]"}}}}{"type": "microsoft.resources/deployments", "name": "eventhubtemplate", "apiversion": "2021-01-01", "dependson": ["datalakeanalytics"], "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'),concat('nested/eventhub.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"eventhubnamespacename": {"value": "[parameters('eventhubnamespacename')]"}, "location": {"value": "[parameters('location')]"}, "eventhubsku": {"value": "[parameters('eventhubsku')]"}, "skucapacity": {"value": "[parameters('skucapacity')]"}, "isautoinflateenabled": {"value": "[parameters('isautoinflateenabled')]"}, "maximumthroughputunits": {"value": "[variables('maximumthroughputunits')]"}, "datacleaninginputstream": {"value": "[variables('datacleaninginputstream')]"}, "datacleaningoutputstream": {"value": "[variables('datacleaningoutputstream')]"}, "messageretentionindays": {"value": "[parameters('messageretentionindays')]"}, "partitioncount": {"value": "[parameters('partitioncount')]"}, "captureencodingformat": {"value": "[parameters('captureencodingformat')]"}, "capturetime": {"value": "[parameters('capturetime')]"}, "capturesize": {"value": "[parameters('capturesize')]"}, "storageaccountname": {"value": "[variables('storageaccountname')]"}, "capturenameformat": {"value": "[variables('capturenameformat')]"}}}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"apiversion": "2019-12-01", "type": "microsoft.compute/availabilitysets", "name": "[variables('availabilitysetnodes')]", "location": "[parameters('location')]", "properties": {"platformfaultdomaincount": 2, "platformupdatedomaincount": 5}, "sku": {"name": "aligned"}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2021-03-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[parameters('dnslabelprefix')]"}}}{"apiversion": "2021-03-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": "[variables('nsgid')]"}}}]}}{"apiversion": "2021-03-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": "http for open edx lms", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "80", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 201, "direction": "inbound"}}, {"name": "cms", "properties": {"description": "http for open edx cms", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "18010", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 203, "direction": "inbound"}}, {"name": "port_8080", "properties": {"description": "https", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 213, "direction": "inbound"}}]}}{"apiversion": "2021-03-01", "type": "microsoft.network/networkinterfaces", "name": "[concat(variables('vmname'), "-nic')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/publicipaddresses/", variables('publicipaddressname'))]", "[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfignodenam2", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", variables('publicipaddressname'))]"}, "subnet": {"id": "[variables('subnetref')]"}}}]}}
Application Gateway routing Internet traffic to a virtual network (internal mode) API Management instance which services a web API hosted in an Azure Web App.
{"type": "microsoft.web/serverfarms", "apiversion": "2020-06-01", "name": "[parameters('hostingplanlivesite')]", "location": "[parameters('location')]", "tags": {"displayname": "hostingplan"}, "sku": {"name": "[parameters('pricingtierlivesite')]", "capacity": 1}, "properties": {"name": "[parameters('hostingplanlivesite')]"}}{"type": "microsoft.web/sites", "apiversion": "2020-06-01", "name": "[parameters('livesitename')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/serverfarms", parameters('hostingplanlivesite'))]", "[resourceid('microsoft.insights/components", parameters('livesitename'))]"], "tags": {"[format('{0}:{1}", "hidden-related", resourceid('microsoft.web/serverfarms", parameters('hostingplanlivesite')))]": "empty", "displayname": "website"}, "properties": {"name": "[parameters('livesitename')]", "serverfarmid": "[resourceid('microsoft.web/serverfarms", parameters('hostingplanlivesite'))]", "mintlsversion": "1.2", "siteconfig": {"connectionstrings": [{"name": "cmsconnectionstring", "connectionstring": "[if(empty(parameters('connectionstringdatabasename')),"",concat('data source=tcp:", reference(resourceid('microsoft.sql/servers", parameters('sqlservername'))).fullyqualifieddomainname, ",1433;initial catalog=", parameters('connectionstringdatabasename'), ";user id=", parameters('sqladministratorlogin'), "@", parameters('sqlservername'), ";password=", parameters('sqladministratorpassword'), ";'))]", "type": "sqlserver"}], "appsettings": [{"name": "appinsights_instrumentationkey", "value": "[reference(variables('instrumentationkey')).instrumentationkey]"}]}}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-05-01", "type": "microsoft.network/publicipaddresses", "name": "[concat(variables('publicipname'), copyindex())]", "copy": {"name": "publiciploop", "count": "[variables('numberofinstances')]"}, "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic"}}{"apiversion": "2020-05-01", "type": "microsoft.network/publicipaddresses", "name": "lbpublicip", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic"}}{"apiversion": "2020-05-01", "type": "microsoft.network/publicipaddresses", "name": "lbpublicip-v6", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic", "publicipaddressversion": "ipv6"}}{"apiversion": "2020-05-01", "name": "loadbalancer", "type": "microsoft.network/loadbalancers", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/publicipaddresses","lbpublicip')]", "[resourceid('microsoft.network/publicipaddresses","lbpublicip-v6')]"], "properties": {"frontendipconfigurations": [{"name": "lbfe", "properties": {"publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", "lbpublicip')]"}}}, {"name": "lbfe-v6", "properties": {"publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses","lbpublicip-v6')]"}}}], "backendaddresspools": [{"name": "lbbap"}, {"name": "lbbap-v6"}], "loadbalancingrules": [{"properties": {"frontendipconfiguration": {"id": "[resourceid('microsoft.network/loadbalancers/frontendipconfigurations", "loadbalancer", "lbfe')]"}, "backendaddresspool": {"id": "[resourceid('microsoft.network/loadbalancers/backendaddresspools", "loadbalancer", "lbbap')]"}, "protocol": "tcp", "frontendport": 80, "backendport": 80, "idletimeoutinminutes": 15}, "name": "lbrule"}, {"properties": {"frontendipconfiguration": {"id": "[resourceid('microsoft.network/loadbalancers/frontendipconfigurations", "loadbalancer", "lbfe-v6')]"}, "backendaddresspool": {"id": "[resourceid('microsoft.network/loadbalancers/backendaddresspools", "loadbalancer", "lbbap-v6')]"}, "protocol": "tcp", "frontendport": 80, "backendport": 80}, "name": "lbrule-v6"}]}}{"apiversion": "2020-05-01", "type": "microsoft.network/virtualnetworks", "name": "vnet", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('vnetv4addressrange')]", "[variables('vnetv6addressrange')]"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefixes": ["[variables('subnetv4addressrange')]", "[variables('subnetv6addressrange')]"]}}]}}{"apiversion": "2020-05-01", "type": "microsoft.network/networksecuritygroups", "name": "dsnsg", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allow-http-in", "properties": {"description": "allow http", "protocol": "tcp", "sourceportrange": "80", "destinationportrange": "80", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 1001, "direction": "inbound"}}, {"name": "allow-all-out", "properties": {"description": "allow out all", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 1002, "direction": "outbound"}}, {"name": "allow-rdp-in", "properties": {"description": "allow rdp", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "3389", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 1003, "direction": "inbound"}}, {"name": "allow-myipv6app-out", "properties": {"description": "allow my ipv6 app", "protocol": "tcp", "sourceportrange": "33819-33829", "destinationportrange": "5000-6000", "sourceaddressprefix": "ace:cab:deca:deed::/64", "destinationaddressprefixes": ["cab:cab:aaaa:bbbb::/64", "cab:cab:1111:2222::/64"], "access": "allow", "priority": 1004, "direction": "outbound"}}]}}{"type": "microsoft.network/routetables", "name": "v6routetable", "apiversion": "2020-05-01", "location": "[parameters('location')]", "properties": {"routes": [{"name": "v6route", "properties": {"addressprefix": "cab:cab::/96", "nexthoptype": "virtualappliance", "nexthopipaddress": "ace:cab:deca:f00d::1"}}]}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"type": "microsoft.compute/virtualmachines", "name": "[variables('vm01name')]", "apiversion": "2019-12-01", "location": "[parameters('location')]", "tags": {"displayname": "iis01"}, "dependson": ["[resourceid('microsoft.network/networkinterfaces/", concat(variables('vm01name'), "_nic'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vm01name')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[variables('windowsosversion')]", "version": "latest"}, "osdisk": {"caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"properties": {"primary": true}, "id": "[resourceid('microsoft.network/networkinterfaces", concat(variables('vm01name'), "_nic'))]"}]}}}
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('servicebusnamespaceprivatednszonename')]", "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('servicebusnamespaceprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('servicebusnamespaceprivatednszoneid')]", "[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')]"}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"apiversion": "2015-01-01", "name": "[variables('nesteddeploymentnamevnet')]", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[concat(variables('github'), parameters('neworexistingsubnet'), "vnet.json')]", "contentversion": "1.0.0.0"}, "parameters": {"vnetname": {"value": "[variables('vnetname')]"}, "addressprefix": {"value": "[variables('addressprefix')]"}, "subnetname": {"value": "[variables('subnetname')]"}, "subnetprefix": {"value": "[variables('subnetprefix')]"}}}}{"apiversion": "2015-01-01", "name": "[variables('nesteddeploymentnamenic')]", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[concat(variables('github'), "nic-config.json')]", "contentversion": "1.0.0.0"}, "parameters": {"vnetname": {"value": "[variables('vnetname')]"}, "subnetname": {"value": "[variables('subnetname')]"}, "publicipname": {"value": "[variables('publicipname')]"}, "nsgname": {"value": "[variables('nsgname')]"}, "neworexistingsubnet": {"value": "[parameters('neworexistingsubnet')]"}, "subnetid": {"value": "[parameters('subnetid')]"}}}}{"apiversion": "2015-01-01", "name": "[variables('nesteddeploymentnameprof')]", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[concat(variables('github'), "os-disk-parts-md.json')]", "contentversion": "1.0.0.0"}, "parameters": {"imagesku": {"value": ""}, "imagepublisher": {"value": ""}, "imageoffer": {"value": ""}, "osdisktype": {"value": "[variables('osdisktype')]"}, "ostype": {"value": "[variables('internalostype')]"}, "sidlower": {"value": "[variables('sidlower')]"}, "vmname": {"value": "[variables('vmname')]"}, "storagetype": {"value": "[variables('internalstoragetype')]"}, "manageddiskid": {"value": "[parameters('userimageid')]"}}}}{"apiversion": "2015-01-01", "name": "[variables('nesteddeploymentnamepip')]", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[concat(variables('github'), parameters('neworexistingsubnet'), "pip.json')]", "contentversion": "1.0.0.0"}, "parameters": {"publicipname": {"value": "[variables('publicipname')]"}, "publicipaddresstype": {"value": "[variables('publicipaddresstype')]"}}}}{"apiversion": "2015-01-01", "name": "[variables('nesteddeploymentnamensg')]", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[concat(variables('github'), parameters('neworexistingsubnet'), "nsg.json')]", "contentversion": "1.0.0.0"}, "parameters": {"nsgname": {"value": "[variables('nsgname')]"}, "ostype": {"value": "[variables('internalostype')]"}}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"type": "microsoft.resources/deployments", "apiversion": "2019-10-01", "name": "ansibleroleassignment", "dependson": ["[resourceid('microsoft.compute/virtualmachines", variables('ansible_vm_name'))]", "[resourceid('microsoft.resources/deployments","ansibleaccesspolicy')]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('role_assignment_template')]"}, "parameters": {"roleassignmentname": {"value": "[guid(resourceid('microsoft.compute/virtualmachines", variables('ansible_vm_name')), variables('reader_role'), variables('rbacprincipalid'))]"}, "roledefinitionid": {"value": "[variables('reader_role')]"}, "principalid": {"value": "[reference(resourceid('microsoft.compute/virtualmachines",variables('ansible_vm_name')),"2019-07-01","full').identity.principalid]"}}}}{"type": "microsoft.resources/deployments", "apiversion": "2019-10-01", "name": "ansibleaccesspolicy", "dependson": ["[resourceid('microsoft.compute/virtualmachines", variables('ansible_vm_name'))]", "[resourceid('microsoft.keyvault/vaults", variables('key_vault_name'))]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('access_policy_template')]"}, "parameters": {"keyvaultname": {"value": "[variables('key_vault_name')]"}, "tenantid": {"value": "[variables('tenantid')]"}, "objectid": {"value": "[reference(resourceid('microsoft.compute/virtualmachines",variables('ansible_vm_name')),"2019-12-01", "full').identity.principalid]"}, "secretspermissions": {"value": "[variables('secretspermissions')]"}, "keyspermissions": {"value": "[variables('keyspermissions')]"}, "certificatespermissions": {"value": "[variables('certificatespermissions')]"}}}}{"type": "microsoft.resources/deployments", "apiversion": "2019-10-01", "name": "phase1-ansiblehostsetup", "dependson": ["[resourceid('microsoft.compute/virtualmachines", variables('ansible_vm_name'))]", "[resourceid('microsoft.resources/deployments","ansibleaccesspolicy')]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('linux_extension_template')]"}, "parameters": {"location": {"value": "[parameters('location')]"}, "vmname": {"value": "[variables('ansible_vm_name')]"}, "commandtoexecute": {"value": "[concat('mkdir -p /var/log/sas/install && set -o pipefail; ./ansible_setup.sh"," ",parameters('storageaccountname')," ",parameters('filesharename')," ",parameters('viyarepofolder')," ",parameters('sasapplicationname')," ",variables('domain_name')," ",variables('ansible_vm_name')," ",variables('microservices_vm_name')," ",variables('cascontroller_vm_name')," ",variables('spre_vm_name')," ",variables('casworker_vm_name')," ",variables('key_vault_secretname_sasinst')," ",variables('key_vault_secretname_sasext')," ",variables('key_vault_name')," ",variables('key_vault_secretname_pvtkey')," ",variables('key_vault_secretname_pubkey')," ",parameters('numberofviyacasnodes')," ",variables('mid_vm_name')," ",parameters('_artifactslocation')," ",variables('compute_vm_name')," ",variables('meta_vm_name')," ",variables('key_vault_secretname_stgacc')," ",variables('storage_account_uri')," ","2>&1 | tee /var/log/sas/install/runphase1_hostsetup.log')]"}, "filepath": {"value": "scripts/ansible_setup.sh"}, "_artifactslocation": {"value": "[parameters('_artifactslocation')]"}, "_artifactslocationsastoken": {"value": "[parameters('_artifactslocationsastoken')]"}}}}{"type": "microsoft.resources/deployments", "apiversion": "2019-10-01", "name": "phase2-ansiblesslcopy", "dependson": ["[resourceid('microsoft.compute/virtualmachines", variables('ansible_vm_name'))]", "[resourceid('microsoft.resources/deployments","phase2-metainstall')]", "[resourceid('microsoft.resources/deployments","phase2-midinstall')]", "[resourceid('microsoft.resources/deployments","phase2-computeinstall')]", "[resourceid('microsoft.resources/deployments","phase4-viyainstallpart2')]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('linux_extension_template')]", "contentversion": "1.0.0.0"}, "parameters": {"location": {"value": "[parameters('location')]"}, "vmname": {"value": "[variables('ansible_vm_name')]"}, "commandtoexecute": {"value": "[concat('set -o pipefail;./ansible_ssl.sh 2>&1 | tee /var/log/sas/install/runphase2ansiblesslcopy.log;')]"}, "filepath": {"value": "scripts/ansible_ssl.sh"}, "_artifactslocation": {"value": "[parameters('_artifactslocation')]"}, "_artifactslocationsastoken": {"value": "[parameters('_artifactslocationsastoken')]"}}}}{"type": "microsoft.resources/deployments", "apiversion": "2019-10-01", "name": "phase3-viyainstallpart1", "dependson": ["[resourceid('microsoft.resources/deployments", "phase1-ansiblehostsetup')]", "[resourceid('microsoft.resources/deployments", "phase2-microservicesviyaark')]", "[resourceid('microsoft.resources/deployments", "phase2-spreviyaark')]", "[resourceid('microsoft.resources/deployments", "phase2-cascontrollerviyaark')]", "casworkerviyaarkcopy"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('linux_extension_template')]"}, "parameters": {"location": {"value": "[parameters('location')]"}, "vmname": {"value": "[variables('ansible_vm_name')]"}, "commandtoexecute": {"value": "[concat('set -o pipefail;","./viyainstall.sh"," ", "1"," ","2>&1 | tee /var/log/sas/install/runphase3_viyainstallpart1.log')]"}, "filepath": {"value": "scripts/viyainstall.sh"}, "_artifactslocation": {"value": "[parameters('_artifactslocation')]"}, "_artifactslocationsastoken": {"value": "[parameters('_artifactslocationsastoken')]"}}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"name": "shared-resources", "type": "microsoft.resources/deployments", "apiversion": "2020-08-01", "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'), concat(variables('sharedtemplatename'), ".json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"location": {"value": "[parameters('location')]"}, "storageaccountname": {"value": "[parameters('storageaccountname')]"}, "virtualnetworkname": {"value": "[parameters('virtualnetworkname')]"}, "addressprefix": {"value": "[parameters('addressprefix')]"}, "subnetname": {"value": "[parameters('subnetname')]"}, "subnetprefix": {"value": "[parameters('subnetprefix')]"}}}}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"type": "microsoft.storage/storageaccounts", "name": "[variables('clusterstorageaccountname')]", "apiversion": "2021-04-01", "location": "[parameters('location')]", "sku": {"name": "[variables('storageaccounttype')]"}, "kind": "storagev2"}
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')]", "identity": {"type": "systemassigned"}, "dependson": ["[resourceid('microsoft.network/networkinterfaces/", parameters('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": {"osdisk": {"createoption": "fromimage", "manageddisk": {"storageaccounttype": "standardssd_lrs"}}, "imagereference": "[variables('imagereference')[parameters('os')]]"}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", parameters('nicname'))]"}]}, "securityprofile": {"uefisettings": {"securebootenabled": "[parameters('secureboot')]", "vtpmenabled": "[parameters('vtpm')]"}, "securitytype": "trustedlaunch"}}}{"condition": "[and(equals(parameters('vtpm'), "true'), equals(parameters('secureboot'), "true'))]", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'), "/", variables('extensionname'))]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines", parameters('vmname'))]"], "apiversion": "2020-06-01", "properties": {"publisher": "[variables('extensionpublisher')]", "type": "[variables('extensionname')]", "typehandlerversion": "[variables('extensionversion')]", "autoupgrademinorversion": true, "settings": {"attestationendpointcfg": {"maaendpoint": "[parameters('maaendpoint')]", "maatenantname": "[variables('maatenantname')]", "ascreportingendpoint": "[variables('ascreportingendpoint')]", "usealternatetoken": "[variables('usealternatetoken')]", "disablealerts": "[variables('disablealerts')]"}}}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2017-03-30", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts/", parameters('newstorageaccountname'))]", "[resourceid('microsoft.network/networkinterfaces/", parameters('nicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[parameters('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "[parameters('imagepublisher')]", "offer": "[parameters('imageoffer')]", "sku": "[parameters('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",parameters('nicname'))]"}]}}}
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": {"networkacls": {"bypass": "none", "virtualnetworkrules": [{"id": "[variables('containersubnetref')]", "action": "allow"}, {"id": "[variables('storagesubnetref')]", "action": "allow"}], "defaultaction": "deny"}, "supportshttpstrafficonly": true, "encryption": {"services": {"file": {"keytype": "account", "enabled": true}, "blob": {"keytype": "account", "enabled": true}}, "keysource": "microsoft.storage"}, "accesstier": "cool"}}{"type": "microsoft.storage/storageaccounts/blobservices", "apiversion": "2019-06-01", "name": "[concat(parameters('storageaccountname'), "/default')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname'))]"], "sku": {"name": "standard_lrs", "tier": "standard"}, "properties": {"deleteretentionpolicy": {"enabled": false}}}{"type": "microsoft.storage/storageaccounts/fileservices", "apiversion": "2019-06-01", "name": "[concat(parameters('storageaccountname'), "/default')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname'))]"], "sku": {"name": "standard_lrs", "tier": "standard"}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces/", parameters('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": "[parameters('imagepublisher')]", "offer": "[parameters('imageoffer')]", "sku": "[parameters('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",parameters('nicname'))]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'),"/installmongo')]", "apiversion": "2019-12-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", parameters('vmname'))]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"fileuris": ["[uri(parameters('_artifactslocation'), concat('mongo-install-ubuntu.sh", parameters('_artifactslocationsastoken')))]"], "commandtoexecute": "sh mongo-install-ubuntu.sh"}}}
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": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[parameters('dnslabelprefix')]"}}}{"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/networksecuritygroups", "apiversion": "2020-06-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allow_tds_inbound", "properties": {"description": "allow access to data", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "1433", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1000, "direction": "inbound"}}, {"name": "allow_redirect_inbound", "properties": {"description": "allow inbound redirect traffic to managed instance inside the virtual network", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "11000-11999", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "*", "access": "allow", "priority": 1100, "direction": "inbound"}}, {"name": "deny_all_inbound", "properties": {"description": "deny all other inbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "inbound"}}, {"name": "deny_all_outbound", "properties": {"description": "deny all other outbound traffic", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 4096, "direction": "outbound"}}]}}{"type": "microsoft.network/routetables", "apiversion": "2020-06-01", "name": "[variables('routetablename')]", "location": "[parameters('location')]", "properties": {"disablebgproutepropagation": false}}{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('addressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetprefix')]", "routetable": {"id": "[resourceid('microsoft.network/routetables", variables('routetablename'))]"}, "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}, "delegations": [{"name": "managedinstancedelegation", "properties": {"servicename": "microsoft.sql/managedinstances"}}]}}]}, "dependson": ["[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]", "[resourceid('microsoft.network/routetables", variables('routetablename'))]"]}
Create a Data Factory account, Provision SSIS runtime in Azure.
{"name": "[parameters('datafactoryname')]", "apiversion": "2018-06-01", "type": "microsoft.datafactory/factories", "location": "[parameters('location')]", "properties": {}, "resources": [{"name": "[concat(parameters('datafactoryname'), "/spazuressisir')]", "type": "microsoft.datafactory/factories/integrationruntimes", "dependson": ["[parameters('datafactoryname')]"], "apiversion": "2018-06-01", "properties": {"type": "managed", "typeproperties": {"computeproperties": {"location": "[parameters('location')]", "nodesize": "[parameters('nodesize')]", "numberofnodes": "[parameters('nodenumber')]", "maxparallelexecutionspernode": "[parameters('maximumparallelexecutionspernode')]", "vnetproperties": {"vnetid": "[resourceid('microsoft.network/virtualnetworks", parameters('virtualnetworkname'))]", "subnet": "[parameters('subnetname')]"}}, "ssisproperties": {"cataloginfo": {"catalogserverendpoint": "[parameters('azuresqlservername')]", "catalogadminusername": "[parameters('databaseadminusername')]", "catalogadminpassword": {"type": "securestring", "value": "[parameters('databaseadminpassword')]"}, "catalogpricingtier": "[parameters('catalogpricingtier')]"}}}}}]}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"type": "microsoft.compute/virtualmachines", "apiversion": "2019-07-01", "name": "[variables('vmnames')[copyindex()]]", "location": "[parameters('location')]", "copy": {"name": "vmloop", "count": 3}, "dependson": ["nicloop"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmnames')[copyindex()]]", "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('freebsdosversion')]", "version": "latest"}, "osdisk": {"createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('nicconfig')[mul(copyindex(),2)].name)]", "properties": {"primary": true}}, {"id": "[resourceid('microsoft.network/networkinterfaces", variables('nicconfig')[add(mul(copyindex(),2),1)].name)]", "properties": {"primary": false}}]}}}{"type": "microsoft.compute/virtualmachines", "apiversion": "2019-07-01", "name": "[variables('vmnamesql')]", "location": "[parameters('location')]", "dependson": ["nicloop"], "properties": {"hardwareprofile": {"vmsize": "[parameters('postgresqlvmsize')]"}, "osprofile": {"computername": "[variables('vmnamesql')]", "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('freebsdosversion')]", "version": "latest"}, "osdisk": {"createoption": "fromimage"}, "copy": [{"name": "datadisks", "count": "[parameters('numberofdatadisks')]", "input": {"disksizegb": "[parameters('sizeofdatadisksingb')]", "lun": "[copyindex('datadisks')]", "caching": "[parameters('diskcaching')]", "createoption": "empty"}}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('vmnamesql'))]"}]}}}
This template creates a Machine Learning Service ADLA Compute.
{"type": "microsoft.machinelearningservices/workspaces", "apiversion": "2020-08-01", "name": "[parameters('workspacename')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.insights/components", parameters('applicationinsightsname'))]", "[resourceid('microsoft.keyvault/vaults", parameters('keyvaultname'))]", "[resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname'))]"], "identity": {"type": "systemassigned"}, "properties": {"friendlyname": "[parameters('workspacename')]", "storageaccount": "[resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname'))]", "keyvault": "[resourceid('microsoft.keyvault/vaults", parameters('keyvaultname'))]", "applicationinsights": "[resourceid('microsoft.insights/components", parameters('applicationinsightsname'))]"}}
Establish connection to a VNET via an ExpressRoute circuit
{"condition": "[equals(parameters('neworexistingnetwork'), "new')]", "type": "microsoft.network/virtualnetworks", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "tags": {"displayname": "virtualnetwork", "app": "[variables('redhattags').app]", "version": "[variables('redhattags').version]", "platform": "[variables('redhattags').platform]"}, "apiversion": "2019-09-01", "properties": {"addressspace": {"addressprefixes": "[parameters('virtualnetworkcidr')]"}, "subnets": [{"name": "[parameters('bastionsubnetname')]", "properties": {"addressprefix": "[parameters('bastionsubnetprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups/", variables('bastionsecuritygroupname'))]"}}}, {"name": "[parameters('mastersubnetname')]", "properties": {"addressprefix": "[parameters('mastersubnetprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups/", variables('mastersecuritygroupname'))]"}}}, {"name": "[parameters('workersubnetname')]", "properties": {"addressprefix": "[parameters('workersubnetprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups/", variables('workersecuritygroupname'))]"}}}]}, "dependson": ["[variables('bastionsecuritygroupname')]", "[variables('mastersecuritygroupname')]", "[variables('workersecuritygroupname')]"]}{"type": "microsoft.network/publicipaddresses", "name": "[variables('bastionpublicipdnslabel')]", "location": "[parameters('location')]", "sku": {"name": "standard"}, "apiversion": "2019-09-01", "tags": {"displayname": "bastionpublicip", "app": "[variables('redhattags').app]", "version": "[variables('redhattags').version]", "platform": "[variables('redhattags').platform]"}, "properties": {"publicipallocationmethod": "static", "dnssettings": {"domainnamelabel": "[variables('bastionpublicipdnslabel')]"}}}{"type": "microsoft.network/networkinterfaces", "name": "[concat(variables('bastionhostname'), "-nic')]", "location": "[parameters('location')]", "apiversion": "2019-09-01", "tags": {"displayname": "bastionnetworkinterface", "app": "[variables('redhattags').app]", "version": "[variables('redhattags').version]", "platform": "[variables('redhattags').platform]"}, "dependson": ["[resourceid('microsoft.network/virtualnetworks/", parameters('virtualnetworkname'))]", "[resourceid('microsoft.network/networksecuritygroups/", variables('bastionsecuritygroupname'))]", "[resourceid('microsoft.network/publicipaddresses/", variables('bastionpublicipdnslabel'))]"], "properties": {"ipconfigurations": [{"name": "[concat(variables('bastionhostname'), "ipconfig')]", "properties": {"privateipallocationmethod": "dynamic", "subnet": {"id": "[resourceid(variables('networkresourcegroup'), "microsoft.network/virtualnetworks/subnets", parameters('virtualnetworkname'), parameters('bastionsubnetname'))]"}, "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", variables('bastionpublicipdnslabel'))]"}}}], "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('bastionsecuritygroupname'))]"}}}{"condition": "[equals(parameters('storageoption'), "nfs')]", "type": "microsoft.network/networkinterfaces", "name": "[concat(variables('nfshostname'), "-nic')]", "location": "[parameters('location')]", "apiversion": "2019-09-01", "tags": {"displayname": "nfsnetworkinterface", "app": "[variables('redhattags').app]", "version": "[variables('redhattags').version]", "platform": "[variables('redhattags').platform]"}, "dependson": ["[resourceid('microsoft.network/virtualnetworks/", parameters('virtualnetworkname'))]", "[resourceid('microsoft.network/networksecuritygroups/", variables('workersecuritygroupname'))]"], "properties": {"ipconfigurations": [{"name": "[concat(variables('nfshostname'), "ipconfig')]", "properties": {"privateipallocationmethod": "dynamic", "subnet": {"id": "[resourceid(variables('networkresourcegroup'), "microsoft.network/virtualnetworks/subnets", parameters('virtualnetworkname'), parameters('workersubnetname'))]"}}}], "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('workersecuritygroupname'))]"}}}{"apiversion": "2019-09-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('bastionsecuritygroupname')]", "location": "[parameters('location')]", "tags": {"displayname": "bastionnsg", "app": "[variables('redhattags').app]", "version": "[variables('redhattags').version]", "platform": "[variables('redhattags').platform]"}, "properties": {"securityrules": [{"name": "allowsshin_all", "properties": {"description": "allow ssh in from all locations", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "22", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 100, "direction": "inbound"}}]}}{"apiversion": "2019-09-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('mastersecuritygroupname')]", "location": "[parameters('location')]", "tags": {"displayname": "masternsg", "app": "[variables('redhattags').app]", "version": "[variables('redhattags').version]", "platform": "[variables('redhattags').platform]"}, "properties": {"securityrules": [{"name": "allowhttps_all", "properties": {"description": "allow https connections from all locations", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "6443", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 200, "direction": "inbound"}}]}}{"apiversion": "2019-09-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('workersecuritygroupname')]", "location": "[parameters('location')]", "tags": {"displayname": "workernsg", "app": "[variables('redhattags').app]", "version": "[variables('redhattags').version]", "platform": "[variables('redhattags').platform]"}, "properties": {"securityrules": [{"name": "allowhttps_all", "properties": {"description": "allow https connections from all locations", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 200, "direction": "inbound"}}, {"name": "allowhttpin_all", "properties": {"description": "allow http connections from all locations", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "80", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 300, "direction": "inbound"}}]}}
This template creates a lab in Azure DevTest Labs with a Windows Server 2019 Datacenter VM
{"type": "microsoft.devtestlab/labs", "apiversion": "2018-10-15-preview", "name": "[parameters('labname')]", "location": "[parameters('location')]", "resources": [{"type": "virtualnetworks", "apiversion": "2018-10-15-preview", "name": "[variables('labvirtualnetworkname')]", "dependson": ["[resourceid('microsoft.devtestlab/labs", parameters('labname'))]"]}, {"type": "virtualmachines", "apiversion": "2018-10-15-preview", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.devtestlab/labs", parameters('labname'))]", "[resourceid('microsoft.devtestlab/labs/virtualnetworks", parameters('labname'), variables('labvirtualnetworkname'))]"], "properties": {"username": "[parameters('username')]", "password": "[parameters('password')]", "labvirtualnetworkid": "[variables('labvirtualnetworkid')]", "labsubnetname": "[variables('labsubnetname')]", "size": "[parameters('vmsize')]", "allowclaim": "true", "galleryimagereference": {"offer": "windowsserver", "publisher": "microsoftwindowsserver", "sku": "2019-datacenter", "ostype": "windows", "version": "latest"}}}]}
Create a VM from a Windows Image with 4 Empty Data Disks
{"type": "microsoft.compute/disks", "apiversion": "2019-11-01", "name": "[concat(parameters('virtualmachinename'),"-datadisk-ultrassd-",copyindex())]", "location": "[parameters('location')]", "sku": {"name": "ultrassd_lrs"}, "zones": ["[parameters('zone')]"], "properties": {"creationdata": {"createoption": "empty"}, "disksizegb": "[parameters('sqllogultrassddisksizeingb')]", "diskiopsreadwrite": "[parameters('sqllogultrassddiskiopsreadwrite')]", "diskmbpsreadwrite": "[parameters('sqllogultrassddiskmbpsreadwrite')]"}, "copy": {"name": "ultrassdloop", "count": 1}}{"type": "microsoft.compute/disks", "apiversion": "2019-11-01", "name": "[concat(parameters('virtualmachinename'),"-datadisk-",copyindex())]", "location": "[parameters('location')]", "sku": {"name": "premium_lrs"}, "zones": ["[parameters('zone')]"], "properties": {"creationdata": {"createoption": "empty"}, "disksizegb": "[variables('datadisks').disksizegb]"}, "copy": {"name": "premiumssdloop", "count": "[parameters('sqldatadiskscount')]"}}
Deploy a new SQL Elastic Pool.
{"type": "microsoft.sql/servers", "apiversion": "2020-02-02-preview", "location": "[parameters('location')]", "name": "[parameters('servername')]", "properties": {"administratorlogin": "[parameters('administratorlogin')]", "administratorloginpassword": "[parameters('administratorloginpassword')]", "version": "12.0"}}{"type": "microsoft.sql/servers/elasticpools", "apiversion": "2020-02-02-preview", "dependson": ["[resourceid('microsoft.sql/servers/", parameters('servername'))]"], "location": "[parameters('location')]", "name": "[concat(parameters('servername'), "/", parameters('elasticpoolname'))]", "sku": {"name": "[variables('skuname')]", "tier": "[variables('skutier')]", "capacity": "[parameters('capacity')]"}, "properties": {"perdatabasesettings": {"mincapacity": "[parameters('databasecapacitymin')]", "maxcapacity": "[parameters('databasecapacitymax')]"}}}{"type": "microsoft.sql/servers/databases", "name": "[concat(parameters('servername'), "/", parameters('databasesnames')[copyindex()])]", "location": "[parameters('location')]", "apiversion": "2020-02-02-preview", "dependson": ["[resourceid('microsoft.sql/servers/", parameters('servername'))]", "[resourceid('microsoft.sql/servers/elasticpools", parameters('servername'), parameters('elasticpoolname'))]"], "sku": {"name": "elasticpool", "tier": "[variables('skutier')]", "capacity": 0}, "properties": {"collation": "[parameters('databasecollation')]", "elasticpoolid": "[resourceid('microsoft.sql/servers/elasticpools", parameters('servername'), parameters('elasticpoolname'))]"}, "copy": {"name": "adddatabasesinelasticpool", "count": "[length(parameters('databasesnames'))]"}}{"apiversion": "2020-02-02-preview", "dependson": ["[resourceid('microsoft.sql/servers/", parameters('servername'))]"], "location": "[parameters('location')]", "name": "[concat(parameters('servername'), "/", "allowallwindowsazureips')]", "properties": {"endipaddress": "0.0.0.0", "startipaddress": "0.0.0.0"}, "type": "microsoft.sql/servers/firewallrules"}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"type": "microsoft.compute/availabilitysets", "name": "[variables('webavailsetname')]", "apiversion": "2017-12-01", "location": "[parameters('location')]", "comments": "this is the availability set for all web vms", "tags": {"displayname": "web avail set", "quickstartname": "[variables('quickstarttags').name]", "provider": "[variables('barracudanetworkstags').provider]"}, "sku": {"name": "aligned"}, "properties": {"platformfaultdomaincount": 2, "platformupdatedomaincount": 2}}
Application Gateway routing Internet traffic to a virtual network (internal mode) API Management instance which services a web API hosted in an Azure Web App.
{"type": "microsoft.web/serverfarms", "apiversion": "2020-06-01", "name": "[parameters('hostingplanlivesite')]", "location": "[parameters('location')]", "tags": {"displayname": "hostingplan"}, "sku": {"name": "[parameters('pricingtierlivesite')]", "capacity": 1}, "properties": {"name": "[parameters('hostingplanlivesite')]"}}{"type": "microsoft.web/sites", "apiversion": "2020-06-01", "name": "[parameters('livesitename')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/serverfarms", parameters('hostingplanlivesite'))]", "[resourceid('microsoft.insights/components", parameters('livesitename'))]"], "tags": {"[format('{0}:{1}", "hidden-related", resourceid('microsoft.web/serverfarms", parameters('hostingplanlivesite')))]": "empty", "displayname": "website"}, "properties": {"name": "[parameters('livesitename')]", "serverfarmid": "[resourceid('microsoft.web/serverfarms", parameters('hostingplanlivesite'))]", "mintlsversion": "1.2", "siteconfig": {"connectionstrings": [{"name": "cmsconnectionstring", "connectionstring": "[if(empty(parameters('connectionstringdatabasename')),"",concat('data source=tcp:", reference(resourceid('microsoft.sql/servers", parameters('sqlservername'))).fullyqualifieddomainname, ",1433;initial catalog=", parameters('connectionstringdatabasename'), ";user id=", parameters('sqladministratorlogin'), "@", parameters('sqlservername'), ";password=", parameters('sqladministratorpassword'), ";'))]", "type": "sqlserver"}], "appsettings": [{"name": "appinsights_instrumentationkey", "value": "[reference(variables('instrumentationkey')).instrumentationkey]"}]}}}{"type": "microsoft.web/serverfarms", "apiversion": "2020-06-01", "name": "[parameters('hostingplanadministration')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('pricingtieradministration')]", "capacity": 1}, "tags": {"displayname": "hostingplan"}, "properties": {"name": "[parameters('hostingplanadministration')]"}}{"type": "microsoft.web/sites", "apiversion": "2020-06-01", "name": "[parameters('administrationsitename')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/serverfarms", parameters('hostingplanadministration'))]"], "tags": {"[format('{0}:{1}", "hidden-related", resourceid('microsoft.web/serverfarms", parameters('hostingplanadministration')))]": "resource", "displayname": "administration"}, "properties": {"name": "[parameters('administrationsitename')]", "serverfarmid": "[resourceid('microsoft.web/serverfarms", parameters('hostingplanadministration'))]", "mintlsversion": "1.2", "siteconfig": {"connectionstrings": [{"name": "cmsconnectionstring", "connectionstring": "[if(empty(parameters('connectionstringdatabasename')),"",concat('data source=tcp:", reference(resourceid('microsoft.sql/servers/", parameters('sqlservername'))).fullyqualifieddomainname, ",1433;initial catalog=", parameters('connectionstringdatabasename'), ";user id=", parameters('sqladministratorlogin'), "@", parameters('sqlservername'), ";password=", parameters('sqladministratorpassword'), ";'))]", "type": "sqlserver"}]}}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/networksecuritygroups", "apiversion": "2020-05-01", "name": "[parameters('nsgname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "microsoft.databricks-workspaces_useonly_databricks-worker-to-worker-inbound", "properties": {"description": "required for worker nodes communication within a cluster.", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 100, "direction": "inbound"}}, {"name": "microsoft.databricks-workspaces_useonly_databricks-worker-to-databricks-webapp", "properties": {"description": "required for workers communication with databricks webapp.", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azuredatabricks", "access": "allow", "priority": 100, "direction": "outbound"}}, {"name": "microsoft.databricks-workspaces_useonly_databricks-worker-to-sql", "properties": {"description": "required for workers communication with azure sql services.", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "3306", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "sql", "access": "allow", "priority": 101, "direction": "outbound"}}, {"name": "microsoft.databricks-workspaces_useonly_databricks-worker-to-storage", "properties": {"description": "required for workers communication with azure storage services.", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "storage", "access": "allow", "priority": 102, "direction": "outbound"}}, {"name": "microsoft.databricks-workspaces_useonly_databricks-worker-to-worker-outbound", "properties": {"description": "required for worker nodes communication within a cluster.", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 103, "direction": "outbound"}}, {"name": "microsoft.databricks-workspaces_useonly_databricks-worker-to-eventhub", "properties": {"description": "required for worker communication with azure eventhub services.", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "9093", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "eventhub", "access": "allow", "priority": 104, "direction": "outbound"}}]}}
This template creates a standard internal Azure Load Balancer with a HA ports load-balancing rule
{"apiversion": "2020-05-01", "type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('vnetaddressprefix')]"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "[parameters('subnetprefix')]"}}]}}{"apiversion": "2020-05-01", "type": "microsoft.network/networkinterfaces", "name": "[variables('nicname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/loadbalancers/", variables('loadbalancername'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "subnet": {"id": "[variables('subnetref')]"}, "loadbalancerbackendaddresspools": [{"id": "[resourceid('microsoft.network/loadbalancers/backendaddresspools", variables('loadbalancername'), "loadbalancerbackend')]"}]}}]}}{"apiversion": "2020-05-01", "name": "[variables('loadbalancername')]", "type": "microsoft.network/loadbalancers", "location": "[parameters('location')]", "sku": {"name": "[variables('lbsku')]"}, "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]"], "properties": {"frontendipconfigurations": [{"name": "loadbalancerfrontend", "properties": {"subnet": {"id": "[variables('subnetref')]"}}}], "backendaddresspools": [{"name": "loadbalancerbackend"}], "loadbalancingrules": [{"name": "[variables('lbrulename')]", "properties": {"frontendipconfiguration": {"id": "[resourceid('microsoft.network/loadbalancers/frontendipconfigurations", variables('loadbalancername'), "loadbalancerfrontend')]"}, "backendaddresspool": {"id": "[resourceid('microsoft.network/loadbalancers/backendaddresspools", variables('loadbalancername'), "loadbalancerbackend')]"}, "probe": {"id": "[resourceid('microsoft.network/loadbalancers/probes", variables('loadbalancername'), variables('lbprobename'))]"}, "protocol": "all", "frontendport": 0, "backendport": 0, "enablefloatingip": false, "enabletcpreset": true, "loaddistribution": "default", "disableoutboundsnat": true, "idletimeoutinminutes": 15}}], "probes": [{"name": "[variables('lbprobename')]", "properties": {"protocol": "tcp", "port": 80, "intervalinseconds": 15, "numberofprobes": 2}}]}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"type": "microsoft.compute/availabilitysets", "name": "[variables('availabilitysetname')]", "apiversion": "2017-12-01", "location": "[parameters('location')]", "sku": {"name": "aligned"}, "properties": {"platformfaultdomaincount": 2, "platformupdatedomaincount": 5}}{"name": "[variables('vmname1')]", "type": "microsoft.compute/virtualmachines", "apiversion": "2017-03-30", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/availabilitysets", variables('availabilitysetname'))]", "[resourceid('microsoft.network/networkinterfaces", variables('nicname1'))]"], "properties": {"availabilityset": {"id": "[resourceid('microsoft.compute/availabilitysets", variables('availabilitysetname'))]"}, "hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmname1')]", "adminusername": "[parameters('username')]", "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('vmname1'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}, "datadisks": [{"name": "[concat(variables('vmname1'),"_datadisk1')]", "disksizegb": "1000", "lun": 0, "createoption": "empty"}, {"name": "[concat(variables('vmname1'),"_datadisk2')]", "disksizegb": "1000", "lun": 1, "createoption": "empty"}]}, "networkprofile": {"networkinterfaces": [{"id": "[variables('nicid1')]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "name": "[variables('vmextensionname1')]", "apiversion": "2015-06-15", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", variables('vmname1'))]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"fileuris": ["[uri(parameters('_artifactslocation'), concat('azurepxc.sh", parameters('_artifactslocationsastoken')))]"]}, "protectedsettings": {"commandtoexecute": "[concat(variables('customscriptcommandcommon'), variables('customscriptparamvm1'))]"}}}{"name": "[variables('vmname2')]", "type": "microsoft.compute/virtualmachines", "apiversion": "2017-03-30", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/availabilitysets", variables('availabilitysetname'))]", "[resourceid('microsoft.network/networkinterfaces", variables('nicname2'))]"], "properties": {"availabilityset": {"id": "[resourceid('microsoft.compute/availabilitysets", variables('availabilitysetname'))]"}, "hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmname2')]", "adminusername": "[parameters('username')]", "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('vmname2'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}, "datadisks": [{"name": "[concat(variables('vmname2'),"_datadisk1')]", "disksizegb": "1000", "lun": 0, "createoption": "empty"}, {"name": "[concat(variables('vmname2'),"_datadisk2')]", "disksizegb": "1000", "lun": 1, "createoption": "empty"}]}, "networkprofile": {"networkinterfaces": [{"id": "[variables('nicid2')]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(variables('vmname2'),"/", variables('vmextensionname'))]", "apiversion": "2015-06-15", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines", variables('vmname2'))]", "[resourceid('microsoft.compute/virtualmachines/extensions",variables('vmname1'), variables('vmextensionname'))]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"fileuris": ["[uri(parameters('_artifactslocation'), concat('azurepxc.sh", parameters('_artifactslocationsastoken')))]"]}, "protectedsettings": {"commandtoexecute": "[concat(variables('customscriptcommandcommon'), variables('customscriptparamvm2'))]"}}}{"name": "[variables('vmname3')]", "type": "microsoft.compute/virtualmachines", "apiversion": "2017-03-30", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/availabilitysets", variables('availabilitysetname'))]", "[resourceid('microsoft.network/networkinterfaces", variables('nicname3'))]"], "properties": {"availabilityset": {"id": "[resourceid('microsoft.compute/availabilitysets", variables('availabilitysetname'))]"}, "hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmname3')]", "adminusername": "[parameters('username')]", "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('vmname3'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}, "datadisks": [{"name": "[concat(variables('vmname3'),"_datadisk1')]", "disksizegb": "1000", "lun": 0, "createoption": "empty"}, {"name": "[concat(variables('vmname3'),"_datadisk2')]", "disksizegb": "1000", "lun": 1, "createoption": "empty"}]}, "networkprofile": {"networkinterfaces": [{"id": "[variables('nicid3')]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(variables('vmname3'),"/", variables('vmextensionname'))]", "apiversion": "2015-06-15", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines", variables('vmname3'))]", "[resourceid('microsoft.compute/virtualmachines/extensions",variables('vmname1'), variables('vmextensionname'))]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"fileuris": ["[uri(parameters('_artifactslocation'), concat('azurepxc.sh", parameters('_artifactslocationsastoken')))]"]}, "protectedsettings": {"commandtoexecute": "[concat(variables('customscriptcommandcommon'), variables('customscriptparamvm3'))]"}}}
This template creates a EventHubs namespace, an Event Hub, a consumer group and authorizationRules
{"apiversion": "2018-01-01-preview", "name": "[parameters('namespacename')]", "type": "microsoft.eventhub/namespaces", "location": "[parameters('location')]", "sku": {"name": "standard"}, "properties": {"isautoinflateenabled": true, "maximumthroughputunits": 7}, "resources": [{"apiversion": "2017-04-01", "name": "[parameters('eventhubname')]", "type": "eventhubs", "dependson": ["[resourceid('microsoft.eventhub/namespaces/", parameters('namespacename'))]"], "properties": {"messageretentionindays": 4, "partitioncount": 4}, "resources": [{"apiversion": "2017-04-01", "name": "[parameters('consumergroupname')]", "type": "consumergroups", "dependson": ["[resourceid('microsoft.eventhub/namespaces/eventhubs/", parameters('namespacename'),parameters('eventhubname'))]"], "properties": {"usermetadata": "user metadata"}}, {"apiversion": "2017-04-01", "name": "[parameters('eventhubauthorizationrulename')]", "type": "authorizationrules", "dependson": ["[resourceid('microsoft.eventhub/namespaces/eventhubs/", parameters('namespacename'),parameters('eventhubname'))]"], "properties": {"rights": ["send", "listen", "manage"]}}, {"apiversion": "2017-04-01", "name": "[parameters('eventhubauthorizationrulename1')]", "type": "authorizationrules", "dependson": ["[resourceid('microsoft.eventhub/namespaces/eventhubs/", parameters('namespacename'),parameters('eventhubname'))]"], "properties": {"rights": ["send"]}}]}]}{"apiversion": "2017-04-01", "name": "[concat(parameters('namespacename'), "/", parameters('namespaceauthorizationrulename'))]", "type": "microsoft.eventhub/namespaces/authorizationrules", "dependson": ["[resourceid('microsoft.eventhub/namespaces/", parameters('namespacename'))]"], "properties": {"rights": ["send", "listen", "manage"]}}
Storage Account with Storage Service Encryption and a blob deletion retention policy
{"name": "[parameters('storageaccountname')]", "type": "microsoft.storage/storageaccounts", "location": "[parameters('location')]", "apiversion": "2015-06-15", "tags": {"displayname": "storageaccount"}, "properties": {"accounttype": "[parameters('storageaccounttype')]"}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/networksecuritygroups", "apiversion": "2020-05-01", "name": "[parameters('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "ssh", "properties": {"priority": 1000, "protocol": "tcp", "access": "allow", "direction": "inbound", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*", "destinationportrange": "22"}}]}}{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-05-01", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[variables('subnetaddressprefix')]", "privateendpointnetworkpolicies": "enabled", "privatelinkservicenetworkpolicies": "enabled"}}]}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[concat(parameters('dnsname'), copyindex())]", "zones": "[split(string(add(mod(copyindex(),3),1)), ",')]", "copy": {"name": "virtualmachineloop", "count": "[parameters('numberofvms')]"}, "location": "[parameters('location')]", "dependson": ["nicloop"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[concat(parameters('dnsname'), copyindex())]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": "[if(equals(parameters('windowsorubuntu'), "windows'), variables('windowsimage'), variables('linuximage'))]", "osdisk": {"createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",concat(variables('nicname'),copyindex()))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(resourceid('microsoft.storage/storageaccounts/", variables('storageaccountname'))).primaryendpoints.blob]"}}}}
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/", variables('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('images')[parameters('ostype')].publisher]", "offer": "[variables('images')[parameters('ostype')].offer]", "sku": "[variables('images')[parameters('ostype')].sku]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(variables('vmname'),"/", variables('vmextensionname'))]", "apiversion": "2020-12-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", variables('vmname'))]"], "properties": {"publisher": "chef.bootstrap.windowsazure", "type": "linuxchefclient", "typehandlerversion": "1210.12", "autoupgrademinorversion": true, "settings": {"bootstrap_options": {"chef_node_name": "[parameters('chef_node_name')]", "chef_server_url": "[parameters('chef_server_url')]", "validation_client_name": "[parameters('validation_client_name')]"}, "runlist": "[parameters('runlist')]", "validation_key_format": "[parameters('validation_key_format')]", "chef_service_interval": "[parameters('chef_service_interval')]", "bootstrap_version": "[parameters('bootstrap_version')]", "bootstrap_channel": "[parameters('bootstrap_channel')]", "daemon": "[parameters('daemon')]"}, "protectedsettings": {"validation_key": "[parameters('validation_key')]", "secret": "[parameters('secret')]"}}}
Deploy an App Service that supports Python. It gives you the support to deploy your own Flask app.
{"apiversion": "2020-06-01", "name": "[parameters('webappname')]", "type": "microsoft.web/sites", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/serverfarms/", variables('hostingplanname'))]"], "properties": {"name": "[parameters('webappname')]", "siteconfig": {"linuxfxversion": "[variables('linuxfxversion')]", "alwayson": "[variables('alwayson')]"}, "serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]", "clientaffinityenabled": false}}{"apiversion": "2020-06-01", "name": "[variables('hostingplanname')]", "type": "microsoft.web/serverfarms", "location": "[parameters('location')]", "kind": "linux", "properties": {"name": "[variables('hostingplanname')]", "workersize": "[variables('workersize')]", "workersizeid": "[variables('workersizeid')]", "numberofworkers": "[variables('numberofworkers')]", "reserved": true}, "sku": {"tier": "[variables('sku')]", "name": "[variables('skucode')]"}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-11-01", "type": "microsoft.network/publicipaddresses", "name": "[concat('publicip", copyindex())]", "location": "[parameters('location')]", "copy": {"name": "foo", "count": "[parameters('scalenumber')]"}, "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]"}}{"comments": "default network security group for template", "type": "microsoft.network/networksecuritygroups", "apiversion": "2020-11-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-11-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('subnet1name')]", "properties": {"addressprefix": "[variables('subnet1prefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}}}]}}{"apiversion": "2020-11-01", "type": "microsoft.network/networkinterfaces", "name": "[concat(variables('nicname'), 0)]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/publicipaddresses/", "publicip0')]", "[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", "publicip0')]"}, "subnet": {"id": "[variables('subnet1ref')]"}}}]}}
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": ["[concat('microsoft.storage/storageaccounts/", parameters('newstorageaccountname'))]", "[concat('microsoft.network/networkinterfaces/", variables('nicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[variables('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('ubuntuosversion')]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"type": "microsoft.compute/virtualmachines", "name": "[variables('jumpboxname')]", "location": "[parameters('location')]", "apiversion": "2020-12-01", "dependson": ["[resourceid('microsoft.storage/storageaccounts", variables('jumpboxsaname'))]", "[resourceid('microsoft.network/networkinterfaces", variables('jumpboxnicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsku')]"}, "osprofile": {"computername": "[variables('jumpboxname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": "[variables('imagereference')]", "osdisk": {"name": "[variables('jumpboxosdiskname')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('jumpboxnicname'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(resourceid('microsoft.storage/storageaccounts", variables('jumpboxsaname')), "2019-06-01').primaryendpoints["blob"]]"}}}}{"type": "microsoft.compute/virtualmachinescalesets", "name": "[variables('naminginfix')]", "location": "[parameters('location')]", "apiversion": "2020-12-01", "dependson": ["[resourceid('microsoft.network/virtualnetworks", variables('virtualnetworkname'))]"], "sku": {"name": "[parameters('vmsku')]", "tier": "standard", "capacity": "[parameters('instancecount')]"}, "properties": {"overprovision": "true", "upgradepolicy": {"mode": "manual"}, "virtualmachineprofile": {"storageprofile": {"osdisk": {"createoption": "fromimage", "caching": "readwrite"}, "imagereference": "[variables('imagereference')]"}, "osprofile": {"computernameprefix": "[variables('naminginfix')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "networkprofile": {"networkinterfaceconfigurations": [{"name": "[variables('nicname')]", "properties": {"primary": true, "ipconfigurations": [{"name": "[variables('ipconfigname')]", "properties": {"subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('virtualnetworkname'), variables('subnetname'))]"}}}]}}]}}}}
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": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[parameters('nameprefix')]"}}}{"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')]"}}, {"name": "[variables('subnetnamedb')]", "properties": {"addressprefix": "[variables('subnetprefixdb')]"}}]}}{"apiversion": "2015-06-15", "type": "microsoft.network/networkinterfaces", "name": "[concat(variables('nicname'),copyindex())]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks/",variables('virtualnetworkname'))]", "[resourceid('microsoft.network/loadbalancers/",variables('lbname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "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('web-vm",copyindex()))]"}, {"id": "[resourceid('microsoft.network/loadbalancers/inboundnatrules",variables('lbname'),concat('ssh-vm",copyindex()))]"}]}}]}, "copy": {"name": "networkinterfacescopy", "count": "[parameters('webvmcount')]"}}{"apiversion": "2015-06-15", "name": "[variables('lbname')]", "type": "microsoft.network/loadbalancers", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/publicipaddresses/",variables('publicipaddressname'))]"], "properties": {"frontendipconfigurations": [{"name": "loadbalancerfrontend", "properties": {"publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('publicipaddressname'))]"}}}], "backendaddresspools": [{"name": "loadbalancerbackend"}], "inboundnatrules": [{"name": "web-vm0", "properties": {"frontendipconfiguration": {"id": "[resourceid('microsoft.network/loadbalancers/frontendipconfigurations",variables('lbname'),"loadbalancerfrontend')]"}, "protocol": "tcp", "frontendport": 8080, "backendport": 8080, "enablefloatingip": false}}, {"name": "ssh-vm0", "properties": {"frontendipconfiguration": {"id": "[resourceid('microsoft.network/loadbalancers/frontendipconfigurations",variables('lbname'),"loadbalancerfrontend')]"}, "protocol": "tcp", "frontendport": 2200, "backendport": 22, "enablefloatingip": false}}, {"name": "web-vm1", "properties": {"frontendipconfiguration": {"id": "[resourceid('microsoft.network/loadbalancers/frontendipconfigurations",variables('lbname'),"loadbalancerfrontend')]"}, "protocol": "tcp", "frontendport": 8081, "backendport": 8080, "enablefloatingip": false}}, {"name": "ssh-vm1", "properties": {"frontendipconfiguration": {"id": "[resourceid('microsoft.network/loadbalancers/frontendipconfigurations",variables('lbname'),"loadbalancerfrontend')]"}, "protocol": "tcp", "frontendport": 2201, "backendport": 22, "enablefloatingip": false}}, {"name": "web-vm2", "properties": {"frontendipconfiguration": {"id": "[resourceid('microsoft.network/loadbalancers/frontendipconfigurations",variables('lbname'),"loadbalancerfrontend')]"}, "protocol": "tcp", "frontendport": 8082, "backendport": 8080, "enablefloatingip": false}}, {"name": "ssh-vm2", "properties": {"frontendipconfiguration": {"id": "[resourceid('microsoft.network/loadbalancers/frontendipconfigurations",variables('lbname'),"loadbalancerfrontend')]"}, "protocol": "tcp", "frontendport": 2202, "backendport": 22, "enablefloatingip": false}}, {"name": "web-vm3", "properties": {"frontendipconfiguration": {"id": "[resourceid('microsoft.network/loadbalancers/frontendipconfigurations",variables('lbname'),"loadbalancerfrontend')]"}, "protocol": "tcp", "frontendport": 8083, "backendport": 8080, "enablefloatingip": false}}, {"name": "ssh-vm3", "properties": {"frontendipconfiguration": {"id": "[resourceid('microsoft.network/loadbalancers/frontendipconfigurations",variables('lbname'),"loadbalancerfrontend')]"}, "protocol": "tcp", "frontendport": 2203, "backendport": 22, "enablefloatingip": false}}, {"name": "web-vm4", "properties": {"frontendipconfiguration": {"id": "[resourceid('microsoft.network/loadbalancers/frontendipconfigurations",variables('lbname'),"loadbalancerfrontend')]"}, "protocol": "tcp", "frontendport": 8084, "backendport": 8080, "enablefloatingip": false}}, {"name": "ssh-vm4", "properties": {"frontendipconfiguration": {"id": "[resourceid('microsoft.network/loadbalancers/frontendipconfigurations",variables('lbname'),"loadbalancerfrontend')]"}, "protocol": "tcp", "frontendport": 2204, "backendport": 22, "enablefloatingip": false}}], "loadbalancingrules": [{"name": "lbrule", "properties": {"frontendipconfiguration": {"id": "[resourceid('microsoft.network/loadbalancers/frontendipconfigurations",variables('lbname'),"loadbalancerfrontend')]"}, "backendaddresspool": {"id": "[resourceid('microsoft.network/loadbalancers/backendaddresspools",variables('lbname'),"loadbalancerbackend')]"}, "protocol": "tcp", "frontendport": 80, "backendport": 80, "enablefloatingip": false, "idletimeoutinminutes": 5, "loaddistribution": "sourceip", "probe": {"id": "[resourceid('microsoft.network/loadbalancers/probes",variables('lbname'),"tcpprobe')]"}}}], "probes": [{"name": "tcpprobe", "properties": {"protocol": "tcp", "port": 80, "intervalinseconds": "5", "numberofprobes": "2"}}]}}{"apiversion": "2015-06-15", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicdbipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[concat(parameters('nameprefix'),"db')]"}}}
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/virtualnetworks", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnet1name')]", "properties": {"addressprefix": "[variables('subnet1prefix')]"}}]}}{"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": "[resourceid('microsoft.network/virtualnetworks/subnets",variables('virtualnetworkname'), variables('subnet1name'))]"}}}]}}
Storage Account with Storage Service Encryption and a blob deletion retention policy
{"type": "microsoft.storage/storageaccounts", "name": "[variables('primarystorageaccountname')]", "apiversion": "2015-06-15", "location": "[parameters('primarylocation')]", "properties": {"accounttype": "[variables('storageaccounttype')]"}}{"type": "microsoft.storage/storageaccounts", "name": "[variables('defaultprimarystorageaccountname')]", "apiversion": "2015-06-15", "location": "[parameters('primarylocation')]", "properties": {"accounttype": "[variables('defaultstorageaccounttype')]"}}{"type": "microsoft.storage/storageaccounts", "name": "[variables('secondarystorageaccountname')]", "apiversion": "2015-06-15", "location": "[parameters('secondarylocation')]", "properties": {"accounttype": "[variables('storageaccounttype')]"}}{"type": "microsoft.storage/storageaccounts", "name": "[variables('defaultsecondarystorageaccountname')]", "apiversion": "2015-06-15", "location": "[parameters('secondarylocation')]", "properties": {"accounttype": "[variables('defaultstorageaccounttype')]"}}
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": ["[resourceid('microsoft.storage/storageaccounts", variables('storageaccountname'))]", "[resourceid('microsoft.network/networkinterfaces", variables('nicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[variables('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-05-01", "type": "microsoft.network/publicipaddresses", "name": "[parameters('publicipname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[parameters('publicipaddresstype')]"}}{"apiversion": "2020-05-01", "type": "microsoft.network/networkinterfaces", "name": "[parameters('nicname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/publicipaddresses/", parameters('publicipname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", parameters('publicipname'))]"}, "subnet": {"id": "[resourceid(parameters('virtualnetworkresourcegroup'), "microsoft.network/virtualnetworks/subnets", parameters('virtualnetworkname'), parameters('subnet1name'))]"}}}]}}
Storage Account with Storage Service Encryption and a blob deletion retention policy
{"type": "microsoft.storage/storageaccounts", "apiversion": "2021-08-01", "name": "[variables('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storage"}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"apiversion": "2020-06-01", "name": "deploy-virus-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": "2020-06-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": "2020-06-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": "2020-06-01", "name": "[concat(variables('vmnames')[copyindex()],"-pip","-resource')]", "type": "microsoft.resources/deployments", "copy": {"name": "copy-pip", "count": 2}, "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('piptemplateuri')]"}, "parameters": {"publicipaddressname": {"value": "[concat(variables('vmnames')[copyindex()],"-pip')]"}, "publicipaddresstype": {"value": "[parameters('pipaddresstype')]"}, "dnsnameforpublicip": {"value": "[concat(variables('vmnames')[copyindex()],uniquestring(resourcegroup().id, "pip'),"-pip')]"}, "location": {"value": "[parameters('location')]"}, "tags": {"value": "[variables('tags')]"}}}}
Creates and optionally secures a Key Vault with logging linked to a storage account.
{"type": "microsoft.keyvault/vaults", "apiversion": "2019-09-01", "name": "[parameters('keyvaultname')]", "location": "[parameters('location')]", "dependson": ["[variables('aadpodidentityuserdefinedmanagedidentityid')]"], "properties": {"accesspolicies": [{"tenantid": "[reference(variables('aadpodidentityuserdefinedmanagedidentityid')).tenantid]", "objectid": "[reference(variables('aadpodidentityuserdefinedmanagedidentityid')).principalid]", "permissions": {"secrets": ["get", "list"], "certificates": ["get"]}}], "sku": {"family": "a", "name": "standard"}, "tenantid": "[subscription().tenantid]", "networkacls": {"bypass": "azureservices", "defaultaction": "[parameters('keyvaultnetworkrulesetdefaultaction')]"}, "enabledfordeployment": false, "enabledfordiskencryption": false, "enabledfortemplatedeployment": false, "enablesoftdelete": false}, "resources": [{"name": "microsoft.insights/default", "type": "providers/diagnosticsettings", "apiversion": "2017-05-01-preview", "dependson": ["[variables('keyvaultid')]", "[variables('workspaceid')]"], "properties": {"workspaceid": "[variables('workspaceid')]", "logs": [{"category": "auditevent", "enabled": true}], "metrics": [{"category": "allmetrics", "enabled": true}]}}]}
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')]"}}]}}{"type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "apiversion": "2017-09-01", "properties": {"publicipallocationmethod": "dynamic", "dnssettings": {"domainnamelabel": "[variables('longnaminginfix')]"}}}{"type": "microsoft.network/networkinterfaces", "name": "[variables('jumpboxnicname')]", "location": "[parameters('location')]", "apiversion": "2017-09-01", "dependson": ["[resourceid('microsoft.network/publicipaddresses/", variables('publicipaddressname'))]", "[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]"], "properties": {"ipconfigurations": [{"name": "[variables('jumpboxipconfigname')]", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('publicipaddressname'))]"}, "subnet": {"id": "[variables('subnetref')]"}}}]}}
Deploy a Linux-based HBase cluster in Azure HDInsight
{"type": "microsoft.hdinsight/clusters", "apiversion": "2021-06-01", "name": "[parameters('clustername')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts", variables('defaultstorageaccount').name)]"], "properties": {"clusterversion": "4.0", "ostype": "linux", "clusterdefinition": {"kind": "hbase", "configurations": {"gateway": {"restauthcredential.isenabled": true, "restauthcredential.username": "[parameters('clusterloginusername')]", "restauthcredential.password": "[parameters('clusterloginpassword')]"}}}, "storageprofile": {"storageaccounts": [{"name": "[replace(replace(reference(resourceid('microsoft.storage/storageaccounts", variables('defaultstorageaccount').name), "2019-06-01').primaryendpoints.blob,"https://","'),"/","')]", "isdefault": true, "container": "[parameters('clustername')]", "key": "[listkeys(resourceid('microsoft.storage/storageaccounts", variables('defaultstorageaccount').name), "2019-06-01').keys[0].value]"}]}, "computeprofile": {"roles": [{"name": "headnode", "targetinstancecount": 2, "hardwareprofile": {"vmsize": "[parameters('headnodevirtualmachinesize')]"}, "osprofile": {"linuxoperatingsystemprofile": {"username": "[parameters('sshusername')]", "password": "[parameters('sshpassword')]"}}}, {"name": "workernode", "targetinstancecount": 2, "hardwareprofile": {"vmsize": "[parameters('workernodevirtualmachinesize')]"}, "osprofile": {"linuxoperatingsystemprofile": {"username": "[parameters('sshusername')]", "password": "[parameters('sshpassword')]"}}}, {"name": "zookeepernode", "targetinstancecount": 3, "hardwareprofile": {"vmsize": "[parameters('zookeepernodevirtualmachinesize')]"}, "osprofile": {"linuxoperatingsystemprofile": {"username": "[parameters('sshusername')]", "password": "[parameters('sshpassword')]"}}}]}}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/privateendpoints", "apiversion": "2020-07-01", "name": "[parameters('filestorageaccountprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('filestorageaccountid')]", "[variables('fileshareid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('filestorageaccountprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('filestorageaccountid')]", "groupids": ["[variables('filestorageaccountprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}}}{"type": "microsoft.network/privateendpoints/privatednszonegroups", "apiversion": "2020-06-01", "name": "[variables('fileprivatednszonegroup')]", "location": "[parameters('location')]", "dependson": ["[variables('fileprivatednszoneid')]", "[variables('filestorageaccountprivateendpointid')]"], "properties": {"privatednszoneconfigs": [{"name": "dnsconfig", "properties": {"privatednszoneid": "[variables('fileprivatednszoneid')]"}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[concat(tolower(parameters('vmname')), uniquestring(resourcegroup().id))]"}}}{"apiversion": "2019-08-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('nsgname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allowsshinbound", "properties": {"priority": 100, "access": "allow", "direction": "inbound", "destinationportrange": "22", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"apiversion": "2019-11-01", "type": "microsoft.network/virtualnetworks", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[variables('nsgid')]"], "properties": {"addressspace": {"addressprefixes": ["[parameters('virtualnetworkaddressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetaddressprefix')]", "networksecuritygroup": {"id": "[variables('nsgid')]"}, "privateendpointnetworkpolicies": "disabled", "privatelinkservicenetworkpolicies": "enabled"}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/networkinterfaces", "name": "[variables('nicname')]", "location": "[parameters('location')]", "dependson": ["[variables('publicipid')]", "[variables('vnetid')]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('publicipaddressname'))]"}, "subnet": {"id": "[variables('subnetid')]"}}}]}}{"type": "microsoft.network/privatednszones", "apiversion": "2020-06-01", "name": "[variables('fileprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones", "apiversion": "2020-06-01", "name": "[variables('blobprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2020-06-01", "name": "[concat(variables('fileprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('fileprivatednszoneid')]", "[variables('vnetid')]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[variables('vnetid')]"}}}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2020-06-01", "name": "[concat(variables('blobprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('blobprivatednszoneid')]", "[variables('vnetid')]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[variables('vnetid')]"}}}{"type": "microsoft.network/privateendpoints", "apiversion": "2020-07-01", "name": "[parameters('blobstorageaccountprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetid')]", "[variables('blobstorageaccountid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('blobstorageaccountprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('blobstorageaccountid')]", "groupids": ["[variables('blobstorageaccountprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}}}{"type": "microsoft.network/privateendpoints/privatednszonegroups", "apiversion": "2020-06-01", "name": "[variables('blobprivatednszonegroup')]", "location": "[parameters('location')]", "dependson": ["[variables('blobprivatednszoneid')]", "[variables('blobstorageaccountprivateendpointid')]"], "properties": {"privatednszoneconfigs": [{"name": "dnsconfig", "properties": {"privatednszoneid": "[variables('blobprivatednszoneid')]"}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"comments": "default network security group for template", "type": "microsoft.network/networksecuritygroups", "apiversion": "2020-05-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "[concat('default-allow-", variables('nsgosport')[parameters('os')])]", "properties": {"priority": 1000, "access": "allow", "direction": "inbound", "destinationportrange": "[variables('nsgosport')[parameters('os')]]", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "apiversion": "2020-05-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"], "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnet1name')]", "properties": {"addressprefix": "[variables('subnet1prefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}}}, {"name": "[variables('subnet2name')]", "properties": {"addressprefix": "[variables('subnet2prefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}}}]}}{"type": "microsoft.network/networkinterfaces", "name": "[concat('nic", copyindex())]", "apiversion": "2020-05-01", "location": "[parameters('location')]", "copy": {"name": "nicloop", "count": "[parameters('numberofinstances')]"}, "dependson": ["[variables('virtualnetworkname')]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "subnet": {"id": "[if(equals(mod(copyindex(), 2),0), variables('subnet1ref'), variables('subnet2ref'))]"}}}]}}
This template creates a data collection rule defining the data source (Syslog) and the destination workspace.
{"scope": "[format('microsoft.apimanagement/service/{0}", variables('apim-name'))]", "type": "microsoft.insights/diagnosticsettings", "apiversion": "2017-05-01-preview", "name": "logtoanalytics", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.apimanagement/service", variables('apim-name'))]"], "properties": {"workspaceid": "[parameters('log-analytics-workspace-id')]", "logs": [{"category": "gatewaylogs", "enabled": true}], "metrics": [{"category": "allmetrics", "enabled": true}]}}{"scope": "[format('microsoft.network/applicationgateways/{0}", variables('app-gateway-name'))]", "type": "microsoft.insights/diagnosticsettings", "apiversion": "2017-05-01-preview", "name": "logtoanalytics", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/applicationgateways", variables('app-gateway-name'))]"], "properties": {"workspaceid": "[parameters('log-analytics-workspace-id')]", "logs": [{"category": "applicationgatewayaccesslog", "enabled": true}, {"category": "applicationgatewayperformancelog", "enabled": true}, {"category": "applicationgatewayfirewalllog", "enabled": true}], "metrics": [{"category": "allmetrics", "enabled": true}]}}{"type": "microsoft.insights/components", "apiversion": "2020-02-02-preview", "name": "[variables('app-insights-name')]", "location": "[parameters('location')]", "kind": "web", "properties": {"application_type": "web", "workspaceresourceid": "[parameters('log-analytics-workspace-id')]"}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"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]"}}}{"apiversion": "2020-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('haproxyvmnameprefix'), copyindex(), "/configurehaproxyvm')]", "copy": {"name": "haproxyvmextensionsloop", "count": "[variables('numberofhaproxyinstances')]"}, "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", concat(parameters('haproxyvmnameprefix'), copyindex()))]", "appvmextensionsloop"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"fileuris": "[variables('haproxyvmscripts').fileuris]", "commandtoexecute": "[variables('haproxyvmscripts').commandtoexecute]"}}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2020-12-01", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces/", variables('networkinterfacename'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[parameters('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "microsoftwindowsserver", "offer": "windowsserver", "sku": "2016-datacenter", "version": "latest"}, "osdisk": {"name": "tfsbasicmanagedosdisk", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('networkinterfacename'))]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'),"/createdc')]", "apiversion": "2020-12-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines", parameters('vmname'))]"], "properties": {"publisher": "microsoft.powershell", "type": "dsc", "typehandlerversion": "2.19", "autoupgrademinorversion": true, "settings": {"modulesurl": "[uri(parameters('_artifactslocation'), concat('dsc/createdc.ps1.zip", parameters('_artifactslocationsastoken')))]", "configurationfunction": "createdc.ps1\\createdc", "properties": {"domainname": "[parameters('domainname')]", "admincreds": {"username": "[parameters('adminusername')]", "password": "privatesettingsref:adminpassword"}}}, "protectedsettings": {"items": {"adminpassword": "[parameters('adminpassword')]"}}}}
Establish connection to a VNET via an ExpressRoute circuit
{"name": "[variables('nsgname')]", "type": "microsoft.network/networksecuritygroups", "location": "[parameters('location')]", "apiversion": "2020-08-01", "properties": {"securityrules": [{"name": "rule1", "properties": {"protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 101, "direction": "inbound"}}]}}{"name": "[variables('advnetname')]", "type": "microsoft.network/virtualnetworks", "location": "[parameters('location')]", "apiversion": "2020-08-01", "dependson": ["[variables('nsgid')]"], "properties": {"addressspace": {"addressprefixes": ["[variables('vnetaddressrange')]"]}, "subnets": [{"name": "[variables('adsubnetname')]", "properties": {"addressprefix": "[variables('subnetaddressrange')]", "networksecuritygroup": {"id": "[variables('nsgid')]"}}}]}}{"name": "[variables('publicipaddressname')]", "type": "microsoft.network/publicipaddresses", "location": "[parameters('location')]", "apiversion": "2020-08-01", "dependson": ["[variables('advnetname')]"], "properties": {"publicipallocationmethod": "dynamic", "dnssettings": {"domainnamelabel": "[variables('dnslabelprefix')]"}}}{"name": "[parameters('gwpublicipaddressname')]", "type": "microsoft.network/publicipaddresses", "location": "[parameters('location')]", "apiversion": "2020-08-01", "dependson": ["[variables('deployprimaryadid')]"], "properties": {"publicipallocationmethod": "dynamic", "dnssettings": {"domainnamelabel": "[parameters('gwdnslabelprefix')]"}}}{"name": "[variables('publiclbname')]", "type": "microsoft.network/loadbalancers", "apiversion": "2020-08-01", "location": "[parameters('location')]", "dependson": ["[variables('publicipaddressid')]"], "properties": {"frontendipconfigurations": [{"name": "[variables('lbfe')]", "properties": {"publicipaddress": {"id": "[variables('publicipaddressid')]"}}}], "backendaddresspools": [{"name": "[variables('lbbe')]"}], "inboundnatrules": [{"name": "[variables('rdpnat')]", "properties": {"frontendipconfiguration": {"id": "[variables('publiclbfeconfigid')]"}, "protocol": "tcp", "frontendport": "[variables('rdpport')]", "backendport": 3389, "enablefloatingip": false}}]}}
Showcase a Virus attack on a Virtual Machine detection & prevention.
{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(variables('vmnames')[copyindex(1)],"/malware')]", "apiversion": "2020-12-01", "location": "[parameters('location')]", "dependson": ["omsextension"], "copy": {"name": "copy-extension-malware", "count": 1}, "properties": {"publisher": "microsoft.azure.security", "type": "iaasantimalware", "typehandlerversion": "1.1", "autoupgrademinorversion": true, "settings": {"antimalwareenabled": true, "exclusions": {"processes": "taskmgr.exe"}, "realtimeprotectionenabled": "true", "scheduledscansettings": {"isenabled": "true", "scantype": "quick", "day": "7", "time": "120"}}}}
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", "dnssettings": {"domainnamelabel": "[parameters('dnsnameforpublicip')]"}}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[variables('vnetname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('vnetaddressprefix')]"]}}, "resources": [{"type": "subnets", "apiversion": "2020-06-01", "name": "[variables('subnet1name')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetname')]"], "properties": {"addressprefix": "[variables('subnet1prefix')]", "privateendpointnetworkpolicies": "disabled"}}]}{"type": "microsoft.network/privateendpoints", "apiversion": "2020-06-01", "name": "[variables('privateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetname')]", "[variables('sqlservername')]"], "properties": {"subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('vnetname'), variables('subnet1name'))]"}, "privatelinkserviceconnections": [{"name": "[variables('privateendpointname')]", "properties": {"privatelinkserviceid": "[resourceid('microsoft.sql/servers",variables('sqlservername'))]", "groupids": ["sqlserver"]}}]}}