MihaiIonascu/Azure_IaC_test huggingface dataset:
Establish connection to a VNET via an ExpressRoute circuit

{"type": "microsoft.network/networksecuritygroups", "apiversion": "2020-05-01", "name": "[parameters('nsgname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "microsoft.databricks-workspaces_useonly_databricks-worker-to-worker-inbound", "properties": {"description": "required for worker nodes communication within a cluster.", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 100, "direction": "inbound"}}, {"name": "microsoft.databricks-workspaces_useonly_databricks-worker-to-databricks-webapp", "properties": {"description": "required for workers communication with databricks webapp.", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azuredatabricks", "access": "allow", "priority": 100, "direction": "outbound"}}, {"name": "microsoft.databricks-workspaces_useonly_databricks-worker-to-sql", "properties": {"description": "required for workers communication with azure sql services.", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "3306", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "sql", "access": "allow", "priority": 101, "direction": "outbound"}}, {"name": "microsoft.databricks-workspaces_useonly_databricks-worker-to-storage", "properties": {"description": "required for workers communication with azure storage services.", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "storage", "access": "allow", "priority": 102, "direction": "outbound"}}, {"name": "microsoft.databricks-workspaces_useonly_databricks-worker-to-worker-outbound", "properties": {"description": "required for worker nodes communication within a cluster.", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 103, "direction": "outbound"}}, {"name": "microsoft.databricks-workspaces_useonly_databricks-worker-to-eventhub", "properties": {"description": "required for worker communication with azure eventhub services.", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "9093", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "eventhub", "access": "allow", "priority": 104, "direction": "outbound"}}]}}
This template creates a standard internal Azure Load Balancer with a HA ports load-balancing rule

{"apiversion": "2020-05-01", "type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('vnetaddressprefix')]"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "[parameters('subnetprefix')]"}}]}}{"apiversion": "2020-05-01", "type": "microsoft.network/networkinterfaces", "name": "[variables('nicname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/loadbalancers/", variables('loadbalancername'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "subnet": {"id": "[variables('subnetref')]"}, "loadbalancerbackendaddresspools": [{"id": "[resourceid('microsoft.network/loadbalancers/backendaddresspools", variables('loadbalancername'), "loadbalancerbackend')]"}]}}]}}{"apiversion": "2020-05-01", "name": "[variables('loadbalancername')]", "type": "microsoft.network/loadbalancers", "location": "[parameters('location')]", "sku": {"name": "[variables('lbsku')]"}, "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]"], "properties": {"frontendipconfigurations": [{"name": "loadbalancerfrontend", "properties": {"subnet": {"id": "[variables('subnetref')]"}}}], "backendaddresspools": [{"name": "loadbalancerbackend"}], "loadbalancingrules": [{"name": "[variables('lbrulename')]", "properties": {"frontendipconfiguration": {"id": "[resourceid('microsoft.network/loadbalancers/frontendipconfigurations", variables('loadbalancername'), "loadbalancerfrontend')]"}, "backendaddresspool": {"id": "[resourceid('microsoft.network/loadbalancers/backendaddresspools", variables('loadbalancername'), "loadbalancerbackend')]"}, "probe": {"id": "[resourceid('microsoft.network/loadbalancers/probes", variables('loadbalancername'), variables('lbprobename'))]"}, "protocol": "all", "frontendport": 0, "backendport": 0, "enablefloatingip": false, "enabletcpreset": true, "loaddistribution": "default", "disableoutboundsnat": true, "idletimeoutinminutes": 15}}], "probes": [{"name": "[variables('lbprobename')]", "properties": {"protocol": "tcp", "port": 80, "intervalinseconds": 15, "numberofprobes": 2}}]}}
This template creates a EventHubs namespace, an Event Hub, a consumer group and authorizationRules

{"apiversion": "2018-01-01-preview", "name": "[parameters('namespacename')]", "type": "microsoft.eventhub/namespaces", "location": "[parameters('location')]", "sku": {"name": "standard"}, "properties": {"isautoinflateenabled": true, "maximumthroughputunits": 7}, "resources": [{"apiversion": "2017-04-01", "name": "[parameters('eventhubname')]", "type": "eventhubs", "dependson": ["[resourceid('microsoft.eventhub/namespaces/", parameters('namespacename'))]"], "properties": {"messageretentionindays": 4, "partitioncount": 4}, "resources": [{"apiversion": "2017-04-01", "name": "[parameters('consumergroupname')]", "type": "consumergroups", "dependson": ["[resourceid('microsoft.eventhub/namespaces/eventhubs/", parameters('namespacename'),parameters('eventhubname'))]"], "properties": {"usermetadata": "user metadata"}}, {"apiversion": "2017-04-01", "name": "[parameters('eventhubauthorizationrulename')]", "type": "authorizationrules", "dependson": ["[resourceid('microsoft.eventhub/namespaces/eventhubs/", parameters('namespacename'),parameters('eventhubname'))]"], "properties": {"rights": ["send", "listen", "manage"]}}, {"apiversion": "2017-04-01", "name": "[parameters('eventhubauthorizationrulename1')]", "type": "authorizationrules", "dependson": ["[resourceid('microsoft.eventhub/namespaces/eventhubs/", parameters('namespacename'),parameters('eventhubname'))]"], "properties": {"rights": ["send"]}}]}]}{"apiversion": "2017-04-01", "name": "[concat(parameters('namespacename'), "/", parameters('namespaceauthorizationrulename'))]", "type": "microsoft.eventhub/namespaces/authorizationrules", "dependson": ["[resourceid('microsoft.eventhub/namespaces/", parameters('namespacename'))]"], "properties": {"rights": ["send", "listen", "manage"]}}
Storage Account with Storage Service Encryption and a blob deletion retention policy

{"name": "[parameters('storageaccountname')]", "type": "microsoft.storage/storageaccounts", "location": "[parameters('location')]", "apiversion": "2015-06-15", "tags": {"displayname": "storageaccount"}, "properties": {"accounttype": "[parameters('storageaccounttype')]"}}
Establish connection to a VNET via an ExpressRoute circuit

{"type": "microsoft.network/networksecuritygroups", "apiversion": "2020-05-01", "name": "[parameters('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "ssh", "properties": {"priority": 1000, "protocol": "tcp", "access": "allow", "direction": "inbound", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*", "destinationportrange": "22"}}]}}{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-05-01", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[variables('subnetaddressprefix')]", "privateendpointnetworkpolicies": "enabled", "privatelinkservicenetworkpolicies": "enabled"}}]}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.

{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[concat(parameters('dnsname'), copyindex())]", "zones": "[split(string(add(mod(copyindex(),3),1)), ",')]", "copy": {"name": "virtualmachineloop", "count": "[parameters('numberofvms')]"}, "location": "[parameters('location')]", "dependson": ["nicloop"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[concat(parameters('dnsname'), copyindex())]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": "[if(equals(parameters('windowsorubuntu'), "windows'), variables('windowsimage'), variables('linuximage'))]", "osdisk": {"createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",concat(variables('nicname'),copyindex()))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(resourceid('microsoft.storage/storageaccounts/", variables('storageaccountname'))).primaryendpoints.blob]"}}}}
Create a VM from a Windows Image with 4 Empty Data Disks

{"apiversion": "2020-12-01", "type": "microsoft.compute/virtualmachines", "name": "[variables('vmname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts/", variables('newstorageaccountname'))]", "[resourceid('microsoft.network/networkinterfaces/", variables('nicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[variables('images')[parameters('ostype')].publisher]", "offer": "[variables('images')[parameters('ostype')].offer]", "sku": "[variables('images')[parameters('ostype')].sku]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(variables('vmname'),"/", variables('vmextensionname'))]", "apiversion": "2020-12-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", variables('vmname'))]"], "properties": {"publisher": "chef.bootstrap.windowsazure", "type": "linuxchefclient", "typehandlerversion": "1210.12", "autoupgrademinorversion": true, "settings": {"bootstrap_options": {"chef_node_name": "[parameters('chef_node_name')]", "chef_server_url": "[parameters('chef_server_url')]", "validation_client_name": "[parameters('validation_client_name')]"}, "runlist": "[parameters('runlist')]", "validation_key_format": "[parameters('validation_key_format')]", "chef_service_interval": "[parameters('chef_service_interval')]", "bootstrap_version": "[parameters('bootstrap_version')]", "bootstrap_channel": "[parameters('bootstrap_channel')]", "daemon": "[parameters('daemon')]"}, "protectedsettings": {"validation_key": "[parameters('validation_key')]", "secret": "[parameters('secret')]"}}}
Deploy an App Service that supports Python. It gives you the support to deploy your own Flask app.

{"apiversion": "2020-06-01", "name": "[parameters('webappname')]", "type": "microsoft.web/sites", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/serverfarms/", variables('hostingplanname'))]"], "properties": {"name": "[parameters('webappname')]", "siteconfig": {"linuxfxversion": "[variables('linuxfxversion')]", "alwayson": "[variables('alwayson')]"}, "serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]", "clientaffinityenabled": false}}{"apiversion": "2020-06-01", "name": "[variables('hostingplanname')]", "type": "microsoft.web/serverfarms", "location": "[parameters('location')]", "kind": "linux", "properties": {"name": "[variables('hostingplanname')]", "workersize": "[variables('workersize')]", "workersizeid": "[variables('workersizeid')]", "numberofworkers": "[variables('numberofworkers')]", "reserved": true}, "sku": {"tier": "[variables('sku')]", "name": "[variables('skucode')]"}}
Establish connection to a VNET via an ExpressRoute circuit

{"apiversion": "2020-11-01", "type": "microsoft.network/publicipaddresses", "name": "[concat('publicip", copyindex())]", "location": "[parameters('location')]", "copy": {"name": "foo", "count": "[parameters('scalenumber')]"}, "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]"}}{"comments": "default network security group for template", "type": "microsoft.network/networksecuritygroups", "apiversion": "2020-11-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "default-allow-22", "properties": {"priority": 1000, "access": "allow", "direction": "inbound", "destinationportrange": "22", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"apiversion": "2020-11-01", "type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"], "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnet1name')]", "properties": {"addressprefix": "[variables('subnet1prefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}}}]}}{"apiversion": "2020-11-01", "type": "microsoft.network/networkinterfaces", "name": "[concat(variables('nicname'), 0)]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/publicipaddresses/", "publicip0')]", "[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", "publicip0')]"}, "subnet": {"id": "[variables('subnet1ref')]"}}}]}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.

{"apiversion": "2017-03-30", "type": "microsoft.compute/virtualmachines", "name": "[variables('vmname')]", "location": "[parameters('location')]", "dependson": ["[concat('microsoft.storage/storageaccounts/", parameters('newstorageaccountname'))]", "[concat('microsoft.network/networkinterfaces/", variables('nicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[variables('vmsize')]"}, "osprofile": {"computername": "[variables('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[variables('ubuntuosversion')]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}}}
Create a VM from a Windows Image with 4 Empty Data Disks

{"type": "microsoft.compute/virtualmachines", "name": "[variables('jumpboxname')]", "location": "[parameters('location')]", "apiversion": "2020-12-01", "dependson": ["[resourceid('microsoft.storage/storageaccounts", variables('jumpboxsaname'))]", "[resourceid('microsoft.network/networkinterfaces", variables('jumpboxnicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsku')]"}, "osprofile": {"computername": "[variables('jumpboxname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": "[variables('imagereference')]", "osdisk": {"name": "[variables('jumpboxosdiskname')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('jumpboxnicname'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(resourceid('microsoft.storage/storageaccounts", variables('jumpboxsaname')), "2019-06-01').primaryendpoints["blob"]]"}}}}{"type": "microsoft.compute/virtualmachinescalesets", "name": "[variables('naminginfix')]", "location": "[parameters('location')]", "apiversion": "2020-12-01", "dependson": ["[resourceid('microsoft.network/virtualnetworks", variables('virtualnetworkname'))]"], "sku": {"name": "[parameters('vmsku')]", "tier": "standard", "capacity": "[parameters('instancecount')]"}, "properties": {"overprovision": "true", "upgradepolicy": {"mode": "manual"}, "virtualmachineprofile": {"storageprofile": {"osdisk": {"createoption": "fromimage", "caching": "readwrite"}, "imagereference": "[variables('imagereference')]"}, "osprofile": {"computernameprefix": "[variables('naminginfix')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "networkprofile": {"networkinterfaceconfigurations": [{"name": "[variables('nicname')]", "properties": {"primary": true, "ipconfigurations": [{"name": "[variables('ipconfigname')]", "properties": {"subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('virtualnetworkname'), variables('subnetname'))]"}}}]}}]}}}}
Establish connection to a VNET via an ExpressRoute circuit

{"apiversion": "2020-07-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[parameters('dnslabelprefix')]"}}}{"apiversion": "2020-07-01", "type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnet1name')]", "properties": {"addressprefix": "[variables('subnet1prefix')]"}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/networkinterfaces", "name": "[variables('nicname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/publicipaddresses", variables('publicipaddressname'))]", "[resourceid('microsoft.network/virtualnetworks", variables('virtualnetworkname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('publicipaddressname'))]"}, "subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets",variables('virtualnetworkname'), variables('subnet1name'))]"}}}]}}
Storage Account with Storage Service Encryption and a blob deletion retention policy

{"type": "microsoft.storage/storageaccounts", "name": "[variables('primarystorageaccountname')]", "apiversion": "2015-06-15", "location": "[parameters('primarylocation')]", "properties": {"accounttype": "[variables('storageaccounttype')]"}}{"type": "microsoft.storage/storageaccounts", "name": "[variables('defaultprimarystorageaccountname')]", "apiversion": "2015-06-15", "location": "[parameters('primarylocation')]", "properties": {"accounttype": "[variables('defaultstorageaccounttype')]"}}{"type": "microsoft.storage/storageaccounts", "name": "[variables('secondarystorageaccountname')]", "apiversion": "2015-06-15", "location": "[parameters('secondarylocation')]", "properties": {"accounttype": "[variables('storageaccounttype')]"}}{"type": "microsoft.storage/storageaccounts", "name": "[variables('defaultsecondarystorageaccountname')]", "apiversion": "2015-06-15", "location": "[parameters('secondarylocation')]", "properties": {"accounttype": "[variables('defaultstorageaccounttype')]"}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.

{"apiversion": "2020-12-01", "type": "microsoft.compute/virtualmachines", "name": "[variables('vmname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts", variables('storageaccountname'))]", "[resourceid('microsoft.network/networkinterfaces", variables('nicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[variables('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}}}
Establish connection to a VNET via an ExpressRoute circuit

{"apiversion": "2020-05-01", "type": "microsoft.network/publicipaddresses", "name": "[parameters('publicipname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[parameters('publicipaddresstype')]"}}{"apiversion": "2020-05-01", "type": "microsoft.network/networkinterfaces", "name": "[parameters('nicname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/publicipaddresses/", parameters('publicipname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", parameters('publicipname'))]"}, "subnet": {"id": "[resourceid(parameters('virtualnetworkresourcegroup'), "microsoft.network/virtualnetworks/subnets", parameters('virtualnetworkname'), parameters('subnet1name'))]"}}}]}}
Storage Account with Storage Service Encryption and a blob deletion retention policy

{"type": "microsoft.storage/storageaccounts", "apiversion": "2021-08-01", "name": "[variables('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storage"}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.

{"apiversion": "2020-06-01", "name": "deploy-virus-attack-oms-resource", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('omstemplateuri')]"}, "parameters": {"omsworkspacename": {"value": "[variables('omsworkspacename')]"}, "omssolutionsname": {"value": "[variables('omssolutions')]"}, "sku": {"value": "[parameters('omssku')]"}, "location": {"value": "[parameters('location')]"}, "tags": {"value": "[variables('tags')]"}}}}{"apiversion": "2020-06-01", "name": "[concat(parameters('vnetname'),"-","-resource')]", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('vnettemplateuri')]"}, "parameters": {"vnetname": {"value": "[parameters('vnetname')]"}, "addressprefix": {"value": "[parameters('vnetaddressspace')]"}, "subnets": {"value": "[variables('subnets')]"}, "location": {"value": "[parameters('location')]"}, "tags": {"value": "[variables('tags')]"}}}}{"apiversion": "2020-06-01", "name": "[concat(variables('nsgname'),"-","-resource')]", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('nsgtemplateuri')]"}, "parameters": {"nsgname": {"value": "[variables('nsgname')]"}, "securityrules": {"value": "[variables('nsgsecurityrules')]"}, "location": {"value": "[parameters('location')]"}, "tags": {"value": "[variables('tags')]"}}}}{"apiversion": "2020-06-01", "name": "[concat(variables('vmnames')[copyindex()],"-pip","-resource')]", "type": "microsoft.resources/deployments", "copy": {"name": "copy-pip", "count": 2}, "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('piptemplateuri')]"}, "parameters": {"publicipaddressname": {"value": "[concat(variables('vmnames')[copyindex()],"-pip')]"}, "publicipaddresstype": {"value": "[parameters('pipaddresstype')]"}, "dnsnameforpublicip": {"value": "[concat(variables('vmnames')[copyindex()],uniquestring(resourcegroup().id, "pip'),"-pip')]"}, "location": {"value": "[parameters('location')]"}, "tags": {"value": "[variables('tags')]"}}}}
Creates and optionally secures a Key Vault with logging linked to a storage account.

{"type": "microsoft.keyvault/vaults", "apiversion": "2019-09-01", "name": "[parameters('keyvaultname')]", "location": "[parameters('location')]", "dependson": ["[variables('aadpodidentityuserdefinedmanagedidentityid')]"], "properties": {"accesspolicies": [{"tenantid": "[reference(variables('aadpodidentityuserdefinedmanagedidentityid')).tenantid]", "objectid": "[reference(variables('aadpodidentityuserdefinedmanagedidentityid')).principalid]", "permissions": {"secrets": ["get", "list"], "certificates": ["get"]}}], "sku": {"family": "a", "name": "standard"}, "tenantid": "[subscription().tenantid]", "networkacls": {"bypass": "azureservices", "defaultaction": "[parameters('keyvaultnetworkrulesetdefaultaction')]"}, "enabledfordeployment": false, "enabledfordiskencryption": false, "enabledfortemplatedeployment": false, "enablesoftdelete": false}, "resources": [{"name": "microsoft.insights/default", "type": "providers/diagnosticsettings", "apiversion": "2017-05-01-preview", "dependson": ["[variables('keyvaultid')]", "[variables('workspaceid')]"], "properties": {"workspaceid": "[variables('workspaceid')]", "logs": [{"category": "auditevent", "enabled": true}], "metrics": [{"category": "allmetrics", "enabled": true}]}}]}
Establish connection to a VNET via an ExpressRoute circuit

{"type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "apiversion": "2020-08-01", "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "[variables('subnetprefix')]"}}]}}{"type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "apiversion": "2017-09-01", "properties": {"publicipallocationmethod": "dynamic", "dnssettings": {"domainnamelabel": "[variables('longnaminginfix')]"}}}{"type": "microsoft.network/networkinterfaces", "name": "[variables('jumpboxnicname')]", "location": "[parameters('location')]", "apiversion": "2017-09-01", "dependson": ["[resourceid('microsoft.network/publicipaddresses/", variables('publicipaddressname'))]", "[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]"], "properties": {"ipconfigurations": [{"name": "[variables('jumpboxipconfigname')]", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('publicipaddressname'))]"}, "subnet": {"id": "[variables('subnetref')]"}}}]}}
Deploy a Linux-based HBase cluster in Azure HDInsight

{"type": "microsoft.hdinsight/clusters", "apiversion": "2021-06-01", "name": "[parameters('clustername')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts", variables('defaultstorageaccount').name)]"], "properties": {"clusterversion": "4.0", "ostype": "linux", "clusterdefinition": {"kind": "hbase", "configurations": {"gateway": {"restauthcredential.isenabled": true, "restauthcredential.username": "[parameters('clusterloginusername')]", "restauthcredential.password": "[parameters('clusterloginpassword')]"}}}, "storageprofile": {"storageaccounts": [{"name": "[replace(replace(reference(resourceid('microsoft.storage/storageaccounts", variables('defaultstorageaccount').name), "2019-06-01').primaryendpoints.blob,"https://","'),"/","')]", "isdefault": true, "container": "[parameters('clustername')]", "key": "[listkeys(resourceid('microsoft.storage/storageaccounts", variables('defaultstorageaccount').name), "2019-06-01').keys[0].value]"}]}, "computeprofile": {"roles": [{"name": "headnode", "targetinstancecount": 2, "hardwareprofile": {"vmsize": "[parameters('headnodevirtualmachinesize')]"}, "osprofile": {"linuxoperatingsystemprofile": {"username": "[parameters('sshusername')]", "password": "[parameters('sshpassword')]"}}}, {"name": "workernode", "targetinstancecount": 2, "hardwareprofile": {"vmsize": "[parameters('workernodevirtualmachinesize')]"}, "osprofile": {"linuxoperatingsystemprofile": {"username": "[parameters('sshusername')]", "password": "[parameters('sshpassword')]"}}}, {"name": "zookeepernode", "targetinstancecount": 3, "hardwareprofile": {"vmsize": "[parameters('zookeepernodevirtualmachinesize')]"}, "osprofile": {"linuxoperatingsystemprofile": {"username": "[parameters('sshusername')]", "password": "[parameters('sshpassword')]"}}}]}}}
Establish connection to a VNET via an ExpressRoute circuit

{"comments": "default network security group for template", "type": "microsoft.network/networksecuritygroups", "apiversion": "2020-05-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "[concat('default-allow-", variables('nsgosport')[parameters('os')])]", "properties": {"priority": 1000, "access": "allow", "direction": "inbound", "destinationportrange": "[variables('nsgosport')[parameters('os')]]", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "apiversion": "2020-05-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"], "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnet1name')]", "properties": {"addressprefix": "[variables('subnet1prefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}}}, {"name": "[variables('subnet2name')]", "properties": {"addressprefix": "[variables('subnet2prefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}}}]}}{"type": "microsoft.network/networkinterfaces", "name": "[concat('nic", copyindex())]", "apiversion": "2020-05-01", "location": "[parameters('location')]", "copy": {"name": "nicloop", "count": "[parameters('numberofinstances')]"}, "dependson": ["[variables('virtualnetworkname')]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "subnet": {"id": "[if(equals(mod(copyindex(), 2),0), variables('subnet1ref'), variables('subnet2ref'))]"}}}]}}
This template creates a data collection rule defining the data source (Syslog) and the destination workspace.

{"scope": "[format('microsoft.apimanagement/service/{0}", variables('apim-name'))]", "type": "microsoft.insights/diagnosticsettings", "apiversion": "2017-05-01-preview", "name": "logtoanalytics", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.apimanagement/service", variables('apim-name'))]"], "properties": {"workspaceid": "[parameters('log-analytics-workspace-id')]", "logs": [{"category": "gatewaylogs", "enabled": true}], "metrics": [{"category": "allmetrics", "enabled": true}]}}{"scope": "[format('microsoft.network/applicationgateways/{0}", variables('app-gateway-name'))]", "type": "microsoft.insights/diagnosticsettings", "apiversion": "2017-05-01-preview", "name": "logtoanalytics", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/applicationgateways", variables('app-gateway-name'))]"], "properties": {"workspaceid": "[parameters('log-analytics-workspace-id')]", "logs": [{"category": "applicationgatewayaccesslog", "enabled": true}, {"category": "applicationgatewayperformancelog", "enabled": true}, {"category": "applicationgatewayfirewalllog", "enabled": true}], "metrics": [{"category": "allmetrics", "enabled": true}]}}{"type": "microsoft.insights/components", "apiversion": "2020-02-02-preview", "name": "[variables('app-insights-name')]", "location": "[parameters('location')]", "kind": "web", "properties": {"application_type": "web", "workspaceresourceid": "[parameters('log-analytics-workspace-id')]"}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.

{"apiversion": "2020-12-01", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces/", variables('networkinterfacename'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[parameters('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "microsoftwindowsserver", "offer": "windowsserver", "sku": "2016-datacenter", "version": "latest"}, "osdisk": {"name": "tfsbasicmanagedosdisk", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('networkinterfacename'))]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'),"/createdc')]", "apiversion": "2020-12-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines", parameters('vmname'))]"], "properties": {"publisher": "microsoft.powershell", "type": "dsc", "typehandlerversion": "2.19", "autoupgrademinorversion": true, "settings": {"modulesurl": "[uri(parameters('_artifactslocation'), concat('dsc/createdc.ps1.zip", parameters('_artifactslocationsastoken')))]", "configurationfunction": "createdc.ps1\\createdc", "properties": {"domainname": "[parameters('domainname')]", "admincreds": {"username": "[parameters('adminusername')]", "password": "privatesettingsref:adminpassword"}}}, "protectedsettings": {"items": {"adminpassword": "[parameters('adminpassword')]"}}}}
Establish connection to a VNET via an ExpressRoute circuit

{"name": "[variables('nsgname')]", "type": "microsoft.network/networksecuritygroups", "location": "[parameters('location')]", "apiversion": "2020-08-01", "properties": {"securityrules": [{"name": "rule1", "properties": {"protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 101, "direction": "inbound"}}]}}{"name": "[variables('advnetname')]", "type": "microsoft.network/virtualnetworks", "location": "[parameters('location')]", "apiversion": "2020-08-01", "dependson": ["[variables('nsgid')]"], "properties": {"addressspace": {"addressprefixes": ["[variables('vnetaddressrange')]"]}, "subnets": [{"name": "[variables('adsubnetname')]", "properties": {"addressprefix": "[variables('subnetaddressrange')]", "networksecuritygroup": {"id": "[variables('nsgid')]"}}}]}}{"name": "[variables('publicipaddressname')]", "type": "microsoft.network/publicipaddresses", "location": "[parameters('location')]", "apiversion": "2020-08-01", "dependson": ["[variables('advnetname')]"], "properties": {"publicipallocationmethod": "dynamic", "dnssettings": {"domainnamelabel": "[variables('dnslabelprefix')]"}}}{"name": "[parameters('gwpublicipaddressname')]", "type": "microsoft.network/publicipaddresses", "location": "[parameters('location')]", "apiversion": "2020-08-01", "dependson": ["[variables('deployprimaryadid')]"], "properties": {"publicipallocationmethod": "dynamic", "dnssettings": {"domainnamelabel": "[parameters('gwdnslabelprefix')]"}}}{"name": "[variables('publiclbname')]", "type": "microsoft.network/loadbalancers", "apiversion": "2020-08-01", "location": "[parameters('location')]", "dependson": ["[variables('publicipaddressid')]"], "properties": {"frontendipconfigurations": [{"name": "[variables('lbfe')]", "properties": {"publicipaddress": {"id": "[variables('publicipaddressid')]"}}}], "backendaddresspools": [{"name": "[variables('lbbe')]"}], "inboundnatrules": [{"name": "[variables('rdpnat')]", "properties": {"frontendipconfiguration": {"id": "[variables('publiclbfeconfigid')]"}, "protocol": "tcp", "frontendport": "[variables('rdpport')]", "backendport": 3389, "enablefloatingip": false}}]}}
Showcase a Virus attack on a Virtual Machine detection & prevention.

{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(variables('vmnames')[copyindex(1)],"/malware')]", "apiversion": "2020-12-01", "location": "[parameters('location')]", "dependson": ["omsextension"], "copy": {"name": "copy-extension-malware", "count": 1}, "properties": {"publisher": "microsoft.azure.security", "type": "iaasantimalware", "typehandlerversion": "1.1", "autoupgrademinorversion": true, "settings": {"antimalwareenabled": true, "exclusions": {"processes": "taskmgr.exe"}, "realtimeprotectionenabled": "true", "scheduledscansettings": {"isenabled": "true", "scantype": "quick", "day": "7", "time": "120"}}}}
Establish connection to a VNET via an ExpressRoute circuit

{"apiversion": "2020-08-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic", "dnssettings": {"domainnamelabel": "[parameters('dnsnameforpublicip')]"}}}
Establish connection to a VNET via an ExpressRoute circuit

{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[variables('vnetname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('vnetaddressprefix')]"]}}, "resources": [{"type": "subnets", "apiversion": "2020-06-01", "name": "[variables('subnet1name')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetname')]"], "properties": {"addressprefix": "[variables('subnet1prefix')]", "privateendpointnetworkpolicies": "disabled"}}]}{"type": "microsoft.network/privateendpoints", "apiversion": "2020-06-01", "name": "[variables('privateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetname')]", "[variables('sqlservername')]"], "properties": {"subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('vnetname'), variables('subnet1name'))]"}, "privatelinkserviceconnections": [{"name": "[variables('privateendpointname')]", "properties": {"privatelinkserviceid": "[resourceid('microsoft.sql/servers",variables('sqlservername'))]", "groupids": ["sqlserver"]}}]}}
Establish connection to a VNET via an ExpressRoute circuit

{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[variables('vnetname')]", "location": "[variables('location')]", "properties": {"addressspace": {"addressprefixes": ["172.16.0.0/16"]}, "enableddosprotection": false, "enablevmprotection": false, "subnets": [{"name": "[parameters('frontendsubnet')]", "properties": {"addressprefix": "172.16.0.0/24", "serviceendpoints": [{"service": "microsoft.sql"}], "privateendpointnetworkpolicies": "disabled", "privatelinkservicenetworkpolicies": "disabled"}}, {"name": "[parameters('backendsubnet')]", "properties": {"addressprefix": "172.16.1.0/24", "privateendpointnetworkpolicies": "disabled", "privatelinkservicenetworkpolicies": "disabled"}}, {"name": "[parameters('gatewaysubnet')]", "properties": {"addressprefix": "172.16.255.0/27", "privateendpointnetworkpolicies": "disabled", "privatelinkservicenetworkpolicies": "disabled"}}]}}{"type": "microsoft.network/virtualnetworks/subnets", "apiversion": "2020-06-01", "name": "[concat(variables('vnetname'), "/",parameters('frontendsubnet'))]", "dependson": ["[resourceid('microsoft.network/virtualnetworks", variables('vnetname'))]"], "properties": {"addressprefix": "172.16.0.0/24", "serviceendpoints": [{"service": "microsoft.sql"}], "privateendpointnetworkpolicies": "disabled", "privatelinkservicenetworkpolicies": "disabled"}}
Setup or Update Existing SQL Server with Auto Backup

{"apiversion": "2021-07-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('existingvirtualmachinename'), "/sqliaasextension')]", "location": "[parameters('location')]", "properties": {"type": "sqliaasagent", "publisher": "microsoft.sqlserver.management", "typehandlerversion": "1.2", "autoupgrademinorversion": true, "settings": {"autobackupsettings": {"enable": true, "retentionperiod": "[parameters('sqlautobackupretentionperiod')]", "enableencryption": true}}, "protectedsettings": {"storageurl": "[reference(resourceid('microsoft.storage/storageaccounts", parameters('sqlautobackupstorageaccountname')), "2021-04-01').primaryendpoints["blob"]]", "storageaccesskey": "[listkeys(resourceid('microsoft.storage/storageaccounts", parameters('sqlautobackupstorageaccountname')), "2021-04-01').keys[0].value]", "password": "[parameters('sqlautobackupencryptionpassword')]"}}}
Establish connection to a VNET via an ExpressRoute circuit

{"type": "microsoft.network/publicipaddresses", "apiversion": "2021-03-01", "name": "[variables('publicipaddressname')]", "sku": {"name": "basic"}, "location": "[parameters('location')]", "properties": {"publicipaddressversion": "ipv4", "publicipallocationmethod": "[variables('publicipaddresstype')]"}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.

{"type": "microsoft.compute/virtualmachines", "apiversion": "2019-07-01", "name": "vslab", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts", parameters('storagename'))]", "[resourceid('microsoft.network/networkinterfaces", "vslab-nic')]"], "tags": {"displayname": "vs2019 lab vm"}, "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "labvm", "adminusername": "[parameters('adminuser')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "microsoftvisualstudio", "offer": "visualstudio2019latest", "sku": "vs-2019-comm-latest-ws2019", "version": "latest"}, "osdisk": {"name": "labvmosdisk", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", "vslab-nic')]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(resourceid('microsoft.storage/storageaccounts/", parameters('storagename'))).primaryendpoints.blob]"}}}}{"type": "microsoft.compute/virtualmachines/extensions", "apiversion": "2019-07-01", "name": "vslab/installscript1", "location": "[parameters('location')]", "tags": {"displayname": "install script for labvm"}, "dependson": ["[resourceid('microsoft.compute/virtualmachines", "vslab')]"], "properties": {"publisher": "microsoft.compute", "type": "customscriptextension", "typehandlerversion": "1.10", "autoupgrademinorversion": true, "settings": {"fileuris": ["[variables('scripturl')]"]}, "protectedsettings": {"commandtoexecute": "[concat('powershell -executionpolicy bypass -file installscript.ps1 -username ",parameters('adminuser'))]"}}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.

{"type": "microsoft.compute/virtualmachines/extensions", "apiversion": "2020-06-01", "name": "[concat('vm-r1","-",copyindex(1),"/","installwebserver')]", "location": "[parameters('location-r1')]", "copy": {"name": "extensioncopy", "count": 3}, "dependson": ["vmcopy"], "properties": {"publisher": "microsoft.compute", "type": "customscriptextension", "typehandlerversion": "1.7", "autoupgrademinorversion": true, "settings": {"commandtoexecute": "powershell.exe install-windowsfeature -name web-server -includemanagementtools && powershell.exe remove-item "c:\\inetpub\\wwwroot\\iisstart.htm" && powershell.exe add-content -path "c:\\inetpub\\wwwroot\\iisstart.htm" -value $('hello world from " + $env:computername)"}}}{"type": "microsoft.compute/virtualmachines", "apiversion": "2020-06-01", "name": "[concat('vm-r1","-",copyindex(1))]", "location": "[parameters('location-r1')]", "zones": ["[copyindex(1)]"], "copy": {"name": "vmcopy", "count": 3}, "dependson": ["networkinterfacecopy"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "storageprofile": {"imagereference": {"publisher": "microsoftwindowsserver", "offer": "windowsserver", "sku": "2019-datacenter", "version": "latest"}, "osdisk": {"createoption": "fromimage", "manageddisk": {"storageaccounttype": "[variables('vmstorageaccounttype')]"}}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", concat('vm-r1","-", copyindex(1), "-networkinterface'))]"}]}, "osprofile": {"computername": "[concat('vm-r1","-",copyindex(1))]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]", "windowsconfiguration": {"enableautomaticupdates": true, "provisionvmagent": true}}}}
Establish connection to a VNET via an ExpressRoute circuit

{"apiversion": "2015-06-15", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "tags": {"displayname": "publicipaddress"}, "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[parameters('dnsnameforpublicip')]"}}}{"apiversion": "2017-03-01", "type": "microsoft.network/networkinterfaces", "name": "[variables('nicname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/publicipaddresses/", variables('publicipaddressname'))]"], "tags": {"displayname": "networkinterface"}, "properties": {"networksecuritygroup": {"id": "[resourceid(parameters('existingvirtualnetworkresourcegroup'), "microsoft.network/networksecuritygroups", parameters('existingsecuritygroupname'))]"}, "ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('publicipaddressname'))]"}, "subnet": {"id": "[variables('subnetref')]"}}}]}}
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')]"}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.

{"type": "microsoft.compute/availabilitysets", "apiversion": "2019-03-01", "location": "[parameters('location')]", "name": "[parameters('availabilitysetname')]", "properties": {"platformupdatedomaincount": 20, "platformfaultdomaincount": 2}, "sku": {"name": "aligned"}}