Description
stringlengths 21
168
| IaC
stringlengths 158
8.06k
|
---|---|
This template provides a easy way to deploy a Sonarqube docker image (alpine tag) on a Linux Web App with Azure database for MySQL. | {"comments": "this is the linux web app with the sonarquebe docker image and the db", "type": "microsoft.web/sites", "name": "[parameters('sitename')]", "apiversion": "2019-08-01", "location": "[parameters('location')]", "dependson": ["[variables('hostingplanname')]", "[variables('databasename')]"], "properties": {"siteconfig": {"linuxfxversion": "docker|sonarqube"}, "name": "[parameters('sitename')]", "serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]"}, "resources": [{"comments": "this are the generated settings for the sonar jdbc connectionstring", "name": "appsettings", "type": "config", "apiversion": "2019-08-01", "dependson": ["[resourceid('microsoft.web/sites", parameters('sitename'))]"], "tags": {"displayname": "sonarappsettings"}, "properties": {"sonarqube_jdbc_url": "[concat('jdbc:mysql://", reference(resourceid('microsoft.dbformysql/servers",variables('servername'))).fullyqualifieddomainname , ":3306/",variables('databasename'),"?verifyservercertificate=true&usessl=true&requiressl=false&useunicode=true&characterencoding=utf8')]", "sonarqube_jdbc_username": "[variables('jdbcsonarusername')]", "sonarqube_jdbc_password": "[parameters('administratorloginpassword')]"}}]}{"apiversion": "2019-08-01", "name": "[variables('hostingplanname')]", "type": "microsoft.web/serverfarms", "location": "[parameters('location')]", "properties": {"name": "[variables('hostingplanname')]", "workersizeid": "1", "reserved": true, "numberofworkers": "1"}, "sku": {"tier": "[parameters('serviceplantier')]", "name": "[parameters('serviceplansku')]"}, "kind": "linux"} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/virtualnetworks", "name": "[variables('vnet1').name]", "apiversion": "2020-07-01", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('vnet1').addressspaceprefix]"]}, "subnets": [{"name": "[variables('vnet1').subnetname]", "properties": {"addressprefix": "[variables('vnet1').subnetprefix]"}}]}}{"type": "microsoft.network/virtualnetworks", "name": "[variables('vnet2').name]", "apiversion": "2020-07-01", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('vnet2').addressspaceprefix]"]}, "subnets": [{"name": "[variables('vnet2').subnetname]", "properties": {"addressprefix": "[variables('vnet2').subnetprefix]"}}]}} |
Establish connection to a VNET via an ExpressRoute circuit | {"apiversion": "2020-03-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "sku": {"name": "standard"}, "properties": {"publicipallocationmethod": "static", "dnssettings": {"domainnamelabel": "[parameters('dnslabelprefix')]"}}} |
This template provides a way to deploy an Azure database for MySQL with VNet integration. | {"type": "microsoft.dbformysql/servers", "apiversion": "2017-12-01", "name": "[variables('mysqlservername')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('dbskuname')]", "tier": "[parameters('dbskutier')]", "capacity": "[parameters('dbskucapacity')]", "family": "[parameters('databaseskufamily')]"}, "properties": {"createmode": "default", "version": "[parameters('mysqlversion')]", "administratorlogin": "[parameters('administratorlogin')]", "administratorloginpassword": "[parameters('administratorloginpassword')]", "storageprofile": {"storagemb": "[parameters('dbskusizemb')]", "backupretentiondays": 7, "georedundantbackup": "disabled"}, "sslenforcement": "disabled"}} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "apiversion": "2019-08-01", "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "[variables('subnetprefix')]"}}, {"name": "[variables('agsubnetname')]", "properties": {"addressprefix": "[variables('agsubnetprefix')]"}}]}}{"type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "apiversion": "2019-08-01", "properties": {"publicipallocationmethod": "dynamic", "dnssettings": {"domainnamelabel": "[variables('longnaminginfix')]"}}}{"type": "microsoft.network/loadbalancers", "name": "[variables('loadbalancername')]", "location": "[parameters('location')]", "apiversion": "2019-08-01", "dependson": ["[resourceid('microsoft.network/publicipaddresses/", variables('publicipaddressname'))]"], "properties": {"frontendipconfigurations": [{"name": "[variables('lbfrontendname')]", "properties": {"publicipaddress": {"id": "[variables('publicipaddressid')]"}}}], "backendaddresspools": [{"name": "[variables('bepoolname')]"}], "inboundnatpools": [{"name": "[variables('natpoolname')]", "properties": {"frontendipconfiguration": {"id": "[variables('frontendipconfigid')]"}, "protocol": "tcp", "frontendportrangestart": "[variables('natstartport')]", "frontendportrangeend": "[variables('natendport')]", "backendport": "[variables('natbackendport')]"}}], "loadbalancingrules": [{"name": "lbrule", "properties": {"frontendipconfiguration": {"id": "[variables('frontendipconfigid')]"}, "backendaddresspool": {"id": "[resourceid('microsoft.network/loadbalancers/backendaddresspools", variables('loadbalancername'), variables('bepoolname'))]"}, "probe": {"id": "[resourceid('microsoft.network/loadbalancers/probes", variables('loadbalancername'), variables('lbprobename'))]"}, "protocol": "tcp", "loaddistribution": "sourceip", "frontendport": 80, "backendport": 80, "idletimeoutinminutes": 15}}], "probes": [{"name": "[variables('lbprobename')]", "properties": {"protocol": "http", "port": 80, "intervalinseconds": 15, "numberofprobes": 2, "requestpath": "cgi-bin/probe"}}]}}{"type": "microsoft.network/publicipaddresses", "name": "[variables('dbpublicipaddressname')]", "location": "[parameters('location')]", "apiversion": "2019-08-01", "properties": {"publicipallocationmethod": "dynamic", "dnssettings": {"domainnamelabel": "[variables('dblongnaminginfix')]"}}}{"type": "microsoft.network/loadbalancers", "name": "[variables('dbloadbalancername')]", "location": "[parameters('location')]", "apiversion": "2019-08-01", "dependson": ["[resourceid('microsoft.network/publicipaddresses/", variables('dbpublicipaddressname'))]"], "properties": {"frontendipconfigurations": [{"name": "[variables('dblbfrontendname')]", "properties": {"publicipaddress": {"id": "[variables('dbpublicipaddressid')]"}}}], "backendaddresspools": [{"name": "[variables('dbbepoolname')]"}], "loadbalancingrules": [{"name": "lbrule", "properties": {"frontendipconfiguration": {"id": "[resourceid('microsoft.network/loadbalancers/frontendipconfigurations", variables('dbloadbalancername'), variables('dblbfrontendname'))]"}, "backendaddresspool": {"id": "[resourceid('microsoft.network/loadbalancers/backendaddresspools", variables('dbloadbalancername'), variables('dbbepoolname'))]"}, "probe": {"id": "[resourceid('microsoft.network/loadbalancers/probes", variables('dbloadbalancername'), variables('dblbprobename'))]"}, "protocol": "tcp", "loaddistribution": "sourceip", "frontendport": 50000, "backendport": 3389, "idletimeoutinminutes": 15}}], "probes": [{"name": "[variables('dblbprobename')]", "properties": {"protocol": "tcp", "port": 3389, "intervalinseconds": 15, "numberofprobes": 2}}]}}{"apiversion": "2019-08-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('agpublicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic", "dnssettings": {"domainnamelabel": "[variables('aglongnaminginfix')]"}}}{"apiversion": "2019-04-01", "name": "[variables('agname')]", "type": "microsoft.network/applicationgateways", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]", "[resourceid('microsoft.network/publicipaddresses/", variables('agpublicipaddressname'))]"], "properties": {"sku": {"tier": "[parameters('applicationgatewayskutier')]", "name": "[parameters('applicationgatewayskuname')]", "capacity": "[parameters('applicationgatewaycapacity')]"}, "sslcertificates": [{"name": "[variables('agsslcertname')]", "properties": {"data": "[parameters('certificatebase64encoded')]", "password": "[parameters('certificatepassword')]"}}], "gatewayipconfigurations": [{"name": "appgatewayipconfig", "properties": {"subnet": {"id": "[variables('agsubnetid')]"}}}], "frontendipconfigurations": [{"name": "[variables('agfrontendipname')]", "properties": {"publicipaddress": {"id": "[variables('agpublicipaddressid')]"}}}], "frontendports": [{"name": "[variables('agfrontendportname')]", "properties": {"port": 443}}], "backendaddresspools": [{"name": "[variables('agbackendaddresspoolname')]"}], "backendhttpsettingscollection": [{"name": "[variables('agbackendhttpsettingsname')]", "properties": {"port": 80, "protocol": "http", "cookiebasedaffinity": "enabled", "requesttimeout": 120}}], "httplisteners": [{"name": "[variables('aghttplistenername')]", "properties": {"frontendipconfiguration": {"id": "[resourceid('microsoft.network/applicationgateways/frontendipconfigurations",variables('agname'),variables('agfrontendipname'))]"}, "frontendport": {"id": "[resourceid('microsoft.network/applicationgateways/frontendports",variables('agname'),variables('agfrontendportname'))]"}, "protocol": "https", "sslcertificate": {"id": "[resourceid('microsoft.network/applicationgateways/sslcertificates",variables('agname'),variables('agsslcertname'))]"}}}], "requestroutingrules": [{"name": "rule1", "properties": {"ruletype": "basic", "httplistener": {"id": "[resourceid('microsoft.network/applicationgateways/httplisteners",variables('agname'),variables('aghttplistenername'))]"}, "backendaddresspool": {"id": "[resourceid('microsoft.network/applicationgateways/backendaddresspools",variables('agname'),variables('agbackendaddresspoolname'))]"}, "backendhttpsettings": {"id": "[resourceid('microsoft.network/applicationgateways/backendhttpsettingscollection",variables('agname'),variables('agbackendhttpsettingsname'))]"}}}]}} |
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('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')]"}}} |
This sample contains a script to easily migrate template gallery templates to templateSpec resources. | {"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "createvnet", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('vnettemplateuri')]", "contentversion": "1.0.0.0"}, "parameters": {"virtualnetworkname": {"value": "[variables('virtualnetworkname')]"}, "virtualnetworkaddressrange": {"value": "[variables('virtualnetworkaddressrange')]"}, "subnetname": {"value": "[variables('adsubnetname')]"}, "subnetrange": {"value": "[variables('adsubnet')]"}, "location": {"value": "[parameters('location')]"}}}}{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "updatevnetdns1", "dependson": ["[resourceid('microsoft.compute/virtualmachines/extensions", variables('vmname')[0], "createadforest')]", "[resourceid('microsoft.compute/virtualmachines/extensions", variables('vmname')[1], "peparebdc')]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('vnettemplateuri')]", "contentversion": "1.0.0.0"}, "parameters": {"virtualnetworkname": {"value": "[variables('virtualnetworkname')]"}, "virtualnetworkaddressrange": {"value": "[variables('virtualnetworkaddressrange')]"}, "subnetname": {"value": "[variables('adsubnetname')]"}, "subnetrange": {"value": "[variables('adsubnet')]"}, "dnsserveraddress": {"value": ["[variables('ipaddress')[0]]"]}, "location": {"value": "[parameters('location')]"}}}} |
This sample contains a script to easily migrate template gallery templates to templateSpec resources. | {"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "createvnet", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('vnettemplateuri')]", "contentversion": "1.0.0.0"}, "parameters": {"virtualnetworkname": {"value": "[variables('virtualnetworkname')]"}, "virtualnetworkaddressrange": {"value": "[variables('virtualnetworkaddressrange')]"}, "subnetname": {"value": "[variables('adsubnetname')]"}, "subnetrange": {"value": "[variables('adsubnet')]"}, "location": {"value": "[parameters('location')]"}}}} |
Create a VM from a Windows Image with 4 Empty Data Disks | {"type": "microsoft.compute/availabilitysets", "name": "[variables('avsetnameascs')]", "apiversion": "2020-06-01", "location": "[parameters('location')]", "sku": {"name": "aligned"}, "condition": "[equals(length(parameters('availabilityzones')), 0)]", "properties": {"platformfaultdomaincount": 2, "platformupdatedomaincount": 10}}{"type": "microsoft.compute/virtualmachines", "name": "[concat(variables('vmnameascs'), "-", copyindex())]", "copy": {"name": "xscsvmloop", "count": "[variables('ascsvmcount')]"}, "dependson": ["nicascsloop", "[resourceid('microsoft.compute/availabilitysets", variables('avsetnameascs'))]"], "apiversion": "2020-06-01", "location": "[parameters('location')]", "zones": "[if(equals(length(parameters('availabilityzones')), 0), json('null'), array(variables('azarray')[mod(copyindex(), variables('azarraylength'))]))]", "properties": {"availabilityset": "[if(equals(variables('azarraylength'), 0), resourceid('microsoft.compute/availabilitysets", variables('avsetnameascs')), json('null'))]", "hardwareprofile": {"vmsize": "[variables('ascsvmsize')]"}, "osprofile": {"computername": "[concat(variables('vmnameascs'), "-", copyindex())]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[variables('images')[parameters('ostype')].publisher]", "offer": "[variables('images')[parameters('ostype')].offer]", "sku": "[variables('images')[parameters('ostype')].sku]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmnameascs'), "-", copyindex(), "-osdisk')]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "premium_lrs"}}, "datadisks": [{"lun": 0, "createoption": "empty", "disksizegb": 128}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", concat(variables('nicnameascs'), "-", copyindex()))]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(variables('vmnameascs'), "-", copyindex(), "/", variables('csextension')[variables('internalostype')].name)]", "apiversion": "2020-06-01", "location": "[parameters('location')]", "dependson": ["xscsvmloop"], "copy": {"name": "xscsextvmloop", "count": "[variables('ascsvmcount')]"}, "properties": {"publisher": "[variables('csextension')[variables('internalostype')].publisher]", "type": "[variables('csextension')[variables('internalostype')].name]", "typehandlerversion": "[variables('csextension')[variables('internalostype')].version]", "autoupgrademinorversion": true, "settings": {"fileuris": ["[variables('csextension')[variables('internalostype')].script]"], "commandtoexecute": "[concat(variables('csextension')[variables('internalostype')].scriptcall, " ", variables('scriptargumentsascsdi')[variables('internalostype')])]"}}}{"type": "microsoft.compute/availabilitysets", "name": "[variables('avsetnamedb')]", "apiversion": "2020-06-01", "location": "[parameters('location')]", "sku": {"name": "aligned"}, "condition": "[equals(length(parameters('availabilityzones')), 0)]", "properties": {"platformfaultdomaincount": 2, "platformupdatedomaincount": 10}}{"type": "microsoft.compute/virtualmachines", "name": "[concat(variables('vmnamedb'), "-", copyindex())]", "copy": {"name": "dbvmloop", "count": "[variables('dbvmcount')]"}, "dependson": ["nicdbloop", "[resourceid('microsoft.compute/availabilitysets", variables('avsetnamedb'))]"], "apiversion": "2020-06-01", "location": "[parameters('location')]", "zones": "[if(equals(length(parameters('availabilityzones')), 0), json('null'), array(variables('azarray')[mod(copyindex(), variables('azarraylength'))]))]", "properties": {"availabilityset": "[if(equals(variables('azarraylength'), 0), resourceid('microsoft.compute/availabilitysets", variables('avsetnamedb')), json('null'))]", "hardwareprofile": {"vmsize": "[variables('dbvmsize')]"}, "osprofile": {"computername": "[concat(variables('vmnamedb'), "-", copyindex())]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[variables('images')[parameters('ostype')].publisher]", "offer": "[variables('images')[parameters('ostype')].offer]", "sku": "[variables('images')[parameters('ostype')].sku]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmnamedb'), "-", copyindex(), "-osdisk')]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "premium_lrs"}}, "datadisks": "[variables('dbdisks')]"}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", concat(variables('nicnamedb'), "-", copyindex()))]"}]}}} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/networksecuritygroups", "name": "[concat(variables('nsgname'))]", "apiversion": "2020-07-01", "location": "[parameters('location')]", "condition": "[equals(length(parameters('subnetid')), 0)]", "properties": {"securityrules": "[variables('selectedsecurityrules')]"}}{"type": "microsoft.network/virtualnetworks", "name": "[variables('vnetname')]", "apiversion": "2020-07-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups/", variables('nsgname'))]"], "condition": "[equals(length(parameters('subnetid')), 0)]", "properties": {"addressspace": {"addressprefixes": ["10.0.0.0/16"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "10.0.0.0/24", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('nsgname'))]"}}}]}}{"type": "microsoft.network/publicipaddresses", "name": "[concat(variables('publicipnamedb'), "-", copyindex())]", "apiversion": "2020-07-01", "condition": "[equals(length(parameters('subnetid')), 0)]", "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('vnetname'))]"], "location": "[parameters('location')]", "copy": {"name": "dbpiploop", "count": "[variables('dbvmcount')]"}, "properties": {"publicipallocationmethod": "dynamic"}}{"type": "microsoft.network/loadbalancers", "name": "[variables('loadbalancernamedb')]", "apiversion": "2020-07-01", "location": "[parameters('location')]", "condition": "[greater(variables('dbvmcount') , 1)]", "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('vnetname'))]"], "properties": {"frontendipconfigurations": "[variables('lbfrontendconfigs')[parameters('dbtype')][variables('internalostype')]]", "backendaddresspools": "[variables('lbbackendpools')[parameters('dbtype')][variables('internalostype')]]", "loadbalancingrules": "[variables('lbrules')[parameters('dbtype')][variables('internalostype')]]", "probes": "[variables('lbprobes')[parameters('dbtype')][variables('internalostype')]]"}} |
This template creates an Azure Cosmos account for Core (SQL) API and a container with a stored procedure, trigger and user defined function. | {"apiversion": "2020-09-01", "type": "microsoft.documentdb/databaseaccounts", "name": "[parameters('databaseaccountname')]", "location": "[parameters('location')]", "tags": {"displayname": "documentdb"}, "properties": {"name": "[parameters('databaseaccountname')]", "databaseaccountoffertype": "[parameters('documentdboffertype')]", "consistencypolicy": {"defaultconsistencylevel": "[parameters('consistencylevel')]", "maxstalenessprefix": "[parameters('maxstalenessprefix')]", "maxintervalinseconds": "[parameters('maxintervalinseconds')]"}, "locations": [{"locationname": "[parameters('location')]", "failoverpriority": 0}]}} |
Establish connection to a VNET via an ExpressRoute circuit | {"apiversion": "2018-07-01", "type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "[variables('subnetprefix')]"}}]}} |
Establish connection to a VNET via an ExpressRoute circuit | {"apiversion": "2020-05-01", "type": "microsoft.network/networkinterfaces", "name": "[concat('nic", copyindex())]", "location": "[parameters('location')]", "copy": {"name": "nicloop", "count": "[variables('numberofmasterinstances')]"}, "dependson": ["[resourceid('microsoft.resources/deployments/", "shared-resources')]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "static", "privateipaddress": "[concat(parameters('sparknodeipaddressprefix'), copyindex())]", "subnet": {"id": "[variables('subnetref')]"}}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/networkinterfaces", "name": "[concat('nicsl", copyindex())]", "location": "[parameters('location')]", "copy": {"name": "nicslloop", "count": "[variables('numberofslavesinstances')]"}, "dependson": ["[resourceid('microsoft.resources/deployments/", "shared-resources')]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "static", "privateipaddress": "[concat(parameters('sparkslavenodeipaddressprefix'), copyindex())]", "subnet": {"id": "[variables('subnetref')]"}}}]}} |
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')]", "dependson": ["[variables('nsgid')]"], "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "[variables('subnetprefix')]", "networksecuritygroup": {"id": "[variables('nsgid')]"}}}]}} |
Deploy an Azure SQL Server with Auditing enabled to write audit logs to a blob storage | {"type": "microsoft.sql/servers", "name": "[concat(variables('targetservername'))]", "apiversion": "2020-02-02-preview", "location": "[parameters('location')]", "properties": {"administratorlogin": "[parameters('targetsqldbadministratorlogin')]", "administratorloginpassword": "[parameters('targetsqldbadministratorpassword')]", "version": "12.0"}, "resources": [{"type": "databases", "sku": {"name": "s3", "tier": "standard"}, "name": "[variables('databasename')]", "apiversion": "2020-02-02-preview", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.sql/servers", concat(variables('targetservername')))]"], "properties": {"collation": "sql_latin1_general_cp1_ci_as", "maxsizebytes": 2147483648, "zoneredundant": false}, "resources": [{"name": "import", "type": "extensions", "apiversion": "2014-04-01", "dependson": ["[resourceid('microsoft.sql/servers/databases", variables('targetservername'), variables('databasename'))]"], "properties": {"storagekey": "[parameters('_artifactslocationsastoken')]", "storagekeytype": "sharedaccesskey", "storageuri": "[uri(parameters('_artifactslocation'), "templatefiles/adventureworks2016.bacpac')]", "administratorlogin": "[parameters('targetsqldbadministratorlogin')]", "administratorloginpassword": "[parameters('targetsqldbadministratorpassword')]", "operationmode": "import"}}]}, {"type": "firewallrules", "name": "allowallwindowsazureips", "apiversion": "2020-02-02-preview", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.sql/servers", concat(variables('targetservername')))]"], "properties": {"endipaddress": "0.0.0.0", "startipaddress": "0.0.0.0"}}]} |
This module creates a storageAccount resource with apiVersion 2021-01-01. | {"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')]"}]}} |
This template creates a data collection rule defining the data source (Syslog) and the destination workspace. | {"name": "[parameters('actiongroupname')]", "type": "microsoft.insights/actiongroups", "apiversion": "2019-06-01", "location": "global", "properties": {"groupshortname": "[parameters('actiongroupshortname')]", "enabled": true, "emailreceivers": [{"name": "test", "emailaddress": "[parameters('emails')[0]]", "usecommonalertschema": true}]}} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "[variables('subnetprefix')]"}}]}}{"type": "microsoft.network/publicipaddresses", "apiversion": "2020-06-01", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic", "dnssettings": {"domainnamelabel": "[parameters('vmssname')]"}}}{"type": "microsoft.network/loadbalancers", "apiversion": "2020-06-01", "name": "[variables('loadbalancername')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/publicipaddresses", variables('publicipaddressname'))]"], "properties": {"frontendipconfigurations": [{"name": "loadbalancerfrontend", "properties": {"publicipaddress": {"id": "[variables('publicipaddressid')]"}}}], "backendaddresspools": [{"name": "[variables('bepoolname')]"}], "inboundnatpools": [{"name": "[variables('natpoolname')]", "properties": {"frontendipconfiguration": {"id": "[variables('frontendipconfigid')]"}, "protocol": "tcp", "frontendportrangestart": "[variables('natstartport')]", "frontendportrangeend": "[variables('natendport')]", "backendport": "[variables('natbackendport')]"}}, {"name": "[variables('natpool2name')]", "properties": {"frontendipconfiguration": {"id": "[variables('frontendipconfigid')]"}, "protocol": "tcp", "frontendportrangestart": 9000, "frontendportrangeend": 9120, "backendport": 9000}}]}} |
Create a VM from a Windows Image with 4 Empty Data Disks | {"apiversion": "2017-03-30", "type": "microsoft.compute/availabilitysets", "location": "[parameters('location')]", "name": "[parameters('gw-availabilityset')]", "properties": {"platformupdatedomaincount": 20, "platformfaultdomaincount": 2}, "sku": {"name": "aligned"}}{"name": "[concat('gw-vm-",copyindex())]", "type": "microsoft.compute/virtualmachines", "location": "[parameters('location')]", "apiversion": "2017-03-30", "copy": {"name": "gw-vm-loop", "count": "[parameters('numberofwebgwinstances')]"}, "dependson": ["[resourceid('microsoft.compute/availabilitysets", "gw-availabilityset')]", "[concat('microsoft.network/networkinterfaces/gw-",copyindex(),"-nic')]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "availabilityset": {"id": "[resourceid('microsoft.compute/availabilitysets", "gw-availabilityset')]"}, "osprofile": {"computername": "[concat('gateway",copyindex())]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[parameters('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat('gw-vm-",copyindex(),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "standardssd_lrs"}}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",concat('gw-",copyindex(),"-nic'))]"}]}}, "resources": [{"name": "[concat('gw-vm-",copyindex(),"/gateway')]", "type": "microsoft.compute/virtualmachines/extensions", "location": "[parameters('location')]", "apiversion": "2017-12-01", "dependson": ["[resourceid('microsoft.compute/virtualmachines", concat('gw-vm-",copyindex()))]"], "properties": {"publisher": "microsoft.powershell", "type": "dsc", "typehandlerversion": "2.76", "autoupgrademinorversion": true, "settings": {"modulesurl": "[concat(variables('assetlocation'),"/configuration.zip')]", "configurationfunction": "configuration.ps1\\gateway", "properties": {"domainname": "[parameters('addomainname')]", "admincreds": {"username": "[parameters('adminusername')]", "password": "privatesettingsref:adminpassword"}}}, "protectedsettings": {"items": {"adminpassword": "[parameters('adminpassword')]"}}}}, {"apiversion": "2015-06-15", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat('gw-vm-",copyindex(),"/webandgwfarmadd_postconfig1.1')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines", concat('gw-vm-",copyindex()))]", "[concat('microsoft.compute/virtualmachines/gw-vm-",copyindex(),"/extensions/","gateway')]"], "properties": {"publisher": "microsoft.compute", "type": "customscriptextension", "typehandlerversion": "1.9", "autoupgrademinorversion": true, "settings": {"fileuris": ["https://raw.githubusercontent.com/azure/azure-quickstart-templates/master/application-workloads/rds/rds-deployment-ha-gateway/scripts/webandgwfarmadd_postconfig1.1.ps1"]}, "protectedsettings": {"items": {"adminpassword": "[parameters('adminpassword')]"}, "commandtoexecute": "[concat(\"powershell.exe -executionpolicy unrestricted -file\", \" \", \"webandgwfarmadd_postconfig1.1.ps1\",\" \",\"-username "\",parameters(\"adminusername\'),\"" \", \"-password "\",parameters(\"adminpassword\'),\"" \",\"-brokerserver "\",parameters(\"brokerserver\'),\"" \",\"-weburl "\",parameters(\"weburl\'),\"" \",\"-domainname "\",parameters(\"addomainname\'),\"" \",\"-domainnetbios "\",parameters(\"domainnetbios\'),\"" \",\"-numberofwebservers \",parameters(\"numberofwebgwinstances\'))]"}}}]} |
This module creates a storageAccount resource with apiVersion 2021-01-01. | {"apiversion": "2020-08-01-preview", "type": "microsoft.storage/storageaccounts", "name": "[variables('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storagev2"} |
Storage Account with Storage Service Encryption and a blob deletion retention policy | {"type": "microsoft.storage/storageaccounts", "name": "[variables('bwafstorageaccountname')]", "apiversion": "2021-01-01", "location": "[parameters('location')]", "comments": "storage account used to store the bwaf vm disks", "tags": {"displayname": "bwaf vm storage account", "quickstartname": "[variables('quickstarttags').name]", "provider": "[variables('barracudanetworkstags').provider]"}, "sku": {"name": "[variables('storageaccounttype')]"}, "kind": "storage", "properties": {}}{"type": "microsoft.storage/storageaccounts", "name": "[variables('webstorageaccountname')]", "apiversion": "2021-01-01", "location": "[parameters('location')]", "comments": "storage account used to store the web vm disks", "tags": {"displayname": "web vm storage account", "quickstartname": "[variables('quickstarttags').name]", "provider": "[variables('barracudanetworkstags').provider]"}, "sku": {"name": "[variables('storageaccounttype')]"}, "kind": "storage", "properties": {}}{"type": "microsoft.storage/storageaccounts", "name": "[variables('diagstorageaccountname')]", "apiversion": "2021-01-01", "location": "[parameters('location')]", "comments": "storage account used to store vm diagnostics data", "tags": {"displayname": "diagnostics storage account", "quickstartname": "[variables('quickstarttags').name]", "provider": "[variables('barracudanetworkstags').provider]"}, "sku": {"name": "standard_lrs"}, "kind": "storage", "properties": {}} |
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01. | {"type": "microsoft.compute/virtualmachines", "name": "[concat(variables('clustername'), "-dev')]", "apiversion": "2017-12-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces", concat(variables('clustername'), "-dev", "-vmnic'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('infravmsize')]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[variables('ubuntuosversion')]", "version": "latest"}, "osdisk": {"createoption": "fromimage", "caching": "readwrite", "manageddisk": {"storageaccounttype": "[variables('standardstorageaccounttype')]"}}}, "osprofile": {"computername": "[concat(variables('clustername'), "-dev')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", concat(variables('clustername'), "-dev", "-vmnic'))]"}]}}}{"apiversion": "2017-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(variables('clustername'), "-dev", "/setupdevbox')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines", concat(variables('clustername'), "-dev'))]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"fileuris": ["[variables('scriptfileuri')]"]}, "protectedsettings": {"commandtoexecute": "[concat('bash setupdevbox.sh ", parameters('adminusername'), " --cluster_name ", variables('clustername'), " --cluster_location ", parameters('location'), " --worker_vm_size ", parameters('workervmsize'), " --infra_vm_size ", parameters('infravmsize'), " --worker_node_num ", parameters('numberofworkervm'), " --infra_node_num ", parameters('numberofinfravm'), " --password ", variables('adminpasswordq'), " --users ", variables('dlwsadminsq'), " --openid_name ", variables('openidproviderq'), " --openid_tenant ", variables('openidtenantq'), " --openid_clientid ", variables('openidclientidq'), " --openid_clientsecret ", variables('openidclientsecretq'))]"}}}{"type": "microsoft.compute/virtualmachines", "name": "[concat(variables('clustername'), "-infra0", copyindex(1))]", "apiversion": "2017-12-01", "location": "[parameters('location')]", "copy": {"name": "infravmloop", "count": "[parameters('numberofinfravm')]"}, "dependson": ["[resourceid('microsoft.network/networkinterfaces", concat(variables('clustername'), "-infra0", copyindex(1), "-vmnic'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('infravmsize')]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[variables('ubuntuosversion')]", "version": "latest"}, "osdisk": {"createoption": "fromimage", "caching": "readwrite", "manageddisk": {"storageaccounttype": "[variables('standardstorageaccounttype')]"}}}, "osprofile": {"computername": "[concat(variables('clustername'), "-infra0", copyindex(1))]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", concat(variables('clustername'), "-infra0", copyindex(1), "-vmnic'))]"}]}}} |
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/", parameters('newstorageaccountname'))]", "[resourceid('microsoft.network/networkinterfaces/", variables('nicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[parameters('imagepublisher')]", "offer": "[parameters('imageoffer')]", "sku": "[parameters('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(variables('vmname'), "/django')]", "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('install_django.sh", parameters('_artifactslocationsastoken')))]"]}, "protectedsettings": {"commandtoexecute": "[concat('sh install_django.sh ", parameters('vmdnsname'), " ", parameters('servername'), " ", parameters('administratorlogin'), " ", parameters('administratorloginpassword'), " ", parameters('databasename'))]"}}} |
Create a Data Factory account, Blob source, SQL sink and Copy Activity Pipeline | {"type": "microsoft.datafactory/factories", "apiversion": "2018-06-01", "name": "[parameters('datafactoryname')]", "location": "[parameters('location')]", "identity": {"type": "systemassigned"}}{"type": "microsoft.datafactory/factories/linkedservices", "apiversion": "2018-06-01", "name": "[format('{0}/{1}", parameters('datafactoryname'), variables('datafactorylinkedservicename'))]", "properties": {"type": "azureblobstorage", "typeproperties": {"connectionstring": "[format('defaultendpointsprotocol=https;accountname={0};accountkey={1}", parameters('storageaccountname'), listkeys(resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname')), "2021-04-01').keys[0].value)]"}}, "dependson": ["[resourceid('microsoft.datafactory/factories", parameters('datafactoryname'))]", "[resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname'))]"]}{"type": "microsoft.datafactory/factories/datasets", "apiversion": "2018-06-01", "name": "[format('{0}/{1}", parameters('datafactoryname'), variables('datafactorydatasetinname'))]", "properties": {"linkedservicename": {"referencename": "[variables('datafactorylinkedservicename')]", "type": "linkedservicereference"}, "type": "binary", "typeproperties": {"location": {"type": "azureblobstoragelocation", "container": "[format('{0}/default/{1}", parameters('storageaccountname'), parameters('blobcontainername'))]", "folderpath": "input", "filename": "emp.txt"}}}, "dependson": ["[resourceid('microsoft.storage/storageaccounts/blobservices/containers", split(format('{0}/default/{1}", parameters('storageaccountname'), parameters('blobcontainername')), "/')[0], split(format('{0}/default/{1}", parameters('storageaccountname'), parameters('blobcontainername')), "/')[1], split(format('{0}/default/{1}", parameters('storageaccountname'), parameters('blobcontainername')), "/')[2])]", "[resourceid('microsoft.datafactory/factories", parameters('datafactoryname'))]", "[resourceid('microsoft.datafactory/factories/linkedservices", parameters('datafactoryname'), variables('datafactorylinkedservicename'))]"]}{"type": "microsoft.datafactory/factories/datasets", "apiversion": "2018-06-01", "name": "[format('{0}/{1}", parameters('datafactoryname'), variables('datafactorydatasetoutname'))]", "properties": {"linkedservicename": {"referencename": "[variables('datafactorylinkedservicename')]", "type": "linkedservicereference"}, "type": "binary", "typeproperties": {"location": {"type": "azureblobstoragelocation", "container": "[format('{0}/default/{1}", parameters('storageaccountname'), parameters('blobcontainername'))]", "folderpath": "output"}}}, "dependson": ["[resourceid('microsoft.storage/storageaccounts/blobservices/containers", split(format('{0}/default/{1}", parameters('storageaccountname'), parameters('blobcontainername')), "/')[0], split(format('{0}/default/{1}", parameters('storageaccountname'), parameters('blobcontainername')), "/')[1], split(format('{0}/default/{1}", parameters('storageaccountname'), parameters('blobcontainername')), "/')[2])]", "[resourceid('microsoft.datafactory/factories", parameters('datafactoryname'))]", "[resourceid('microsoft.datafactory/factories/linkedservices", parameters('datafactoryname'), variables('datafactorylinkedservicename'))]"]}{"type": "microsoft.datafactory/factories/pipelines", "apiversion": "2018-06-01", "name": "[format('{0}/{1}", parameters('datafactoryname'), variables('pipelinename'))]", "properties": {"activities": [{"name": "mycopyactivity", "type": "copy", "policy": {"timeout": "7.00:00:00", "retry": 0, "retryintervalinseconds": 30, "secureoutput": false, "secureinput": false}, "typeproperties": {"source": {"type": "binarysource", "storesettings": {"type": "azureblobstoragereadsettings", "recursive": true}}, "sink": {"type": "binarysink", "storesettings": {"type": "azureblobstoragewritersettings"}}, "enablestaging": false}, "inputs": [{"referencename": "[variables('datafactorydatasetinname')]", "type": "datasetreference"}], "outputs": [{"referencename": "[variables('datafactorydatasetoutname')]", "type": "datasetreference"}]}]}, "dependson": ["[resourceid('microsoft.datafactory/factories", parameters('datafactoryname'))]", "[resourceid('microsoft.datafactory/factories/datasets", parameters('datafactoryname'), variables('datafactorydatasetinname'))]", "[resourceid('microsoft.datafactory/factories/datasets", parameters('datafactoryname'), variables('datafactorydatasetoutname'))]"]} |
Establish connection to a VNET via an ExpressRoute circuit | {"condition": "[empty(parameters('subnetid'))]", "type": "microsoft.network/networksecuritygroups", "apiversion": "2020-04-01", "name": "[variables('nsgname')]", "location": "[parameters('location')]", "properties": {"securityrules": "[variables('selectedsecurityrules')]"}} |
This module creates a storageAccount resource with apiVersion 2021-01-01. | {"type": "microsoft.storage/storageaccounts", "apiversion": "2021-08-01", "name": "[variables('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storage"} |
Create a VM from a Windows Image with 4 Empty Data Disks | {"name": "[parameters('vmname')]", "type": "microsoft.compute/virtualmachines", "location": "[parameters('location')]", "apiversion": "2020-12-01", "dependson": ["[resourceid('microsoft.network/networkinterfaces", variables('vmnicname'))]"], "tags": {"displayname": "vm01"}, "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[parameters('vmname')]", "adminusername": "[parameters('vmadminusername')]", "adminpassword": "[parameters('vmadminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "[variables('vmimagepublisher')]", "offer": "[variables('vmimageoffer')]", "sku": "[parameters('vmsku')]", "version": "[parameters('vmversion')]"}, "osdisk": {"name": "[concat(parameters('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('vmnicname'))]"}]}}, "resources": [{"name": "setupoffice", "type": "extensions", "location": "[parameters('location')]", "apiversion": "2020-12-01", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", parameters('vmname'))]"], "tags": {"displayname": "setupoffice"}, "properties": {"publisher": "microsoft.compute", "type": "customscriptextension", "typehandlerversion": "1.9", "autoupgrademinorversion": true, "settings": {"fileuris": ["[uri(parameters('_artifactslocation'), concat('scripts/", parameters('setupofficescriptfilename'), parameters('_artifactslocationsastoken')))]", "https://raw.githubusercontent.com/officedev/office-it-pro-deployment-scripts/master/office-proplus-deployment/deploy-officeclicktorun/defaultconfiguration.xml", "https://raw.githubusercontent.com/officedev/office-it-pro-deployment-scripts/master/office-proplus-deployment/deploy-officeclicktorun/office2013setup.exe", "https://raw.githubusercontent.com/officedev/office-it-pro-deployment-scripts/master/office-proplus-deployment/deploy-officeclicktorun/office2016setup.exe", "https://raw.githubusercontent.com/officedev/office-it-pro-deployment-scripts/master/office-proplus-deployment/deploy-officeclicktorun/edit-officeconfigurationfile.ps1", "https://raw.githubusercontent.com/officedev/office-it-pro-deployment-scripts/master/office-proplus-deployment/deploy-officeclicktorun/generate-odtconfigurationxml.ps1", "https://raw.githubusercontent.com/officedev/office-it-pro-deployment-scripts/master/office-proplus-deployment/deploy-officeclicktorun/install-officeclicktorun.ps1"], "commandtoexecute": "[concat('powershell -executionpolicy bypass -file scripts/", parameters('setupofficescriptfilename')," -officeversion ", parameters('officeversion'))]"}}}]} |
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('nicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[parameters('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[parameters('ubuntuosversion')]", "version": "latest"}, "osdisk": {"ostype": "linux", "name": "[concat(parameters('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "premium_lrs"}}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'),"/installscript')]", "apiversion": "2020-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('install_xrdp.sh", parameters('_artifactslocationsastoken')))]"], "commandtoexecute": "bash install_xrdp.sh"}}} |
Establish connection to a VNET via an ExpressRoute circuit | {"apiversion": "2015-06-15", "type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "comments": "this the virtual network that all resources will be deployed to.", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["10.0.0.0/16"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "10.0.2.0/24"}}]}}{"apiversion": "2015-06-15", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "comments": "this is the public ip address that will be assigned to the azure load balancer.", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[variables('dnsnameforlbip')]"}}}{"apiversion": "2015-06-15", "type": "microsoft.network/networksecuritygroups", "name": "[variables('networksecurityname')]", "comments": "this network security group (nsg) will limit the tcp ports open to the kemp loadmasters.", "location": "[parameters('location')]", "tags": {"displayname": "[variables('networksecurityname')]"}, "properties": {"securityrules": [{"name": "wui-rule", "properties": {"description": "allow wui", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "8443", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 100, "direction": "inbound"}}, {"name": "ssh-rule", "properties": {"description": "allow ssh", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "22", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 101, "direction": "inbound"}}, {"name": "ssl-rule", "properties": {"description": "allow ssl", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 103, "direction": "inbound"}}, {"name": "web-rule", "properties": {"description": "allow web", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "80", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 104, "direction": "inbound"}}]}}{"apiversion": "2015-06-15", "type": "microsoft.network/networkinterfaces", "name": "[concat(variables('networkinterfacename'), copyindex())]", "comments": "a network interface will be created for each of the kemp loadmasters.", "location": "[parameters('location')]", "copy": {"name": "nicloop", "count": "[variables('numberofinstances')]"}, "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]", "[resourceid('microsoft.network/loadbalancers/", variables('loadbalancername'))]", "[resourceid('microsoft.network/loadbalancers/inboundnatrules", variables('loadbalancername'), concat('vlm-mgmt", copyindex()))]", "[resourceid('microsoft.network/networksecuritygroups/", variables('networksecurityname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('virtualnetworkname'), variables('subnetname'))]"}, "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups/", variables('networksecurityname'))]"}, "loadbalancerbackendaddresspools": [{"id": "[resourceid('microsoft.network/loadbalancers/backendaddresspools",variables('loadbalancername'), "backendpool1')]"}], "loadbalancerinboundnatrules": [{"id": "[resourceid('microsoft.network/loadbalancers/inboundnatrules",variables('loadbalancername'),concat('vlm-mgmt", copyindex()))]"}]}}]}} |
Create a VM from a Windows Image with 4 Empty Data Disks | {"type": "microsoft.compute/virtualmachines", "apiversion": "2021-03-01", "name": "[parameters('hostvirtualmachinename')]", "location": "[parameters('location')]", "properties": {"hardwareprofile": {"vmsize": "[parameters('hostvirtualmachinesize')]"}, "storageprofile": {"imagereference": {"publisher": "microsoftwindowsserver", "offer": "windowsserver", "sku": "2016-datacenter", "version": "latest"}, "osdisk": {"name": "[format('{0}osdisk", parameters('hostvirtualmachinename'))]", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "premium_lrs"}, "caching": "readwrite"}, "datadisks": [{"lun": 0, "name": "[format('{0}datadisk1", parameters('hostvirtualmachinename'))]", "createoption": "empty", "disksizegb": 1024, "caching": "readonly", "manageddisk": {"storageaccounttype": "premium_lrs"}}]}, "osprofile": {"computername": "[parameters('hostvirtualmachinename')]", "adminusername": "[parameters('hostadminusername')]", "adminpassword": "[parameters('hostadminpassword')]"}, "networkprofile": {"networkinterfaces": [{"id": "[reference(resourceid('microsoft.resources/deployments", "createnic1'), "2019-10-01').outputs.nicid.value]", "properties": {"primary": true}}, {"id": "[reference(resourceid('microsoft.resources/deployments", "createnic2'), "2019-10-01').outputs.nicid.value]", "properties": {"primary": false}}]}}, "dependson": ["[resourceid('microsoft.resources/deployments", "createnic1')]", "[resourceid('microsoft.resources/deployments", "createnic2')]"]}{"type": "microsoft.compute/virtualmachines/extensions", "apiversion": "2021-03-01", "name": "[format('{0}/{1}", parameters('hostvirtualmachinename'), "installwindowsfeatures')]", "location": "[parameters('location')]", "properties": {"publisher": "microsoft.powershell", "type": "dsc", "typehandlerversion": "2.77", "autoupgrademinorversion": true, "settings": {"wmfversion": "latest", "configuration": {"url": "[variables('dscinstallwindowsfeaturesuri')]", "script": "dscinstallwindowsfeatures.ps1", "function": "installwindowsfeatures"}}}, "dependson": ["[resourceid('microsoft.compute/virtualmachines", parameters('hostvirtualmachinename'))]"]}{"type": "microsoft.compute/virtualmachines/extensions", "apiversion": "2021-03-01", "name": "[format('{0}/{1}", parameters('hostvirtualmachinename'), "hvhostsetup')]", "location": "[parameters('location')]", "properties": {"publisher": "microsoft.compute", "type": "customscriptextension", "typehandlerversion": "1.9", "autoupgrademinorversion": true, "settings": {"fileuris": ["[variables('hvhostsetupscripturi')]"], "commandtoexecute": "[format('powershell -executionpolicy unrestricted -file hvhostsetup.ps1 -nic1ipaddress {0} -nic2ipaddress {1} -ghostedsubnetprefix {2} -virtualnetworkprefix {3}", reference(resourceid('microsoft.resources/deployments", "createnic1'), "2019-10-01').outputs.assignedip.value, reference(resourceid('microsoft.resources/deployments", "createnic2'), "2019-10-01').outputs.assignedip.value, parameters('ghostedsubnetprefix'), parameters('virtualnetworkaddressprefix'))]"}}, "dependson": ["[resourceid('microsoft.resources/deployments", "createnic1')]", "[resourceid('microsoft.resources/deployments", "createnic2')]", "[resourceid('microsoft.compute/virtualmachines", parameters('hostvirtualmachinename'))]", "[resourceid('microsoft.compute/virtualmachines/extensions", parameters('hostvirtualmachinename'), "installwindowsfeatures')]"]} |
Establish connection to a VNET via an ExpressRoute circuit | {"apiversion": "2020-11-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('boshnetworksecuritygroup')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "ssh", "properties": {"description": "allow ssh", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "22", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 200, "direction": "inbound"}}, {"name": "bosh-agent", "properties": {"description": "allow bosh-agent", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "6868", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 201, "direction": "inbound"}}, {"name": "bosh-director", "properties": {"description": "allow bosh-director", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "25555", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 202, "direction": "inbound"}}, {"name": "dns", "properties": {"description": "allow dns", "protocol": "*", "sourceportrange": "*", "destinationportrange": "53", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 203, "direction": "inbound"}}]}}{"apiversion": "2020-11-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('devboxnetworksecuritygroup')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "ssh", "properties": {"description": "allow ssh", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "22", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 200, "direction": "inbound"}}]}}{"apiversion": "2020-11-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('cfnetworksecuritygroup')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "cf-https", "properties": {"description": "allow cf-https", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 200, "direction": "inbound"}}, {"name": "cf-log", "properties": {"description": "allow cf-log", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "4443", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 201, "direction": "inbound"}}, {"name": "cf-http", "properties": {"description": "allow cf-http", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "80", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 202, "direction": "inbound"}}, {"name": "cf-ssh", "properties": {"description": "allow cf-ssh", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "2222", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 203, "direction": "inbound"}}]}}{"apiversion": "2020-11-01", "type": "microsoft.network/publicipaddresses", "name": "[concat(parameters('vmname'), "-devbox')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic", "dnssettings": {"domainnamelabel": "[concat(tolower(parameters('vmname')), "-", uniquestring(resourcegroup().id))]"}}}{"apiversion": "2020-11-01", "type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('virtualnetworkaddressspace')]"]}, "subnets": [{"name": "[variables('subnetnameforbosh')]", "properties": {"addressprefix": "[variables('subnetaddressrangeforbosh')]"}}, {"name": "[variables('subnetnameforcloudfoundry')]", "properties": {"addressprefix": "[variables('subnetaddressrangeforcloudfoundry')]"}}]}}{"apiversion": "2020-11-01", "type": "microsoft.network/networkinterfaces", "name": "[variables('nicname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/publicipaddresses/", concat(parameters('vmname'), "-devbox'))]", "[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]", "[resourceid('microsoft.network/networksecuritygroups/", variables('devboxnetworksecuritygroup'))]"], "properties": {"networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('devboxnetworksecuritygroup'))]"}, "ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "static", "privateipaddress": "[variables('devboxprivateipaddress')]", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", concat(parameters('vmname'), "-devbox'))]"}, "subnet": {"id": "[variables('subnetrefforbosh')]"}}}]}} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/publicipprefixes", "apiversion": "2021-03-01", "name": "[parameters('publicipprefixname')]", "location": "[parameters('location')]", "sku": {"name": "standard", "tier": "regional"}, "properties": {"prefixlength": "[parameters('publicipprefixlength')]", "publicipaddressversion": "ipv4"}}{"type": "microsoft.network/natgateways", "apiversion": "2020-06-01", "name": "[parameters('natgatewayname')]", "location": "[parameters('location')]", "sku": {"name": "standard"}, "dependson": ["[variables('publicipprefixid')]"], "properties": {"idletimeoutinminutes": 4, "publicipprefixes": [{"id": "[variables('publicipprefixid')]"}]}}{"apiversion": "2020-05-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('bastionpublicipaddressname')]", "location": "[parameters('location')]", "sku": {"name": "standard"}, "properties": {"publicipallocationmethod": "static"}}{"apiversion": "2020-05-01", "type": "microsoft.network/bastionhosts", "name": "[parameters('bastionhostname')]", "location": "[parameters('location')]", "dependson": ["[variables('bastionpublicipaddressid')]", "[variables('virtualnetworkid')]"], "properties": {"ipconfigurations": [{"name": "ipconf", "properties": {"subnet": {"id": "[variables('bastionsubnetid')]"}, "publicipaddress": {"id": "[variables('bastionpublicipaddressid')]"}}}]}, "resources": [{"type": "providers/diagnosticsettings", "apiversion": "2017-05-01-preview", "name": "microsoft.insights/default", "location": "[parameters('location')]", "dependson": ["[variables('bastionhostid')]", "[variables('workspaceid')]"], "properties": {"workspaceid": "[variables('workspaceid')]", "logs": [{"category": "bastionauditlogs", "enabled": true}]}}]}{"apiversion": "2020-04-01", "type": "microsoft.network/networkinterfaces", "name": "[variables('vmnicname')]", "location": "[parameters('location')]", "dependson": ["[variables('virtualnetworkid')]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "subnet": {"id": "[variables('vmsubnetid')]"}}}]}}{"apiversion": "2020-05-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('vmsubnetnsgname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allowsshinbound", "properties": {"priority": 100, "access": "allow", "direction": "inbound", "destinationportrange": "22", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}, "resources": [{"type": "providers/diagnosticsettings", "apiversion": "2017-05-01-preview", "name": "microsoft.insights/default", "location": "[parameters('location')]", "dependson": ["[variables('vmsubnetnsgid')]", "[variables('workspaceid')]"], "properties": {"workspaceid": "[variables('workspaceid')]", "logs": [{"category": "networksecuritygroupevent", "enabled": true, "retentionpolicy": {"enabled": false, "days": 0}}, {"category": "networksecuritygrouprulecounter", "enabled": true, "retentionpolicy": {"enabled": false, "days": 0}}]}}]}{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-05-01", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[variables('vmsubnetnsgid')]", "[variables('publicipprefixid')]", "[variables('natgatewayid')]"], "properties": {"addressspace": {"addressprefixes": ["[parameters('virtualnetworkaddressprefixes')]"]}, "subnets": [{"name": "[parameters('akssubnetname')]", "properties": {"addressprefix": "[parameters('akssubnetaddressprefix')]", "privateendpointnetworkpolicies": "disabled", "privatelinkservicenetworkpolicies": "enabled", "natgateway": {"id": "[variables('natgatewayid')]"}}}, {"name": "[parameters('podsubnetname')]", "properties": {"addressprefix": "[parameters('podsubnetaddressprefix')]", "privateendpointnetworkpolicies": "disabled", "privatelinkservicenetworkpolicies": "enabled", "natgateway": {"id": "[variables('natgatewayid')]"}}}, {"name": "[parameters('vmsubnetname')]", "properties": {"addressprefix": "[parameters('vmsubnetaddressprefix')]", "networksecuritygroup": {"id": "[variables('vmsubnetnsgid')]"}, "privateendpointnetworkpolicies": "disabled", "privatelinkservicenetworkpolicies": "enabled", "natgateway": {"id": "[variables('natgatewayid')]"}}}, {"name": "[parameters('applicationgatewaysubnetname')]", "properties": {"addressprefix": "[parameters('applicationgatewaysubnetaddressprefix')]", "privateendpointnetworkpolicies": "disabled", "privatelinkservicenetworkpolicies": "enabled"}}, {"name": "[variables('bastionsubnetname')]", "properties": {"addressprefix": "[parameters('bastionsubnetaddressprefix')]"}}], "enableddosprotection": false, "enablevmprotection": false}}{"type": "microsoft.network/privatednszones", "apiversion": "2020-06-01", "name": "[variables('blobprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones", "apiversion": "2020-06-01", "name": "[variables('keyvaultprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"condition": "[equals(parameters('acrsku'), "premium')]", "type": "microsoft.network/privatednszones", "apiversion": "2020-06-01", "name": "[variables('acrprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2020-06-01", "name": "[concat(variables('blobprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('blobprivatednszoneid')]", "[variables('virtualnetworkid')]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[variables('virtualnetworkid')]"}}}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2018-09-01", "name": "[concat(variables('keyvaultprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('keyvaultprivatednszoneid')]", "[variables('virtualnetworkid')]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[variables('virtualnetworkid')]"}}} |
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01. | {"type": "microsoft.compute/availabilitysets", "name": "[variables('avsetnamedb')]", "apiversion": "2020-12-01", "location": "[parameters('location')]", "sku": {"name": "aligned"}, "properties": {"platformfaultdomaincount": 2, "platformupdatedomaincount": 20}}{"type": "microsoft.compute/virtualmachines", "name": "[concat(variables('vmnamedb'), "-", copyindex())]", "copy": {"name": "dbvmloop", "count": "[variables('dbvmcount')]"}, "dependson": ["dbnicloop", "[resourceid('microsoft.compute/availabilitysets/", variables('avsetnamedb'))]"], "apiversion": "2020-12-01", "location": "[parameters('location')]", "properties": {"availabilityset": {"id": "[resourceid('microsoft.compute/availabilitysets", variables('avsetnamedb'))]"}, "hardwareprofile": {"vmsize": "[variables('sizes')[parameters('sapsystemsize')][parameters('dbtype')].vmsize]"}, "osprofile": {"computername": "[concat(variables('vmnamedb'), "-", copyindex())]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[variables('images')[parameters('ostype')].publisher]", "offer": "[variables('images')[parameters('ostype')].offer]", "sku": "[variables('images')[parameters('ostype')].sku]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmnamedb'), "-", copyindex(), "-osdisk')]", "caching": "readwrite", "createoption": "fromimage", "disksizegb": "[variables('images')[parameters('ostype')].osdisksize]", "manageddisk": {"storageaccounttype": "premium_lrs"}}, "datadisks": "[variables('sizes')[parameters('sapsystemsize')][parameters('dbtype')].disks]"}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", concat(variables('nicnamedb'), "-", copyindex()))]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(variables('vmnamedb'), "-", copyindex(), "/", variables('cseextname'))]", "apiversion": "2020-12-01", "copy": {"name": "dbcseloop", "count": "[variables('dbvmcount')]"}, "location": "[parameters('location')]", "dependson": ["dbvmloop"], "properties": {"publisher": "[variables('cseextpublisher')]", "type": "[variables('cseextname')]", "typehandlerversion": "[variables('cseextversion')]", "autoupgrademinorversion": true, "settings": {"fileuris": ["[variables('csextensionscript')]"], "commandtoexecute": "[concat(variables('csextensionscriptcall'), " ", variables('sizes')[parameters('sapsystemsize')][parameters('dbtype')].scriptarguments[variables('internalostype')])]"}}} |
Deploy an Azure SQL Server with Auditing enabled to write audit logs to a blob storage | {"apiversion": "2020-11-01-preview", "type": "microsoft.sql/servers", "location": "[variables('location')]", "name": "[variables('sqlservername')]", "properties": {"administratorlogin": "[parameters('sqlserveradministratorlogin')]", "administratorloginpassword": "[parameters('sqlserveradministratorloginpassword')]", "version": "12.0"}, "resources": [{"apiversion": "2020-11-01-preview", "type": "databases", "location": "[variables('location')]", "name": "catalog", "dependson": ["[resourceid('microsoft.sql/servers/", variables('sqlservername'))]"], "properties": {"collation": "sql_latin1_general_cp1_ci_as", "edition": "basic", "zoneredundant": false}}, {"apiversion": "2020-11-01-preview", "type": "databases", "location": "[variables('location')]", "name": "sales", "dependson": ["[resourceid('microsoft.sql/servers/", variables('sqlservername'))]"], "properties": {"collation": "sql_latin1_general_cp1_ci_as", "edition": "basic", "zoneredundant": false}}, {"apiversion": "2020-11-01-preview", "type": "databases", "location": "[variables('location')]", "name": "identity", "dependson": ["[resourceid('microsoft.sql/servers/", variables('sqlservername'))]"], "properties": {"collation": "sql_latin1_general_cp1_ci_as", "edition": "basic", "zoneredundant": false}}, {"apiversion": "2020-11-01-preview", "type": "virtualnetworkrules", "name": "[concat('allow-access-from-", variables('asesubnetname'))]", "dependson": ["[resourceid('microsoft.sql/servers/", variables('sqlservername'))]"], "properties": {"virtualnetworksubnetid": "[resourceid('microsoft.network/virtualnetworks/subnets/", variables('vnetname'), variables('asesubnetname'))]"}}]} |
Create a VM from a Windows Image with 4 Empty Data Disks | {"type": "microsoft.compute/availabilitysets", "name": "[variables('availabilitysetmasters')]", "apiversion": "2017-12-01", "location": "[parameters('location')]", "sku": {"name": "aligned"}, "properties": {"platformfaultdomaincount": 2, "platformupdatedomaincount": 5}}{"type": "microsoft.compute/availabilitysets", "name": "[variables('availabilitysetnodes')]", "apiversion": "2017-12-01", "location": "[parameters('location')]", "sku": {"name": "aligned"}, "properties": {"platformfaultdomaincount": 2, "platformupdatedomaincount": 5}}{"apiversion": "2017-03-30", "type": "microsoft.compute/virtualmachines", "name": "[concat(variables('vmnamemaster'), copyindex())]", "location": "[parameters('location')]", "copy": {"name": "vmloopmaster", "count": "[variables('mastercount')]"}, "dependson": ["[resourceid('microsoft.storage/storageaccounts/", variables('newstorageaccountname'))]", "[resourceid('microsoft.network/networkinterfaces/", concat(variables('vmnamemaster'), copyindex(), "-nic'))]", "[resourceid('microsoft.compute/availabilitysets/", variables('availabilitysetmasters'))]"], "properties": {"availabilityset": {"id": "[resourceid('microsoft.compute/availabilitysets",variables('availabilitysetmasters'))]"}, "hardwareprofile": {"vmsize": "[parameters('vmsizemaster')]"}, "osprofile": {"computername": "[concat(variables('vmnamemaster'), copyindex())]", "adminusername": "[parameters('adminusername')]", "linuxconfiguration": {"disablepasswordauthentication": true, "ssh": {"publickeys": [{"path": "[variables('sshkeypath')]", "keydata": "[parameters('sshpublickey')]"}]}}}, "storageprofile": {"imagereference": {"publisher": "[variables('osimagepublisher')]", "offer": "[variables('osimageoffer')]", "sku": "[variables('osimagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmnamemaster'), copyindex(),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",concat(variables('vmnamemaster'), copyindex(), "-nic'))]"}]}}}{"apiversion": "2017-03-30", "type": "microsoft.compute/virtualmachines", "name": "[concat(variables('vmnamenode'), copyindex())]", "location": "[parameters('location')]", "copy": {"name": "vmloopnode", "count": "[parameters('nodecount')]"}, "dependson": ["[resourceid('microsoft.storage/storageaccounts/", variables('newstorageaccountname'))]", "[resourceid('microsoft.network/networkinterfaces/", concat(variables('vmnamenode'), copyindex(), "-nic'))]"], "properties": {"availabilityset": {"id": "[resourceid('microsoft.compute/availabilitysets",variables('availabilitysetnodes'))]"}, "hardwareprofile": {"vmsize": "[parameters('vmsizenode')]"}, "osprofile": {"computername": "[concat(variables('vmnamenode'), copyindex())]", "adminusername": "[parameters('adminusername')]", "linuxconfiguration": {"disablepasswordauthentication": true, "ssh": {"publickeys": [{"path": "[variables('sshkeypath')]", "keydata": "[parameters('sshpublickey')]"}]}}}, "storageprofile": {"imagereference": {"publisher": "[variables('osimagepublisher')]", "offer": "[variables('osimageoffer')]", "sku": "[variables('osimagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmnamenode'), copyindex(),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",concat(variables('vmnamenode'), copyindex(), "-nic'))]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(variables('vmnamemaster'), copyindex(), "/dockerextension')]", "apiversion": "2015-06-15", "location": "[parameters('location')]", "copy": {"name": "extensionloopmaster", "count": "[variables('mastercount')]"}, "dependson": ["[resourceid('microsoft.compute/virtualmachines/", concat(variables('vmnamemaster'), copyindex()))]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "dockerextension", "typehandlerversion": "1.0", "autoupgrademinorversion": true, "settings": {"compose": {"consul": {"image": "progrium/consul", "command": "[concat('-server -node master", copyindex(), " ", variables('consulserverargs')[copyindex()])]", "ports": ["8500:8500", "8300:8300", "8301:8301", "8301:8301/udp", "8302:8302", "8302:8302/udp", "8400:8400"], "volumes": ["/data/consul:/data"], "restart": "always"}, "swarm": {"image": "swarm", "command": "[concat('manage --replication --advertise ", reference(resourceid('microsoft.network/networkinterfaces",concat(variables('vmnamemaster'), copyindex(), "-nic'))).ipconfigurations[0].properties.privateipaddress, ":2375 --discovery-opt kv.path=docker/nodes consul://10.0.0.4:8500')]", "ports": ["2375:2375"], "links": ["consul"], "volumes": ["/etc/docker:/etc/docker"], "restart": "always"}}}}}{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(variables('vmnamenode'), copyindex(), "/dockerextension')]", "apiversion": "2015-06-15", "location": "[parameters('location')]", "copy": {"name": "extensionloopnode", "count": "[parameters('nodecount')]"}, "dependson": ["[resourceid('microsoft.compute/virtualmachines/", concat(variables('vmnamenode'), copyindex()))]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "dockerextension", "typehandlerversion": "1.0", "autoupgrademinorversion": true, "settings": {"docker": {"port": "2375", "options": ["--cluster-store=consul://10.0.0.4:8500", "--cluster-advertise=eth0:2375"]}}}} |
Establish connection to a VNET via an ExpressRoute circuit | {"apiversion": "2020-05-01", "type": "microsoft.network/networksecuritygroups", "location": "[parameters('location')]", "name": "[parameters('nsgname')]"}{"type": "microsoft.network/publicipaddresses", "apiversion": "2020-06-01", "name": "[parameters('natgatewaypublicipname')]", "location": "[parameters('location')]", "sku": {"name": "standard"}, "properties": {"publicipaddressversion": "ipv4", "publicipallocationmethod": "static", "idletimeoutinminutes": 4}}{"type": "microsoft.network/natgateways", "apiversion": "2020-06-01", "name": "[parameters('natgatewayname')]", "location": "[parameters('location')]", "sku": {"name": "standard"}, "dependson": ["[resourceid('microsoft.network/publicipaddresses", parameters('natgatewaypublicipname'))]"], "properties": {"idletimeoutinminutes": 4, "publicipaddresses": [{"id": "[resourceid('microsoft.network/publicipaddresses", parameters('natgatewaypublicipname'))]"}]}}{"apiversion": "2020-05-01", "type": "microsoft.network/virtualnetworks", "location": "[parameters('location')]", "name": "[parameters('vnetname')]", "dependson": ["[resourceid('microsoft.network/natgateways", parameters('natgatewayname'))]", "[resourceid('microsoft.network/networksecuritygroups/", parameters('nsgname'))]"], "properties": {"addressspace": {"addressprefixes": ["[parameters('vnetcidr')]"]}, "subnets": [{"name": "[parameters('publicsubnetname')]", "properties": {"addressprefix": "[parameters('publicsubnetcidr')]", "networksecuritygroup": {"id": "[variables('nsgid')]"}, "natgateway": {"id": "[resourceid('microsoft.network/natgateways", parameters('natgatewayname'))]"}, "delegations": [{"name": "databricks-del-public", "properties": {"servicename": "microsoft.databricks/workspaces"}}]}}, {"name": "[parameters('privatesubnetname')]", "properties": {"addressprefix": "[parameters('privatesubnetcidr')]", "networksecuritygroup": {"id": "[variables('nsgid')]"}, "natgateway": {"id": "[resourceid('microsoft.network/natgateways", parameters('natgatewayname'))]"}, "delegations": [{"name": "databricks-del-private", "properties": {"servicename": "microsoft.databricks/workspaces"}}]}}]}} |
This sample contains a script to easily migrate template gallery templates to templateSpec resources. | {"name": "rancherdeploy", "type": "microsoft.resources/deployments", "apiversion": "2019-09-01", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('templatedeployurl')]", "contentversion": "1.0.0.0"}, "parameters": {"adminusername": {"value": "[parameters('adminusername')]"}, "adminpassword": {"value": "[parameters('adminpassword')]"}, "ranchername": {"value": "[parameters('uniquedeployprefix')]"}, "ranchervmsize": {"value": "[parameters('vmsize')]"}, "location": {"value": "[parameters('location')]"}}}} |
This sample contains a script to easily migrate template gallery templates to templateSpec resources. | {"apiversion": "2020-08-01", "name": "deploy-xss-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-08-01", "name": "[concat(variables('vnetname'),"-resource')]", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('vnettemplateuri')]"}, "parameters": {"vnetname": {"value": "[variables('vnetname')]"}, "addressprefix": {"value": "[variables('vnetaddressspace')]"}, "subnets": {"value": "[variables('subnets')]"}, "location": {"value": "[parameters('location')]"}, "tags": {"value": "[variables('tags')]"}}}}{"apiversion": "2020-08-01", "name": "[concat(variables('applicationgateways')[copyindex()].name,"-pip","-resource')]", "type": "microsoft.resources/deployments", "copy": {"name": "copy-appgateway-pip", "count": 2}, "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('piptemplateuri')]"}, "parameters": {"publicipaddressname": {"value": "[concat(variables('applicationgateways')[copyindex()].name,"-pip')]"}, "publicipaddresstype": {"value": "[parameters('pipaddresstype')]"}, "dnsnameforpublicip": {"value": "[concat(variables('applicationgateways')[copyindex()].name,"-",uniquestring(resourcegroup().id, "pip'), "-pip')]"}, "location": {"value": "[parameters('location')]"}, "tags": {"value": "[variables('tags')]"}}}} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["172.20.0.0/16"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "172.20.0.0/24", "privateendpointnetworkpolicies": "disabled"}}]}} |
Create a VM from a Windows Image with 4 Empty Data Disks | {"apiversion": "2020-12-01", "type": "microsoft.compute/virtualmachines", "name": "[concat(variables('vmname'), "-boss')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces/", concat(variables('nicname'), "-boss'))]", "[resourceid('microsoft.storage/storageaccounts/", variables('storageaccountname'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('bossnodesize')]"}, "osprofile": {"computername": "[concat('jmeter-boss')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": "[variables('settings').imagereference]", "osdisk": {"name": "[concat(variables('vmname'),"-boss","_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",concat(variables('nicname'), "-boss'))]"}]}}, "resources": [{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(variables('vmname'), "-boss", "/installjmeter')]", "apiversion": "2020-12-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", concat(variables('vmname'), "-boss'))]"], "properties": {"publisher": "[variables('settings').extensionsettings.boss.publisher]", "type": "[variables('settings').extensionsettings.boss.type]", "typehandlerversion": "[variables('settings').extensionsettings.boss.typehandlerversion]", "settings": {"fileuris": "[variables('settings').extensionsettings.boss.settings.fileuris]", "commandtoexecute": "[concat(variables('settings').extensionsettings.boss.settings.commandtoexecute)]"}}}]} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/networksecuritygroups", "name": "[concat(variables('nsgname'))]", "apiversion": "2020-07-01", "location": "[parameters('location')]", "condition": "[equals(length(parameters('subnetid')), 0)]", "properties": {"securityrules": "[variables('selectedsecurityrules')]"}}{"type": "microsoft.network/virtualnetworks", "name": "[variables('vnetname')]", "apiversion": "2018-04-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups/", variables('nsgname'))]"], "condition": "[equals(length(parameters('subnetid')), 0)]", "properties": {"addressspace": {"addressprefixes": ["10.0.0.0/16"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "10.0.0.0/24", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('nsgname'))]"}}}]}}{"type": "microsoft.network/networkinterfaces", "name": "[variables('nicname')]", "apiversion": "2017-06-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('vnetname'))]"], "properties": {"ipconfigurations": "[variables('selectedipconfig')]"}} |
which shows how we can correlate messages over Logic Apps using Azure Service Bus | {"type": "microsoft.logic/workflows", "apiversion": "2019-05-01", "name": "[parameters('logicappname')]", "location": "[parameters('location')]", "properties": {"state": "enabled", "definition": {"$schema": "https://schema.management.azure.com/providers/microsoft.logic/schemas/2016-06-01/workflowdefinition.json#", "actions": {"switch": {"cases": {"createresource": {"actions": {"createcustomresource": {"inputs": {"body": {"properties": "@addproperty(triggerbody().body["properties"], "mydynamicproperty", "mydynamicvalue')"}, "statuscode": 200}, "kind": "http", "type": "response"}}, "case": "create"}}, "default": {"actions": {"defaulthttpresponse": {"inputs": {"statuscode": 200}, "kind": "http", "type": "response"}}}, "expression": "@triggerbody().operationtype", "type": "switch"}}, "contentversion": "1.0.0.0", "outputs": {}, "parameters": {}, "triggers": {"customproviderwebhook": {"inputs": {"schema": {"required": ["operationtype", "resourcetype", "resourceid", "resourcename", "body"], "properties": {"operationtype": {"$id": "#/properties/operationtype", "type": "string", "enum": ["create", "delete", "get", "list", "trigger"]}, "resourcetype": {"$id": "#/properties/resourcetype", "type": "string"}, "resourceid": {"$id": "#/properties/resourceid", "type": "string"}, "resourcename": {"$id": "#/properties/resourcename", "type": "string"}, "body": {"$id": "#/properties/body", "type": "object"}}}}, "kind": "http", "type": "request"}}}}} |
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}}{"type": "microsoft.compute/availabilitysets", "name": "[concat(variables('availabilitysetname'),"db')]", "apiversion": "2017-12-01", "location": "[parameters('location')]", "sku": {"name": "aligned"}, "properties": {"platformfaultdomaincount": 2, "platformupdatedomaincount": 5}}{"apiversion": "2017-03-30", "type": "microsoft.compute/virtualmachines", "name": "[concat(variables('vmname'), copyindex())]", "copy": {"name": "virtualmachineloop", "count": "[parameters('numberofinstances')]"}, "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts",variables('newstorageaccountname'))]", "[resourceid('microsoft.network/networkinterfaces/",concat(variables('vmname'),copyindex()))]", "[resourceid('microsoft.compute/availabilitysets/", variables('availabilitysetname'))]"], "properties": {"availabilityset": {"id": "[resourceid('microsoft.compute/availabilitysets", variables('availabilitysetname'))]"}, "hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[concat(variables('vmname'), 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": "[variables('ubuntuosversion')]", "version": "latest"}, "osdisk": {"createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",concat(variables('vmname'),copyindex()))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('newstorageaccountname'), "2021-01-01').primaryendpoints["blob"]]"}}}}{"apiversion": "2017-03-30", "type": "microsoft.compute/virtualmachines", "name": "[concat(variables('vmname'),"db')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts",variables('newstorageaccountname'))]", "[resourceid('microsoft.network/networkinterfaces/",variables('nicsql'))]", "[resourceid('microsoft.compute/availabilitysets", concat(variables('availabilitysetname'),"db'))]"], "properties": {"availabilityset": {"id": "[resourceid('microsoft.compute/availabilitysets", concat(variables('availabilitysetname'),"db'))]"}, "hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[concat(variables('vmname'),"db')]", "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": {"createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicsql'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('newstorageaccountname'), "2021-01-01').primaryendpoints["blob"]]"}}}} |
Create a VM from a Windows Image with 4 Empty Data Disks | {"name": "[variables('virtualmachinename')]", "type": "microsoft.compute/virtualmachines", "apiversion": "2019-12-01", "location": "[parameters('location')]", "dependson": ["[variables('networkinterfacename')]"], "properties": {"osprofile": {"computername": "[variables('virtualmachinename')]", "adminusername": "[parameters('administratorlogin')]", "adminpassword": "[parameters('administratorloginpassword')]", "windowsconfiguration": {"provisionvmagent": "true"}}, "hardwareprofile": {"vmsize": "[parameters('virtualmachinesize')]"}, "storageprofile": {"imagereference": {"publisher": "microsoftwindowsserver", "offer": "windowsserver", "sku": "2016-datacenter", "version": "latest"}, "osdisk": {"createoption": "fromimage", "manageddisk": {"storageaccounttype": "standardssd_lrs"}}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('networkinterfacename'))]"}]}}, "resources": [{"name": "setupssms", "type": "extensions", "location": "[parameters('location')]", "apiversion": "2019-12-01", "dependson": ["[variables('virtualmachinename')]"], "tags": {"displayname": "setupssms"}, "properties": {"publisher": "microsoft.compute", "type": "customscriptextension", "typehandlerversion": "1.9", "autoupgrademinorversion": true, "settings": {"fileuris": ["[variables('scriptfileuri')]"], "commandtoexecute": "powershell -executionpolicy unrestricted -file installssms.ps1"}}}]} |
This sample contains a script to easily migrate template gallery templates to templateSpec resources. | {"apiversion": "2020-10-01", "name": "backup_jobs_non_log", "type": "microsoft.resources/deployments", "resourcegroup": "[resourcegroup().name]", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('nestedtemplates').backup_jobs_non_log]", "contentversion": "1.0.0.0"}, "parameters": {"workspacename": {"value": "[parameters('workspacename')]"}}}} |
Create a sandbox setup of Azure Firewall with Linux jumpbox and Linux server | {"type": "microsoft.network/routetables", "name": "[variables('azfwroutetablename')]", "apiversion": "2020-05-01", "location": "[parameters('location')]", "properties": {"disablebgproutepropagation": false, "routes": [{"name": "azfwdefaultroute", "properties": {"addressprefix": "0.0.0.0/0", "nexthoptype": "virtualappliance", "nexthopipaddress": "[variables('nexthopip')]"}}]}}{"comments": "simple network security group for subnet [variables('serverssubnetname')]", "type": "microsoft.network/networksecuritygroups", "apiversion": "2020-05-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {}}{"name": "[parameters('virtualnetworkname')]", "apiversion": "2020-05-01", "type": "microsoft.network/virtualnetworks", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/routetables", variables('azfwroutetablename'))]", "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"], "tags": {"displayname": "[parameters('virtualnetworkname')]"}, "properties": {"addressspace": {"addressprefixes": ["[variables('vnetaddressprefix')]"]}, "subnets": [{"name": "[variables('jumpboxsubnetname')]", "properties": {"addressprefix": "[variables('jumpboxsubnetprefix')]"}}, {"name": "[variables('azurefirewallsubnetname')]", "properties": {"addressprefix": "[variables('azurefirewallsubnetprefix')]"}}, {"name": "[variables('serverssubnetname')]", "properties": {"addressprefix": "[variables('serverssubnetprefix')]", "routetable": {"id": "[resourceid('microsoft.network/routetables", variables('azfwroutetablename'))]"}, "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}}}]}}{"name": "[concat(variables('publicipnameprefix'), add(copyindex(), 1))]", "type": "microsoft.network/publicipaddresses", "apiversion": "2020-05-01", "location": "[parameters('location')]", "sku": {"name": "standard"}, "copy": {"name": "publicipcopy", "count": "[parameters('numberoffirewallpublicipaddresses')]"}, "properties": {"publicipallocationmethod": "static", "publicipaddressversion": "ipv4"}}{"name": "[variables('jumpboxpublicipaddressname')]", "type": "microsoft.network/publicipaddresses", "apiversion": "2020-05-01", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic"}}{"name": "[variables('jumpboxnsgname')]", "type": "microsoft.network/networksecuritygroups", "apiversion": "2020-05-01", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "mynetworksecuritygrouprulessh", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "22", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 1000, "direction": "inbound"}}]}}{"apiversion": "2020-05-01", "type": "microsoft.network/networkinterfaces", "name": "[variables('jumpboxnicname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/publicipaddresses", variables('jumpboxpublicipaddressname'))]", "[resourceid('microsoft.network/virtualnetworks", parameters('virtualnetworkname'))]", "[resourceid('microsoft.network/networksecuritygroups", variables('jumpboxnsgname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", variables('jumpboxpublicipaddressname'))]"}, "subnet": {"id": "[variables('jumpboxsubnetid')]"}}}], "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('jumpboxnsgname'))]"}}}{"apiversion": "2020-05-01", "type": "microsoft.network/networkinterfaces", "name": "[variables('servernicname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks", parameters('virtualnetworkname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "subnet": {"id": "[variables('serversubnetid')]"}}}]}}{"apiversion": "2020-04-01", "type": "microsoft.network/firewallpolicies", "name": "[variables('firewallpolicyname')]", "location": "[parameters('location')]", "properties": {"threatintelmode": "alert"}, "resources": [{"apiversion": "2020-04-01", "type": "rulegroups", "name": "networkrg", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/firewallpolicies", variables('firewallpolicyname'))]", "[resourceid('microsoft.network/firewallpolicies/rulegroups", variables('firewallpolicyname'), "apprg')]"], "properties": {"priority": 100, "rules": [{"name": "networkrule1", "conditiontype": "network", "ruletype": "firewallpolicyfilterrule", "action": {"type": "allow"}, "priority": 230, "ruleconditions": [{"name": "netrc1", "ipprotocols": ["tcp"], "destinationports": ["80"], "sourceaddresses": ["*"], "destinationaddresses": ["*"], "ruleconditiontype": "networkrulecondition"}]}]}}, {"apiversion": "2020-04-01", "type": "rulegroups", "name": "apprg", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/firewallpolicies", variables('firewallpolicyname'))]"], "properties": {"priority": 200, "rules": [{"name": "apprule1", "priority": 4444, "ruletype": "firewallpolicyfilterrule", "action": {"type": "allow"}, "ruleconditions": [{"ruleconditiontype": "applicationrulecondition", "name": "apprc1", "protocols": [{"protocoltype": "http", "port": 8000}], "targetfqdns": ["*"], "sourceaddresses": ["*"]}]}]}}]}{"apiversion": "2020-04-01", "type": "microsoft.network/azurefirewalls", "name": "[variables('firewallname')]", "location": "[parameters('location')]", "zones": "[if(equals(length(parameters('availabilityzones')), 0), json('null'), parameters('availabilityzones'))]", "dependson": ["[resourceid('microsoft.network/virtualnetworks", parameters('virtualnetworkname'))]", "[resourceid('microsoft.network/firewallpolicies", variables('firewallpolicyname'))]", "[resourceid('microsoft.network/firewallpolicies/rulegroups", variables('firewallpolicyname'), "apprg')]", "[resourceid('microsoft.network/firewallpolicies/rulegroups", variables('firewallpolicyname'), "networkrg')]", "publicipcopy"], "properties": {"ipconfigurations": "[variables('azurefirewallipconfigurations')]", "firewallpolicy": {"id": "[resourceid('microsoft.network/firewallpolicies", variables('firewallpolicyname'))]"}}} |
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('appinsightname')]", "location": "[parameters('location')]", "kind": "string", "tags": {"displayname": "appinsight", "projectname": "[parameters('appname')]"}, "properties": {"application_type": "web", "workspaceresourceid": "[resourceid('microsoft.operationalinsights/workspaces", variables('loganalyticsname'))]"}, "dependson": ["[resourceid('microsoft.operationalinsights/workspaces", variables('loganalyticsname'))]"]} |
Establish connection to a VNET via an ExpressRoute circuit | {"apiversion": "2020-07-01", "type": "microsoft.network/publicipaddresses", "name": "[concat(variables('publicipname'), copyindex())]", "copy": {"name": "publiciploop", "count": "[variables('numberofinstances')]"}, "location": "[parameters('location')]", "sku": {"name": "standard"}, "properties": {"publicipallocationmethod": "static"}}{"apiversion": "2020-07-01", "type": "microsoft.network/publicipaddresses", "name": "lbpublicip", "location": "[parameters('location')]", "sku": {"name": "standard"}, "properties": {"publicipallocationmethod": "static"}}{"apiversion": "2020-07-01", "type": "microsoft.network/publicipaddresses", "name": "lbpublicip-v6", "location": "[parameters('location')]", "sku": {"name": "standard"}, "properties": {"publicipallocationmethod": "static", "publicipaddressversion": "ipv6"}}{"apiversion": "2020-07-01", "name": "loadbalancer", "type": "microsoft.network/loadbalancers", "location": "[parameters('location')]", "sku": {"name": "standard"}, "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, "probe": {"id": "[resourceid('microsoft.network/loadbalancers/probes", "loadbalancer", "ipv4ipv6probe')]"}}, "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, "probe": {"id": "[resourceid('microsoft.network/loadbalancers/probes", "loadbalancer", "ipv4ipv6probe')]"}}, "name": "lbrule-v6"}], "probes": [{"name": "ipv4ipv6probe", "properties": {"protocol": "tcp", "port": 80, "intervalinseconds": 5, "numberofprobes": 2}}]}}{"apiversion": "2020-07-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')]"]}}]}} |
This template deploys a VM Scale Set into an exsisting vnet. | {"type": "microsoft.compute/virtualmachinescalesets", "name": "[parameters('vmssname')]", "location": "[parameters('location')]", "apiversion": "2019-12-01", "dependson": ["[resourceid('microsoft.network/loadbalancers", variables('loadbalancername'))]"], "sku": {"name": "[parameters('vmsku')]", "capacity": "[parameters('instancecount')]"}, "properties": {"overprovision": true, "upgradepolicy": {"mode": "manual"}, "virtualmachineprofile": {"storageprofile": {"osdisk": {"createoption": "fromimage", "caching": "readwrite"}, "imagereference": {"publisher": "canonical", "offer": "ubuntuserver", "sku": "16.04-lts", "version": "latest"}}, "osprofile": {"computernameprefix": "[parameters('vmssname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "networkprofile": {"networkinterfaceconfigurations": [{"name": "nic", "properties": {"primary": true, "ipconfigurations": [{"name": "ipconfig", "properties": {"subnet": {"id": "[resourceid(parameters('existingvnetresourcegroupname'), "microsoft.network/virtualnetworks/subnets", parameters('existingvnetname'), parameters('existingsubnetname'))]"}, "loadbalancerbackendaddresspools": [{"id": "[resourceid('microsoft.network/loadbalancers/backendaddresspools", variables('loadbalancername'), variables('loadbalancerbackendname'))]"}], "loadbalancerinboundnatpools": [{"id": "[resourceid('microsoft.network/loadbalancers/inboundnatpools", variables('loadbalancername'), variables('loadbalancernatpoolname'))]"}]}}]}}]}}}} |
This template creates an Azure Traffic Manager profile using external endpoints. | {"type": "microsoft.network/trafficmanagerprofiles", "apiversion": "2018-08-01", "name": "externalendpointexample", "location": "global", "properties": {"profilestatus": "enabled", "trafficroutingmethod": "performance", "dnsconfig": {"relativename": "[parameters('uniquednsname')]", "ttl": 30}, "monitorconfig": {"protocol": "https", "port": 443, "path": "/", "expectedstatuscoderanges": [{"min": 200, "max": 202}, {"min": 301, "max": 302}]}, "endpoints": [{"type": "microsoft.network/trafficmanagerprofiles/externalendpoints", "name": "endpoint1", "properties": {"target": "www.microsoft.com", "endpointstatus": "enabled", "endpointlocation": "northeurope"}}, {"type": "microsoft.network/trafficmanagerprofiles/externalendpoints", "name": "endpoint2", "properties": {"target": "docs.microsoft.com", "endpointstatus": "enabled", "endpointlocation": "southcentralus"}}]}} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/publicipaddresses", "apiversion": "2020-06-01", "name": "[parameters('publicipname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('publicipsku')]"}, "properties": {"publicipallocationmethod": "[parameters('publicipallocationmethod')]", "dnssettings": {"domainnamelabel": "[parameters('dnslabelprefix')]"}}}{"type": "microsoft.network/networksecuritygroups", "apiversion": "2020-06-01", "name": "[parameters('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "default-allow-3389", "properties": {"priority": 1000, "access": "allow", "direction": "inbound", "destinationportrange": "3389", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*"}}]}}{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups", parameters('networksecuritygroupname'))]"], "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "[variables('subnetprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", parameters('networksecuritygroupname'))]"}}}]}} |
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", variables('nicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[parameters('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[parameters('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('vmname'), "_osdisk')]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "[parameters('disktype')]"}}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('nicname'))]"}]}}} |
Storage Account with Storage Service Encryption and a blob deletion retention policy | {"type": "microsoft.storage/storageaccounts", "name": "[variables('jumpboxsaname')]", "location": "[parameters('location')]", "apiversion": "2019-06-01", "sku": {"name": "[variables('storageaccounttype')]"}, "kind": "storagev2", "properties": {}} |
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()))]"}]}}} |
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01. | {"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[variables('servicebusnamespaceprivateendpointid')]", "[variables('blobstorageaccountprivateendpointid')]", "[variables('nicid')]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[parameters('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[parameters('imagepublisher')]", "offer": "[parameters('imageoffer')]", "sku": "[parameters('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage", "disksizegb": "[parameters('osdisksize')]", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}, "copy": [{"name": "datadisks", "count": "[parameters('numdatadisks')]", "input": {"caching": "[parameters('datadiskcaching')]", "disksizegb": "[parameters('datadisksize')]", "lun": "[copyindex('datadisks')]", "name": "[concat(parameters('vmname'),"-datadisk",copyindex('datadisks'))]", "createoption": "empty", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('blobstorageaccountid')).primaryendpoints["blob"]]"}}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'), "/", variables('customscriptextensionname'))]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"skipdos2unix": false, "timestamp": 123456789, "fileuris": ["[variables('scriptfileuri')]"]}, "protectedsettings": {"commandtoexecute": "[concat('bash ", parameters('scriptfilename'), " ", variables('servicebusnamespaceendpoint'), " ", variables('blobserviceprimaryendpoint'))]"}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'),"/", variables('omsagentforlinuxname'))]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]", "[variables('workspaceid')]", "[variables('customscriptid')]"], "properties": {"publisher": "microsoft.enterprisecloud.monitoring", "type": "omsagentforlinux", "typehandlerversion": "1.12", "settings": {"workspaceid": "[reference(variables('workspaceid'), "2020-03-01-preview').customerid]", "stoponmultipleconnections": false}, "protectedsettings": {"workspacekey": "[listkeys(variables('workspaceid'),"2020-03-01-preview').primarysharedkey]"}}} |
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01. | {"apiversion": "2017-03-30", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('primarylocation')]", "dependson": ["[concat('microsoft.network/networkinterfaces/",variables('primarynicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[variables('vmsize')]"}, "osprofile": {"computername": "[parameters('vmname')]", "adminusername": "[parameters('adminusername')]", "linuxconfiguration": {"disablepasswordauthentication": true, "ssh": {"publickeys": [{"path": "[variables('sshkeypath')]", "keydata": "[parameters('sshkeydata')]"}]}}}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[variables('ubuntuosversion')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('primarynicname'))]"}]}}} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "[variables('subnetprefix')]"}}]}} |
Storage Account with Storage Service Encryption and a blob deletion retention policy | {"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'))]"]} |
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": "[variables('hostingplanname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('appserviceplantier')]", "capacity": "[parameters('appserviceplaninstances')]"}}{"type": "microsoft.web/sites", "apiversion": "2020-06-01", "name": "[variables('websitename')]", "location": "[parameters('location')]", "properties": {"serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]", "siteconfig": {"appsettings": [{"name": "cosmosdb:account", "value": "[reference(resourceid('microsoft.documentdb/databaseaccounts", variables('cosmosaccountname'))).documentendpoint]"}, {"name": "cosmosdb:key", "value": "[listkeys(resourceid('microsoft.documentdb/databaseaccounts", variables('cosmosaccountname')), "2021-04-15').primarymasterkey]"}, {"name": "cosmosdb:databasename", "value": "[parameters('databasename')]"}, {"name": "cosmosdb:containername", "value": "[parameters('containername')]"}]}}, "dependson": ["[resourceid('microsoft.documentdb/databaseaccounts", variables('cosmosaccountname'))]", "[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]"]} |
This module creates a storageAccount resource with apiVersion 2021-01-01. | {"type": "microsoft.storage/storageaccounts", "apiversion": "2019-06-01", "name": "[variables('defaultstorageaccount').name]", "location": "[parameters('location')]", "sku": {"name": "[variables('defaultstorageaccount').type]"}, "kind": "storage", "properties": {}} |
Create a VM from a Windows Image with 4 Empty Data Disks | {"apiversion": "2019-12-01", "type": "microsoft.compute/availabilitysets", "name": "[variables('availabilitysetname')]", "location": "[parameters('location')]", "sku": {"name": "aligned"}, "properties": {"platformfaultdomaincount": "[variables('platformfaultdomaincount')]", "platformupdatedomaincount": "[variables('platformupdatedomaincount')]"}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[concat(parameters('dnslabelforvmip'), copyindex())]", "location": "[parameters('location')]", "copy": {"name": "virtualmachineloop", "count": "[variables('numberofinstances')]"}, "dependson": ["[concat('microsoft.network/networkinterfaces/", concat(parameters('vmandloadbalancerexposure'),variables('nicname'), copyindex()))]", "[concat('microsoft.compute/availabilitysets/", variables('availabilitysetname'))]"], "properties": {"availabilityset": {"id": "[resourceid('microsoft.compute/availabilitysets", variables('availabilitysetname'))]"}, "hardwareprofile": {"vmsize": "[if(equals(copyindex(), variables('monitornodeindex')), parameters('monitornodevmsize'), parameters('messageroutingnodevmsize'))]"}, "osprofile": {"computername": "[concat(parameters('dnslabelforvmip'), copyindex())]", "adminusername": "[parameters('vmadminusername')]", "adminpassword": "[parameters('vmadminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[parameters('centosversion')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('dnslabelforvmip'), copyindex(), "_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}, "datadisks": "[variables('datadiskschoices')[if(or(equals(parameters('datadisksize'), "0'), equals(copyindex(), variables('monitornodeindex'))), "2", string(copyindex()))]]"}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", concat(parameters('vmandloadbalancerexposure'),variables('nicname'), copyindex()))]"}]}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('dnslabelforvmip'), copyindex(), "/dockerextension')]", "location": "[parameters('location')]", "copy": {"name": "dockerloop", "count": "[variables('numberofinstances')]"}, "dependson": ["[concat('microsoft.compute/virtualmachines/", parameters('dnslabelforvmip'), copyindex())]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "dockerextension", "typehandlerversion": "1.0", "autoupgrademinorversion": true, "settings": {}}} |
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01. | {"type": "microsoft.compute/availabilitysets", "name": "[variables('availabilitysetname')]", "apiversion": "2019-12-01", "location": "[parameters('location')]", "sku": {"name": "aligned"}, "properties": {"platformfaultdomaincount": 2, "platformupdatedomaincount": 2}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[concat(variables('vmname'), copyindex())]", "copy": {"name": "virtualmachineloop", "count": "[variables('numberofinstances')]"}, "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts", variables('newstorageaccountname'))]", "[resourceid('microsoft.compute/availabilitysets", variables('availabilitysetname'))]"], "properties": {"availabilityset": {"id": "[resourceid('microsoft.compute/availabilitysets", variables('availabilitysetname'))]"}, "hardwareprofile": {"vmsize": "[parameters('windowsvmsize')]"}, "osprofile": {"computername": "[concat(variables('vmname'), copyindex())]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[parameters('windowsvmsku')]", "version": "latest"}, "osdisk": {"createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", concat(variables('vmname'),copyindex()))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('newstorageaccountname')).primaryendpoints.blob]"}}}} |
Storage Account with Storage Service Encryption and a blob deletion retention policy | {"apiversion": "2021-04-01", "type": "microsoft.storage/storageaccounts", "name": "[variables('newstorageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "[variables('storageaccounttype')]"}} |
This sample contains a script to easily migrate template gallery templates to templateSpec resources. | {"apiversion": "2020-08-01", "name": "deploy-xss-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-08-01", "name": "[concat(variables('vnetname'),"-resource')]", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('vnettemplateuri')]"}, "parameters": {"vnetname": {"value": "[variables('vnetname')]"}, "addressprefix": {"value": "[variables('vnetaddressspace')]"}, "subnets": {"value": "[variables('subnets')]"}, "location": {"value": "[parameters('location')]"}, "tags": {"value": "[variables('tags')]"}}}}{"apiversion": "2020-08-01", "name": "[concat(variables('applicationgateways')[copyindex()].name,"-pip","-resource')]", "type": "microsoft.resources/deployments", "copy": {"name": "copy-appgateway-pip", "count": 2}, "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('piptemplateuri')]"}, "parameters": {"publicipaddressname": {"value": "[concat(variables('applicationgateways')[copyindex()].name,"-pip')]"}, "publicipaddresstype": {"value": "[parameters('pipaddresstype')]"}, "dnsnameforpublicip": {"value": "[concat(variables('applicationgateways')[copyindex()].name,"-",uniquestring(resourcegroup().id, "pip'), "-pip')]"}, "location": {"value": "[parameters('location')]"}, "tags": {"value": "[variables('tags')]"}}}}{"apiversion": "2020-08-01", "name": "[concat('deploy-",variables('applicationgateways')[copyindex()].name,"-applicationgateway","-resource')]", "type": "microsoft.resources/deployments", "copy": {"name": "copy-appgateway", "count": 2}, "dependson": ["copy-appgateway-pip", "[resourceid('microsoft.resources/deployments",concat(variables('vnetname'),"-resource'))]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('appgwtemplateuri')]"}, "parameters": {"applicationgatewayname": {"value": "[variables('applicationgateways')[copyindex()].name]"}, "location": {"value": "[parameters('location')]"}, "publicipref": {"value": "[reference(resourceid('microsoft.resources/deployments",concat(variables('applicationgateways')[copyindex()].name,"-pip","-resource'))).outputs.publicipref.value]"}, "frontendports": {"value": [{"name": "appgatewayfrontendport", "properties": {"port": 80}}]}, "gatewayipconfigurations": {"value": [{"name": "appgatewayipconfig", "properties": {"subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets",variables('vnetname'),variables('subnets')[0].name)]"}}}]}, "backendaddresspools": {"value": [{"name": "appgatewaybackendpool", "properties": {"backendaddresses": [{"fqdn": "[reference(resourceid('microsoft.resources/deployments",concat(variables('webappname'),"-resource'))).outputs.endpoint.value]"}]}}]}, "backendhttpsettingscollection": {"value": [{"name": "appgatewaybackendhttpsettings", "properties": {"port": 80, "protocol": "http", "cookiebasedaffinity": "disabled", "pickhostnamefrombackendaddress": "true", "probe": {"id": "[resourceid('microsoft.network/applicationgateways/probes",variables('applicationgateways')[copyindex()].name,variables('httpprobename'))]"}}}]}, "httplisteners": {"value": [{"name": "appgatewayhttplistener", "properties": {"frontendipconfiguration": {"id": "[resourceid('microsoft.network/applicationgateways/frontendipconfigurations",variables('applicationgateways')[copyindex()].name, "appgatewayfrontendip')]"}, "frontendport": {"id": "[resourceid('microsoft.network/applicationgateways/frontendports",variables('applicationgateways')[copyindex()].name, "appgatewayfrontendport')]"}, "protocol": "http"}}]}, "requestroutingrules": {"value": [{"name": "rule1", "properties": {"ruletype": "basic", "httplistener": {"id": "[resourceid('microsoft.network/applicationgateways/httplisteners",variables('applicationgateways')[copyindex()].name, "appgatewayhttplistener')]"}, "backendaddresspool": {"id": "[resourceid('microsoft.network/applicationgateways/backendaddresspools",variables('applicationgateways')[copyindex()].name, "appgatewaybackendpool')]"}, "backendhttpsettings": {"id": "[resourceid('microsoft.network/applicationgateways/backendhttpsettingscollection",variables('applicationgateways')[copyindex()].name, "appgatewaybackendhttpsettings')]"}}}]}, "probes": {"value": [{"name": "[variables('httpprobename')]", "properties": {"protocol": "http", "host": "[reference(resourceid('microsoft.resources/deployments",concat(variables('webappname'),"-resource'))).outputs.endpoint.value]", "path": "/", "interval": 30, "timeout": 30, "unhealthythreshold": 8}}, {"name": "[variables('httpsprobename')]", "properties": {"protocol": "https", "host": "[reference(resourceid('microsoft.resources/deployments",concat(variables('webappname'),"-resource'))).outputs.endpoint.value]", "path": "/", "interval": 30, "timeout": 30, "unhealthythreshold": 8}}]}, "wafmode": {"value": "[variables('applicationgateways')[copyindex()].wafmode]"}, "omsworkspaceresourceid": {"value": "[reference('deploy-xss-attack-oms-resource').outputs.workspaceid.value]"}}}}{"apiversion": "2020-08-01", "name": "[concat(variables('diagstorageaccname'),"-resource')]", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('storagetemplateuri')]"}, "parameters": {"storageaccountname": {"value": "[variables('diagstorageaccname')]"}, "location": {"value": "[parameters('location')]"}, "tags": {"value": "[variables('tags')]"}}}}{"apiversion": "2020-08-01", "name": "[concat(variables('aspname'),"-resource')]", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('asptemplateuri')]"}, "parameters": {"name": {"value": "[variables('aspname')]"}, "location": {"value": "[parameters('location')]"}, "tags": {"value": "[variables('tags')]"}}}}{"apiversion": "2020-08-01", "name": "[concat(variables('webappname'),"-resource')]", "type": "microsoft.resources/deployments", "dependson": ["[resourceid('microsoft.resources/deployments",concat(variables('aspname'),"-resource'))]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('webapptemplateuri')]"}, "parameters": {"name": {"value": "[variables('webappname')]"}, "hostingplanname": {"value": "[variables('aspname')]"}, "location": {"value": "[parameters('location')]"}, "tags": {"value": "[variables('tags')]"}}}} |
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')]"}}}{"comments": "default network security group for template", "type": "microsoft.network/networksecuritygroups", "apiversion": "2020-07-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "default-allow-22", "properties": {"priority": 1000, "access": "allow", "direction": "inbound", "destinationportrange": "22", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"], "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "[variables('subnetprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}}}]}} |
Establish connection to a VNET via an ExpressRoute circuit | {"apiversion": "2015-06-15", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[parameters('dnslabelprefix')]"}}}{"apiversion": "2015-06-15", "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": "2015-06-15", "type": "microsoft.network/networkinterfaces", "name": "[variables('nicname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/publicipaddresses/", variables('publicipaddressname'))]", "[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('publicipaddressname'))]"}, "subnet": {"id": "[variables('subnetref')]"}}}]}} |
Establish connection to a VNET via an ExpressRoute circuit | {"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": ["[variables('publicipaddressname')]", "[variables('virtualnetworkname')]"], "properties": {"ipconfigurations": [{"name": "[variables('jumpboxipconfigname')]", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", variables('publicipaddressname'))]"}, "subnet": {"id": "[variables('subnetid')]"}}}]}} |
Create a VM from a Windows Image with 4 Empty Data Disks | {"comments": "this creates the kemp loadmaster with multiple interfaces.", "apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[variables('vmname')]", "location": "[parameters('location')]", "tags": {"displayname": "virtualmachine"}, "plan": {"name": "[variables('imagesku')]", "product": "[variables('imageoffer')]", "publisher": "[variables('imagepublisher')]"}, "dependson": ["[resourceid('microsoft.network/networkinterfaces", variables('nicname1'))]", "[resourceid('microsoft.network/networkinterfaces", variables('nicname2'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmname')]", "adminusername": "[parameters('balusername')]", "adminpassword": "[parameters('balpassword')]"}, "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('nicname1'))]", "properties": {"primary": true}}, {"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname2'))]", "properties": {"primary": false}}]}}} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/publicipaddresses", "apiversion": "2021-05-01", "name": "[parameters('publicipname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('publicipsku')]"}, "properties": {"publicipallocationmethod": "[parameters('publicipallocationmethod')]", "dnssettings": {"domainnamelabel": "[parameters('dnslabelprefix')]"}}} |
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01. | {"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')]"}]}}} |
Create a VM from a Windows Image with 4 Empty Data Disks | {"name": "[parameters('vmname')]", "type": "microsoft.compute/virtualmachines", "apiversion": "2019-07-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces", concat(parameters('vmname'),"-nic-01'))]", "[resourceid('microsoft.storage/storageaccounts",tolower(parameters('storageaccountname')))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[parameters('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "canonical", "offer": "ubuntuserver", "sku": "16.04-lts", "version": "latest"}, "osdisk": {"name": "[concat(parameters('vmname'),"-os-01')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", concat(parameters('vmname'),"-nic-01'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(resourceid('microsoft.storage/storageaccounts/", tolower(parameters('storageaccountname')))).primaryendpoints.blob]"}}}} |
This template creates an Azure Machine Learning service workspace with public network connectivity. | {"type": "microsoft.machinelearningservices/workspaces", "apiversion": "2020-03-01", "identity": {"type": "systemassigned"}, "name": "[variables('workspacename')]", "location": "[parameters('location')]", "dependson": ["[variables('storageaccount')]", "[variables('keyvault')]", "[variables('applicationinsights')]", "[variables('containerregistry')]"], "properties": {"friendlyname": "[variables('workspacename')]", "storageaccount": "[variables('storageaccount')]", "keyvault": "[variables('keyvault')]", "applicationinsights": "[variables('applicationinsights')]", "containerregistry": "[variables('containerregistry')]", "hbiworkspace": "[parameters('hbi_workspace')]", "encryption": {"status": "[parameters('encryption_status')]", "keyvaultproperties": {"keyvaultarmid": "[parameters('cmk_keyvault_id')]", "keyidentifier": "[parameters('cmk_keyvault_key_uri')]"}}}} |
This module creates a storageAccount resource with apiVersion 2021-01-01. | {"apiversion": "2021-01-01", "type": "microsoft.storage/storageaccounts", "sku": {"name": "[variables('storageaccounttype')]"}, "name": "[variables('newstorageaccountname')]", "location": "[parameters('location')]", "properties": {}} |
This template deploys a Route Server into a subnet named RouteServerSubnet. | {"condition": "[equals(parameters('vnetnew_or_existing'), "new')]", "type": "microsoft.network/virtualnetworks", "apiversion": "2020-05-01", "name": "[parameters('vnetname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('vnetipprefix')]"]}}}{"type": "microsoft.network/virtualnetworks/subnets", "apiversion": "2020-05-01", "name": "[format('{0}/{1}", parameters('vnetname'), variables('routeserversubnetname'))]", "properties": {"addressprefix": "[parameters('routeserversubnetipprefix')]"}, "dependson": ["[resourceid('microsoft.network/virtualnetworks", parameters('vnetname'))]"]}{"condition": "[equals(parameters('publicipnew_or_existing'), "new')]", "type": "microsoft.network/publicipaddresses", "apiversion": "2020-05-01", "name": "[parameters('publicipname')]", "location": "[parameters('location')]", "sku": {"name": "standard"}, "properties": {"publicipallocationmethod": "static", "publicipaddressversion": "ipv4", "idletimeoutinminutes": 4}}{"type": "microsoft.network/virtualhubs", "apiversion": "2020-06-01", "name": "[parameters('firstrouteservername')]", "location": "[parameters('location')]", "properties": {"sku": "standard"}}{"type": "microsoft.network/virtualhubs/ipconfigurations", "apiversion": "2020-06-01", "name": "[format('{0}/{1}", parameters('firstrouteservername'), variables('ipconfigname'))]", "properties": {"subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", parameters('vnetname'), variables('routeserversubnetname'))]"}, "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", parameters('publicipname'))]"}}, "dependson": ["[resourceid('microsoft.network/virtualhubs", parameters('firstrouteservername'))]", "[resourceid('microsoft.network/publicipaddresses", parameters('publicipname'))]", "[resourceid('microsoft.network/virtualnetworks/subnets", parameters('vnetname'), variables('routeserversubnetname'))]"]}{"type": "microsoft.network/virtualhubs/bgpconnections", "apiversion": "2020-06-01", "name": "[format('{0}/{1}", parameters('firstrouteservername'), parameters('routeserverbgpconnectionname'))]", "properties": {"peerasn": "[parameters('peerasn')]", "peerip": "[parameters('peerip')]"}, "dependson": ["[resourceid('microsoft.network/virtualhubs", parameters('firstrouteservername'))]", "[resourceid('microsoft.network/virtualhubs/ipconfigurations", parameters('firstrouteservername'), variables('ipconfigname'))]"]} |
This sample contains a script to easily migrate template gallery templates to templateSpec resources. | {"type": "microsoft.resources/deploymentscripts", "apiversion": "2020-10-01", "name": "[format('{0}-{1}", variables('scriptname'), variables('wordpresssharename'))]", "location": "[parameters('location')]", "kind": "azurepowershell", "identity": {"type": "userassigned", "userassignedidentities": {"[resourceid('microsoft.managedidentity/userassignedidentities", variables('identityname'))]": {}}}, "properties": {"azpowershellversion": "3.0", "storageaccountsettings": {"storageaccountname": "[parameters('storageaccountname')]", "storageaccountkey": "[listkeys(resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname')), "2021-04-01').keys[0].value]"}, "scriptcontent": "[variables('wpscripttoexecute')]", "cleanuppreference": "onsuccess", "retentioninterval": "p1d", "timeout": "pt5m"}, "dependson": ["[resourceid('microsoft.managedidentity/userassignedidentities", variables('identityname'))]", "[resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname'))]"]} |
Establish connection to a VNET via an ExpressRoute circuit | {"name": "vnet01", "type": "microsoft.network/virtualnetworks", "location": "[parameters('location')]", "apiversion": "2020-07-01", "tags": {"displayname": "vnet01"}, "properties": {"addressspace": {"addressprefixes": ["[variables('vnet01prefix')]"]}, "subnets": [{"name": "[variables('vnet01subnet1name')]", "properties": {"addressprefix": "[variables('vnet01subnet1prefix')]"}}]}} |
This template provides a way to deploy an Azure database for MySQL with VNet integration. | {"type": "microsoft.dbformysql/servers", "apiversion": "2017-12-01", "name": "[variables('mysqlservername')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('dbskuname')]", "tier": "[parameters('dbskutier')]", "capacity": "[parameters('dbskucapacity')]", "family": "[parameters('databaseskufamily')]"}, "properties": {"createmode": "default", "version": "[parameters('mysqlversion')]", "administratorlogin": "[parameters('administratorlogin')]", "administratorloginpassword": "[parameters('administratorloginpassword')]", "storageprofile": {"storagemb": "[parameters('dbskusizemb')]", "backupretentiondays": 7, "georedundantbackup": "disabled"}, "sslenforcement": "disabled"}}{"type": "microsoft.dbformysql/servers/firewallrules", "apiversion": "2017-12-01", "name": "[format('{0}/{1}", variables('mysqlservername'), "allowazureips')]", "properties": {"startipaddress": "0.0.0.0", "endipaddress": "255.255.255.255"}, "dependson": ["[resourceid('microsoft.dbformysql/servers", variables('mysqlservername'))]"]} |
This module creates a storageAccount resource with apiVersion 2021-01-01. | {"type": "microsoft.storage/storageaccounts", "apiversion": "2021-02-01", "name": "[variables('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storage", "properties": {}} |
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01. | {"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[variables('vmname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.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", "manageddisk": {"storageaccounttype": "[variables('storageaccounttype')]"}}}, "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", "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": "2019-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)))]"}]}}} |
Create a VM from a Windows Image with 4 Empty Data Disks | {"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'))]"}]}}} |
Create a VM from a Windows Image with 4 Empty Data Disks | {"type": "microsoft.compute/disks", "apiversion": "2020-12-01", "name": "[parameters('diskname')]", "location": "[parameters('location')]", "properties": {"creationdata": {"createoption": "empty"}, "disksizegb": 200}} |
Deploy a cognitive service with an universal key. | {"type": "microsoft.cognitiveservices/accounts", "apiversion": "2017-04-18", "name": "[parameters('cognitiveservicename')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('sku')]"}, "kind": "cognitiveservices", "properties": {"statisticsenabled": false}} |
Storage Account with Storage Service Encryption and a blob deletion retention policy | {"type": "microsoft.storage/storageaccounts", "apiversion": "2019-06-01", "name": "[variables('strname')]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storagev2", "tags": {"displayname": "labvm storage account"}, "properties": {"accesstier": "hot"}} |
Storage Account with Storage Service Encryption and a blob deletion retention policy | {"apiversion": "2021-04-01", "type": "microsoft.storage/storageaccounts", "name": "[concat(variables('region-storage-account'),copyindex())]", "sku": {"name": "standard_lrs", "tier": "standard"}, "kind": "storage", "location": "[variables('region')[copyindex()]]", "tags": {"displayname": "storage-accounts"}, "properties": {}, "copy": {"name": "storage-accounts-loop", "count": 2}} |
Create a VM from a Windows Image with 4 Empty Data Disks | {"type": "microsoft.compute/virtualmachines", "name": "[variables('sparkmastermachinename')]", "apiversion": "2020-12-01", "location": "[variables('resourcegrouplocation')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces", variables('sparkmasternetworkinterfacename'))]"], "properties": {"networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('sparkmasternetworkinterfacename'))]"}]}, "hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "storageprofile": {"imagereference": {"publisher": "suse", "offer": "sles-15-sp1", "sku": "gen2", "version": "latest"}, "osdisk": {"name": "[concat(variables('sparkmastermachinename'),"_osdisk')]", "createoption": "fromimage", "caching": "readwrite"}}, "osprofile": {"computername": "[variables('sparkmastermachinename')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}}, "resources": [{"type": "extensions", "name": "[concat('configuresparkonmaster')]", "apiversion": "2020-12-01", "location": "[variables('resourcegrouplocation')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", variables('sparkmastermachinename') )]", "[resourceid('microsoft.network/networkinterfaces/", variables('sparkmasternetworkinterfacename') )]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"fileuris": ["[uri(parameters('_artifactslocation'), concat(variables('scriptfolder'), "/", variables('sparkinstallscriptname'), parameters('_artifactslocationsastoken')))]"]}, "protectedsettings": {"commandtoexecute": "[concat('sudo sh install_spark_environment.sh ", "-m 1", " -i ", reference(variables('sparkmasternetworkinterfacename')).ipconfigurations[0].properties.privateipaddress, " -k ", listkeys(resourceid('microsoft.storage/storageaccounts", variables('storageaccountname')), "2021-01-01').keys[0].value, " -a ", variables('storageaccountname'), parameters('_artifactslocationsastoken'))]"}}}]} |
This sample contains a script to easily migrate template gallery templates to templateSpec resources. | {"name": "shared-resources", "type": "microsoft.resources/deployments", "apiversion": "2015-01-01", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('sharedtemplateurl')]", "contentversion": "1.0.0.0"}, "parameters": {"commonsettings": {"value": "[variables('commonsettings')]"}, "networksettings": {"value": "[variables('networksettings')]"}}}}{"name": "jumpbox-resources", "type": "microsoft.resources/deployments", "apiversion": "2015-01-01", "dependson": ["[concat('microsoft.resources/deployments/", "shared-resources')]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('jumpboxtemplateurl')]", "contentversion": "1.0.0.0"}, "parameters": {"commonsettings": {"value": "[variables('commonsettings')]"}, "networksettings": {"value": "[variables('networksettings')]"}, "machinesettings": {"value": "[variables('machinesettings')]"}}}} |
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": "*"}}]}} |
Create a new SQL logical server with Azure AD-only authentication and an Azure AD Administrator. | {"type": "microsoft.sql/servers", "apiversion": "2020-11-01-preview", "name": "[parameters('server')]", "location": "[parameters('location')]", "properties": {"administrators": {"login": "[parameters('aad_admin_name')]", "sid": "[parameters('aad_admin_objectid')]", "tenantid": "[parameters('aad_admin_tenantid')]", "principaltype": "[parameters('aad_admin_type')]", "azureadonlyauthentication": "[parameters('aad_only_auth')]"}}} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/networksecuritygroups", "comments": "an nsg to prevent inbound traffic other than ssh, set sourceaddressprefix to restrict access further or block all together (or remove the public ip) and ssh in from another vm", "name": "[variables('nsgname')]", "apiversion": "2020-05-01", "location": "[variables('location')]", "properties": {"securityrules": [{"name": "allow_ssh_in", "properties": {"description": "the only thing allowed is ssh", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "22", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 100, "direction": "inbound"}}]}}{"type": "microsoft.network/virtualnetworks", "comments": "an example virtual network, for real scenarios add the dns forwarder to your own vnet", "name": "[variables('vnetname')]", "apiversion": "2020-05-01", "location": "[variables('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('vnetaddressprefix')]"]}, "subnets": [{"name": "[variables('subnet1name')]", "properties": {"addressprefix": "[variables('subnet1prefix')]"}}]}}{"type": "microsoft.network/publicipaddresses", "comments": "a public ip to allow us to ssh into the vm, not recommended for production dns servers", "name": "[variables('pipname')]", "apiversion": "2020-05-01", "location": "[variables('location')]", "properties": {"publicipallocationmethod": "dynamic"}}{"type": "microsoft.network/networkinterfaces", "comments": "a single network interface on each dns server", "name": "[variables('nicname')]", "apiversion": "2020-05-01", "location": "[variables('location')]", "dependson": ["[resourceid('microsoft.network/publicipaddresses/", variables('pipname'))]", "[resourceid('microsoft.network/virtualnetworks/", variables('vnetname'))]", "[resourceid('microsoft.network/networksecuritygroups/", variables('nsgname'))]"], "properties": {"networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('nsgname'))]"}, "ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('pipname'))]"}, "subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('vnetname'), variables('subnet1name'))]"}}}]}} |
Establish connection to a VNET via an ExpressRoute circuit | {"apiversion": "2017-04-01", "type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "location": "[resourcegroup().location]", "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "[variables('subnetprefix')]"}}]}}{"apiversion": "2017-04-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[resourcegroup().location]", "properties": {"publicipallocationmethod": "dynamic", "dnssettings": {"domainnamelabel": "[parameters('dnsnameprefix')]"}}} |
Establish connection to a VNET via an ExpressRoute circuit | {"apiversion": "2015-06-15", "name": "[variables('lbname')]", "type": "microsoft.network/loadbalancers", "location": "[parameters('location')]", "dependson": ["[concat('microsoft.network/publicipaddresses/",variables('apppublicipname'))]"], "properties": {"frontendipconfigurations": [{"name": "[variables('lbfename')]", "properties": {"publicipaddress": {"id": "[variables('publicipaddressid')]"}}}], "backendaddresspools": [{"name": "[variables('lbbeaddresspool')]"}], "loadbalancingrules": [{"name": "weblb", "properties": {"backendaddresspool": {"id": "[variables('lbbeaddresspoolid')]"}, "backendport": 80, "enablefloatingip": false, "frontendipconfiguration": {"id": "[variables('lbfeipconfigid')]"}, "frontendport": 80, "probe": {"id": "[variables('lbwebhttpsprobeid')]"}, "protocol": "tcp", "loaddistribution": "sourceip"}}, {"name": "webhttpslb", "properties": {"backendaddresspool": {"id": "[variables('lbbeaddresspoolid')]"}, "backendport": 443, "enablefloatingip": false, "frontendipconfiguration": {"id": "[variables('lbfeipconfigid')]"}, "frontendport": 443, "probe": {"id": "[variables('lbwebhttpsprobeid')]"}, "protocol": "tcp", "loaddistribution": "sourceip"}}], "probes": [{"name": "[variables('lbwebprobename')]", "properties": {"protocol": "http", "port": 80, "intervalinseconds": 15, "numberofprobes": 5, "requestpath": "hostingstart.html"}}, {"name": "[variables('lbwebhttpsprobename')]", "properties": {"protocol": "tcp", "port": 443, "intervalinseconds": 15, "numberofprobes": 5}}], "inboundnatpools": [{"name": "[variables('natpoolnamefrontend')]", "properties": {"frontendipconfiguration": {"id": "[variables('frontendipconfigidweb')]"}, "protocol": "tcp", "frontendportrangestart": "[variables('natstartportfrontend')]", "frontendportrangeend": "[variables('natendportfrontend')]", "backendport": "[variables('natbackendportfrontend')]"}}]}}{"apiversion": "2015-06-15", "name": "[variables('lbservicename')]", "type": "microsoft.network/loadbalancers", "location": "[parameters('location')]", "dependson": ["[concat('microsoft.network/publicipaddresses/",variables('servicepublicipname'))]"], "properties": {"frontendipconfigurations": [{"name": "[variables('lbfeservicename')]", "properties": {"publicipaddress": {"id": "[variables('publicipaddressid2')]"}}}], "backendaddresspools": [{"name": "[variables('lbbeserviceaddresspool')]"}], "loadbalancingrules": [{"name": "wcflb", "properties": {"backendaddresspool": {"id": "[variables('lbbeserviceaddresspoolid')]"}, "backendport": 80, "enablefloatingip": false, "frontendipconfiguration": {"id": "[variables('lbfeserviceipconfigid')]"}, "frontendport": 80, "probe": {"id": "[variables('lbwebserviceprobeid')]"}, "protocol": "tcp", "loaddistribution": "default"}}], "probes": [{"name": "[variables('lbwebserviceprobename')]", "properties": {"protocol": "http", "port": 80, "intervalinseconds": 15, "numberofprobes": 5, "requestpath": "hostingstart.html"}}], "inboundnatpools": [{"name": "[variables('natpoolnameservice')]", "properties": {"frontendipconfiguration": {"id": "[variables('frontendipconfigidservice')]"}, "protocol": "tcp", "frontendportrangestart": "[variables('natstartportservice')]", "frontendportrangeend": "[variables('natendportservice')]", "backendport": "[variables('natbackendportservice')]"}}]}} |
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. | {"comments": "generalized from resource: "/subscriptions/38ccde7a-8dbd-46b4-a0c6-71201ffab311/resourcegroups/autonub/providers/microsoft.web/serverfarms/uswestbasic".", "type": "microsoft.web/serverfarms", "sku": {"name": "b1", "tier": "basic", "size": "b1", "family": "b", "capacity": 1}, "name": "[parameters('azure service plan')]", "apiversion": "2020-12-01", "location": "[parameters('location')]", "properties": {"name": "[parameters('azure service plan')]", "numberofworkers": 1}}{"comments": "generalized from resource: "/subscriptions/38ccde7a-8dbd-46b4-a0c6-71201ffab311/resourcegroups/autonub/providers/microsoft.web/sites/pnwebjob".", "type": "microsoft.web/sites", "name": "[parameters('azure webjob name')]", "apiversion": "2020-06-01", "location": "[parameters('location')]", "properties": {"name": "[parameters('azure webjob name')]", "hostnames": ["[concat(parameters('azure webjob name'), variables('endpoint'))]"], "enabledhostnames": ["[concat(parameters('azure webjob name'), variables('endpoint'))]", "[concat(parameters('azure webjob name'),".scm", variables('endpoint'))]"], "hostnamesslstates": [{"name": "[concat(parameters('azure webjob name'), variables('endpoint'))]", "sslstate": 0, "ipbasedsslstate": 0}, {"name": "[concat(parameters('azure webjob name'),".scm", variables('endpoint'))]", "sslstate": 0, "ipbasedsslstate": 0}], "serverfarmid": "[resourceid('microsoft.web/serverfarms", parameters('azure service plan'))]"}, "resources": [{"apiversion": "2020-06-01", "name": "web", "type": "config", "dependson": ["[resourceid('microsoft.web/sites", concat(parameters('azure webjob name')))]"], "properties": {"alwayson": true}}, {"apiversion": "2020-06-01", "name": "web", "type": "sourcecontrols", "dependson": ["[resourceid('microsoft.web/sites", parameters('azure webjob name'))]"], "properties": {"repourl": "https://github.com/pubnub/azureeventhubbridge.git", "branch": "master", "ismanualintegration": true}}, {"apiversion": "2020-06-01", "name": "connectionstrings", "type": "config", "dependson": ["[resourceid('microsoft.web/sites", concat(parameters('azure webjob name')))]", "[resourceid('microsoft.web/sites/sourcecontrols", concat(parameters('azure webjob name')), "web')]"], "properties": {"pnsubchannel": {"value": "[parameters('pubnub ingress channel')]", "type": "custom"}, "pnpubchannel": {"value": "[parameters('pubnub egress channel')]", "type": "custom"}, "pnannouncechannel": {"value": "[parameters('pubnub announce channel')]", "type": "custom"}, "pnpublishkey": {"value": "[parameters('pubnub publish key')]", "type": "custom"}, "pnsubscribekey": {"value": "[parameters('pubnub subscribe key')]", "type": "custom"}, "ehinconnectionstring": {"value": "[listkeys(variables('ehinauthorizationruleresourceid'), variables('sbversion')).primaryconnectionstring]", "type": "custom"}, "ehoutconnectionstring": {"value": "[listkeys(variables('ehoutauthorizationruleresourceid'), variables('sbversion')).primaryconnectionstring]", "type": "custom"}}}], "dependson": ["[resourceid('microsoft.web/serverfarms", parameters('azure service plan'))]"]} |
Establish connection to a VNET via an ExpressRoute circuit | {"apiversion": "2019-11-01", "type": "microsoft.network/publicipaddresses", "name": "[concat(variables('publicipaddressname'), copyindex(1))]", "location": "[variables('vmsettings')[copyindex()].location]", "copy": {"name": "publicipcopy", "count": 2}, "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]"}}{"apiversion": "2019-11-01", "type": "microsoft.network/virtualnetworks", "name": "[concat(variables('virtualnetworkname'), copyindex(1))]", "location": "[variables('vmsettings')[copyindex()].location]", "copy": {"name": "vnetcopy", "count": 2}, "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "[variables('subnetprefix')]"}}]}}{"apiversion": "2019-11-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('frontendnsgname')]", "location": "[variables('vmsettings')[1].location]", "tags": {"displayname": "nsg - test web server from probe"}, "dependson": ["publicipcopy"], "properties": {"securityrules": [{"name": "web-rule", "properties": {"description": "allow web", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "80", "sourceaddressprefix": "[reference(resourceid('microsoft.network/publicipaddresses", concat(variables('publicipaddressname'), "1'))).ipaddress]", "destinationaddressprefix": "*", "access": "allow", "priority": 101, "direction": "inbound"}}]}} |
This sample contains a script to easily migrate template gallery templates to templateSpec resources. | {"name": "mysql", "type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'), concat('nested/mysql-replication.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"location": {"value": "[parameters('location')]"}, "dnsname": {"value": "[parameters('dnsname')]"}, "vmusername": {"value": "[parameters('vmusername')]"}, "mysqlrootpassword": {"value": "[parameters('mysqlrootpassword')]"}, "mysqlreplicationpassword": {"value": "[parameters('mysqlreplicationpassword')]"}, "mysqlprobepassword": {"value": "[parameters('mysqlprobepassword')]"}, "vmsize": {"value": "[parameters('vmsize')]"}, "virtualnetworkname": {"value": "[parameters('virtualnetworkname')]"}, "vnetneworexisting": {"value": "[parameters('vnetneworexisting')]"}, "dbsubnetname": {"value": "[parameters('dbsubnetname')]"}, "vnetaddressprefix": {"value": "[parameters('vnetaddressprefix')]"}, "dbsubnetaddressprefix": {"value": "[parameters('dbsubnetaddressprefix')]"}, "dbsubnetstartaddress": {"value": "[parameters('dbsubnetstartaddress')]"}, "imagepublisher": {"value": "[parameters('imagepublisher')]"}, "imageoffer": {"value": "[parameters('imageoffer')]"}, "imagesku": {"value": "[parameters('imagesku')]"}, "mysqlfrontendport0": {"value": "[parameters('mysqlfrontendport0')]"}, "mysqlfrontendport1": {"value": "[parameters('mysqlfrontendport1')]"}, "sshnatrulefrontendport0": {"value": "[parameters('sshnatrulefrontendport0')]"}, "sshnatrulefrontendport1": {"value": "[parameters('sshnatrulefrontendport1')]"}, "mysqlprobeport0": {"value": "[parameters('mysqlprobeport0')]"}, "mysqlprobeport1": {"value": "[parameters('mysqlprobeport1')]"}, "publicipname": {"value": "[parameters('publicipname')]"}, "authenticationtype": {"value": "[parameters('authenticationtype')]"}, "adminpasswordorkey": {"value": "[parameters('adminpasswordorkey')]"}, "_artifactslocation": {"value": "[parameters('_artifactslocation')]"}, "_artifactslocationsastoken": {"value": "[parameters('_artifactslocationsastoken')]"}}}}{"name": "website", "type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "dependson": ["microsoft.resources/deployments/mysql"], "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'), concat('nested/website.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"location": {"value": "[parameters('location')]"}, "sitename": {"value": "[parameters('sitename')]"}, "hostingplanname": {"value": "[parameters('hostingplanname')]"}, "sku": {"value": "[parameters('sku')]"}, "workersize": {"value": "[parameters('workersize')]"}, "dbserver": {"value": "[concat(parameters('dnsname'), ".", parameters('location'), ".cloudapp.azure.com:",parameters('mysqlfrontendport0'))]"}, "dbname": {"value": "[variables('wpdbname')]"}, "dbadminpassword": {"value": "[parameters('mysqlrootpassword')]"}}}} |
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('vmdnsprefix')]"}}} |
End of preview. Expand
in Dataset Viewer.
README.md exists but content is empty.
Use the Edit dataset card button to edit it.
- Downloads last month
- 36