Description
stringlengths
19
200
IaC
stringlengths
128
8.16k
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"apiversion": "2019-10-01", "type": "microsoft.resources/deployments", "name": "[variables('solacesecuritytemplatename')]", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('securitysharedtemplateuri')]", "contentversion": "1.0.0.0"}, "parameters": {"securitygroupname": {"value": "[parameters('securitygroupname')]"}, "subnetprefix": {"value": "[parameters('subnetprefix')]"}, "location": {"value": "[parameters('location')]"}}}}{"apiversion": "2019-10-01", "type": "microsoft.resources/deployments", "name": "[variables('solaceloadbalancername')]", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('loadbalancersharedtemplateuri')]", "contentversion": "1.0.0.0"}, "parameters": {"vmandloadbalancerexposure": {"value": "[parameters('vmandloadbalancerexposure')]"}, "dnslabelforpublicloadbalancer": {"value": "[parameters('dnslabelforpublicloadbalancer')]"}, "publicipaddressnamelb": {"value": "[variables('publicipaddressnamelb')]"}, "publicipaddresstype": {"value": "[variables('publicipaddresstype')]"}, "lbname": {"value": "[variables('lbname')]"}, "lbpoolname": {"value": "[variables('lbpoolname')]"}, "subnetref": {"value": "[variables('subnetref')]"}, "location": {"value": "[parameters('location')]"}}}}{"condition": "[not(empty(parameters('workspacename')))]", "apiversion": "2019-10-01", "type": "microsoft.resources/deployments", "name": "[variables('solaceworkspacename')]", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('workspaceenabledsharedtemplateuri')]", "contentversion": "1.0.0.0"}, "parameters": {"workspacename": {"value": "[parameters('workspacename')]"}, "workspaceregion": {"value": "[parameters('workspaceregion')]"}}}}{"apiversion": "2019-10-01", "name": "[variables('solaceupdatesubnetname')]", "type": "microsoft.resources/deployments", "dependson": ["[concat('microsoft.resources/deployments/", variables('solacesecuritytemplatename'))]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('updatesubnetsharedtemplateuri')]", "contentversion": "1.0.0.0"}, "parameters": {"virtualnetworkname": {"value": "[variables('virtualnetworkname')]"}, "subnetname": {"value": "[variables('subnetname')]"}, "subnetaddressprefix": {"value": "[reference(resourceid('microsoft.network/virtualnetworks/subnets", variables('virtualnetworkname'), variables('subnetname')), "2018-03-01').addressprefix]"}, "nsgid": {"value": "[resourceid('microsoft.network/networksecuritygroups", parameters('securitygroupname'))]"}, "location": {"value": "[parameters('location')]"}}}}
This template demonstrates how to Create a instance of Azure API Management on a private network protected by Azure Application Gateway.
{"type": "microsoft.apimanagement/service", "apiversion": "2020-12-01", "name": "[variables('apim-name')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('apim-sku')]", "capacity": "[parameters('apim-capacity')]"}, "identity": {"type": "systemassigned"}, "dependson": ["[resourceid('microsoft.network/virtualnetworks", variables('vnet-name'))]"], "resources": [{"type": "gateways", "apiversion": "2020-12-01", "name": "my-gateway", "dependson": ["[resourceid('microsoft.apimanagement/service", variables('apim-name'))]"], "properties": {"locationdata": {"name": "my internal location"}, "description": "self hosted gateway bringing api management to the edge"}}, {"type": "loggers", "apiversion": "2020-12-01", "name": "appinsightslogger", "dependson": ["[resourceid('microsoft.apimanagement/service", variables('apim-name'))]"], "properties": {"loggertype": "applicationinsights", "resourceid": "[resourceid('microsoft.insights/components", variables('app-insights-name'))]", "credentials": {"instrumentationkey": "[reference(variables('app-insights-name')).instrumentationkey]"}}}, {"type": "diagnostics", "apiversion": "2020-12-01", "name": "applicationinsights", "dependson": ["[resourceid('microsoft.apimanagement/service", variables('apim-name'))]", "[resourceid('microsoft.apimanagement/service/loggers", variables('apim-name'), "appinsightslogger')]"], "properties": {"alwayslog": "allerrors", "httpcorrelationprotocol": "legacy", "verbosity": "information", "logclientip": true, "loggerid": "[resourceid('microsoft.apimanagement/service/loggers/", variables('apim-name'), "appinsightslogger')]", "sampling": {"samplingtype": "fixed", "percentage": 100}, "frontend": {"request": {"body": {"bytes": 0}}, "response": {"body": {"bytes": 0}}}, "backend": {"request": {"body": {"bytes": 0}}, "response": {"body": {"bytes": 0}}}}}], "properties": {"publishername": "[parameters('apim-publisher-name')]", "publisheremail": "[parameters('apim-publisher-email')]", "virtualnetworktype": "internal", "virtualnetworkconfiguration": {"subnetresourceid": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('vnet-name'), "apimsubnet')]"}}}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"apiversion": "2021-02-01", "type": "microsoft.storage/storageaccounts", "name": "[variables('supportlogstorageaccountname')]", "location": "[variables('computelocation')]", "properties": {}, "kind": "storage", "sku": {"name": "[parameters('supportlogstorageaccounttype')]"}, "tags": {"resourcetype": "service fabric", "clustername": "[parameters('clustername')]"}}
This template creates a managed application that has a customized default view.
{"type": "microsoft.solutions/applicationdefinitions", "apiversion": "2019-07-01", "name": "[variables('managedapplicationdefinitionname')]", "location": "[parameters('location')]", "properties": {"locklevel": "[variables('locklevel')]", "description": "[variables('description')]", "displayname": "[variables('displayname')]", "packagefileuri": "[variables('packagefileuri')]"}}{"type": "microsoft.solutions/applications", "apiversion": "2019-07-01", "name": "[parameters('applicationname')]", "location": "[parameters('location')]", "kind": "servicecatalog", "dependson": ["[resourceid('microsoft.solutions/applicationdefinitions/",variables('managedapplicationdefinitionname'))]"], "properties": {"managedresourcegroupid": "[variables('managedresourcegroupid')]", "applicationdefinitionid": "[variables('applicationdefinitionresourceid')]", "parameters": {"location": {"value": "[parameters('location')]"}, "storageaccountname": {"value": "[parameters('storageaccountname')]"}, "storageaccounttype": {"value": "[parameters('storageaccounttype')]"}}}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/networksecuritygroups", "name": "[variables('webnsgname')]", "apiversion": "2016-03-30", "location": "[parameters('location')]", "comments": "nsg for web subnet. rules for allowing http and https requests from internet are created", "tags": {"displayname": "web nsg", "quickstartname": "[variables('quickstarttags').name]", "provider": "[variables('redhattags').provider]"}, "properties": {"securityrules": [{"name": "http-allow", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "80", "sourceaddressprefix": "[parameters('remoteallowedcidr')]", "destinationaddressprefix": "10.0.1.0/24", "access": "allow", "priority": 110, "direction": "inbound"}}, {"name": "https-allow", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "[parameters('remoteallowedcidr')]", "destinationaddressprefix": "10.0.1.0/24", "access": "allow", "priority": 120, "direction": "inbound"}}]}}{"type": "microsoft.network/networksecuritygroups", "name": "[variables('appnsgname')]", "apiversion": "2016-03-30", "location": "[parameters('location')]", "comments": "nsg for app subnet. by default, intra vnet traffic is allowed and requests from internet are denied", "tags": {"displayname": "app nsg", "quickstartname": "[variables('quickstarttags').name]", "provider": "[variables('redhattags').provider]"}, "properties": {}}{"type": "microsoft.network/networksecuritygroups", "name": "[variables('databasensgname')]", "apiversion": "2016-03-30", "location": "[parameters('location')]", "comments": "nsg for database subnet. by default, intra vnet traffic is allowed and requests from internet are denied", "tags": {"displayname": "database nsg", "quickstartname": "[variables('quickstarttags').name]", "provider": "[variables('redhattags').provider]"}, "properties": {}}{"type": "microsoft.network/networksecuritygroups", "name": "[variables('jumpnsgname')]", "apiversion": "2016-03-30", "location": "[parameters('location')]", "comments": "nsg for jump subnet. rules for allowing ssh from internet are created", "tags": {"displayname": "jump nsg", "quickstartname": "[variables('quickstarttags').name]", "provider": "[variables('redhattags').provider]"}, "properties": {"securityrules": [{"name": "ssh-allow", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "22", "sourceaddressprefix": "[parameters('remoteallowedcidr')]", "destinationaddressprefix": "10.0.0.128/25", "access": "allow", "priority": 110, "direction": "inbound"}}]}}{"type": "microsoft.network/publicipaddresses", "name": "[variables('jumpipaddressname')]", "apiversion": "2016-03-30", "location": "[parameters('location')]", "comments": " public ip used by the jump vm", "tags": {"displayname": "jump vm public ip", "quickstartname": "[variables('quickstarttags').name]", "provider": "[variables('redhattags').provider]"}, "properties": {"publicipallocationmethod": "static", "dnssettings": {"domainnamelabel": "[variables('jumpdnslabel')]"}, "idletimeoutinminutes": 4}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "pid-738e3eec-68d4-4667-8377-c05c77c21f1b", "properties": {"mode": "incremental", "template": {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymenttemplate.json#", "contentversion": "1.0.0.0", "resources": []}}}{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "dbtemplate", "properties": {"mode": "incremental", "parameters": {"moodlecommon": {"value": "[variables('moodlecommon')]"}, "location": {"value": "[parameters('location')]"}}, "templatelink": {"uri": "[concat(variables('moodlecommon').basetemplateurl, parameters('dbservertype'), ".json", parameters('_artifactslocationsastoken'))]"}}}{"condition": "[parameters('azurebackupswitch')]", "type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "recoverytemplate", "properties": {"mode": "incremental", "parameters": {"moodlecommon": {"value": "[variables('moodlecommon')]"}, "location": {"value": "[parameters('location')]"}}, "templatelink": {"uri": "[concat(variables('moodlecommon').basetemplateurl,"recoveryservices.json",parameters('_artifactslocationsastoken'))]"}}}{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "redistemplate", "dependson": ["microsoft.resources/deployments/networktemplate"], "properties": {"mode": "incremental", "parameters": {"moodlecommon": {"value": "[variables('moodlecommon')]"}, "location": {"value": "[parameters('location')]"}}, "templatelink": {"uri": "[concat(variables('moodlecommon').basetemplateurl,"redis.json",parameters('_artifactslocationsastoken'))]"}}}{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "networktemplate", "properties": {"mode": "incremental", "parameters": {"moodlecommon": {"value": "[variables('moodlecommon')]"}, "location": {"value": "[parameters('location')]"}}, "templatelink": {"uri": "[concat(variables('moodlecommon').basetemplateurl,"network.json",parameters('_artifactslocationsastoken'))]"}}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-06-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[parameters('dnsnameforpublicip')]"}}}{"comments": "default network security group for template", "type": "microsoft.network/networksecuritygroups", "apiversion": "2020-06-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": "*"}}]}}
This template demonstrates how to create a container group with two Linux containers that share an emptyDir volume using Azure Container Instances.
{"name": "[parameters('containergroupname')]", "type": "microsoft.containerinstance/containergroups", "apiversion": "2020-11-01", "location": "[parameters('location')]", "properties": {"containers": [{"name": "[parameters('containername1')]", "properties": {"image": "nginx", "ports": [{"port": "[parameters('port')]"}], "resources": {"requests": {"cpu": "[parameters('cpucores')]", "memoryingb": "[parameters('memoryingb')]"}}, "volumemounts": [{"name": "[parameters('volumename')]", "mountpath": "/var/log/nginx", "readonly": false}]}}, {"name": "[parameters('containername2')]", "properties": {"command": ["bin/bash", "-c", "while sleep 5; do cat /mnt/input/access.log; done"], "image": "[parameters('image')]", "resources": {"requests": {"cpu": "[parameters('cpucores')]", "memoryingb": "[parameters('memoryingb')]"}}, "volumemounts": [{"name": "[parameters('volumename')]", "mountpath": "/mnt/input", "readonly": true}]}}], "ostype": "linux", "ipaddress": {"type": "public", "ports": [{"protocol": "tcp", "port": "[parameters('port')]"}]}, "volumes": [{"name": "[parameters('volumename')]", "emptydir": {}}]}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"name": "master-nodes", "type": "microsoft.resources/deployments", "apiversion": "2020-06-01", "dependson": ["[resourceid('microsoft.resources/deployments", "shared')]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'), concat(variables('nestedtemplatesfoldername'), "/", variables('mastertemplatefilename'), parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"storagesettings": {"value": "[variables('datanodestoragesettings')]"}, "adminusername": {"value": "[parameters('adminusername')]"}, "authset": {"value": "[variables('authset')]"}, "masternodesipprefix": {"value": "[variables('masternodesipprefix')]"}, "vmsize": {"value": "[parameters('vmsizemasternodes')]"}, "subnet": {"value": "[variables('networksettings').subnet.master]"}, "ossettings": {"value": "[variables('ossettings')]"}, "namespace": {"value": "[concat(parameters('esclustername'), "-master')]"}, "location": {"value": "[parameters('location')]"}}}}{"name": "marvel-nodes", "type": "microsoft.resources/deployments", "apiversion": "2020-06-01", "dependson": ["[resourceid('microsoft.resources/deployments", "shared')]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'), concat(variables('nestedtemplatesfoldername'), "/", variables('marveltemplatefilename'), parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}}}{"name": "shared", "type": "microsoft.resources/deployments", "apiversion": "2020-06-01", "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'), concat(variables('nestedtemplatesfoldername'), "/", variables('sharedtemplatefilename'), parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"networksettings": {"value": "[variables('networksettings')]"}, "storagesettings": {"value": "[variables('datanodestoragesettings')]"}, "loadbalancertype": {"value": "[parameters('loadbalancertype')]"}, "ilbipaddress": {"value": "10.0.2.100"}, "location": {"value": "[parameters('location')]"}}}}{"name": "client-nodes", "type": "microsoft.resources/deployments", "apiversion": "2020-06-01", "dependson": ["[resourceid('microsoft.resources/deployments", "shared')]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'), concat(variables('nestedtemplatesfoldername'), "/", variables('clienttemplatefilename'), parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"adminusername": {"value": "[parameters('adminusername')]"}, "authset": {"value": "[variables('authset')]"}, "storagesettings": {"value": "[variables('datanodestoragesettings')]"}, "subnet": {"value": "[variables('networksettings').subnet.other]"}, "vmsize": {"value": "[parameters('vmsizeclientnodes')]"}, "ossettings": {"value": "[variables('ossettings')]"}, "vmcount": {"value": "[parameters('vmclientnodecount')]"}, "lbbackendpools": {"value": "[variables('lbbackendpoolsadded')]"}, "namespace": {"value": "[concat(parameters('esclustername'), "-client')]"}, "location": {"value": "[parameters('location')]"}}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"name": "createadcontroller", "type": "microsoft.resources/deployments", "apiversion": "2020-06-01", "properties": {"mode": "incremental", "templatelink": {"uri": "https://raw.githubusercontent.com/azure/azure-quickstart-templates/master/modules/active-directory-new-domain/0.9/azuredeploy.json", "contentversion": "1.0.0.0"}, "parameters": {"adminusername": {"value": "[parameters('adminusername')]"}, "adminpassword": {"value": "[parameters('adminpassword')]"}, "domainname": {"value": "[parameters('domainname')]"}, "dnsprefix": {"value": "[parameters('dnsprefix')]"}, "location": {"value": "[parameters('location')]"}}}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/publicipaddresses", "apiversion": "2021-05-01", "name": "publicip", "location": "[parameters('location')]", "tags": {"displayname": "publicipaddress"}, "properties": {"publicipallocationmethod": "dynamic", "dnssettings": {"domainnamelabel": "[parameters('vm-dns')]"}}}{"type": "microsoft.network/networksecuritygroups", "apiversion": "2020-04-01", "name": "nsg", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "rdp", "properties": {"description": "description", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "3389", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "deny", "priority": 100, "direction": "inbound"}}, {"name": "https", "properties": {"description": "description", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 110, "direction": "inbound"}}, {"name": "ssh", "properties": {"description": "description", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "22", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 120, "direction": "inbound"}}, {"name": "applications", "properties": {"description": "description", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "8080-8089", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 130, "direction": "inbound"}}]}}{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-04-01", "name": "virtualnetwork", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups", "nsg')]"], "tags": {"displayname": "virtual network"}, "properties": {"addressspace": {"addressprefixes": ["10.0.0.0/16"]}, "subnets": [{"name": "subnet", "properties": {"addressprefix": "10.0.0.0/24", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", "nsg')]"}}}]}}{"type": "microsoft.network/networkinterfaces", "apiversion": "2020-04-01", "name": "nic", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/publicipaddresses", "publicip')]", "[resourceid('microsoft.network/virtualnetworks", "virtualnetwork')]"], "tags": {"displayname": "network interface"}, "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", "publicip')]"}, "subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", "virtualnetwork", "subnet')]"}}}]}}
This template uses Azure Managed Identity to assign access to Azure Maps. See more at https://aka.ms/amauth
{"type": "microsoft.authorization/roleassignments", "apiversion": "2020-04-01-preview", "name": "[variables('akscontributorroleassignmentname')]", "dependson": ["[variables('aksclusteruserdefinedmanagedidentityid')]", "[variables('virtualnetworkid')]"], "properties": {"roledefinitionid": "[variables('contributorroleid')]", "description": "assign the cluster user-defined managed identity contributor role on the resource group.", "principalid": "[reference(variables('aksclusteruserdefinedmanagedidentityname')).principalid]", "principaltype": "serviceprincipal", "scope": "[resourcegroup().id]"}}{"comments": "grant the aks cluster ingress controller pod managed identity with reader role permissions over key vault; paired with the access policy, this allows our ingress controller to pull certificates.", "type": "microsoft.authorization/roleassignments", "apiversion": "2020-04-01-preview", "name": "[variables('aksreaderroleassignmentname')]", "dependson": ["[variables('keyvaultid')]", "[variables('aadpodidentityuserdefinedmanagedidentityid')]"], "properties": {"roledefinitionid": "[variables('readerroleid')]", "principalid": "[reference(variables('aadpodidentityuserdefinedmanagedidentityid')).principalid]", "principaltype": "serviceprincipal", "scope": "[resourcegroup().id]"}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"name": "createvnet", "type": "microsoft.resources/deployments", "apiversion": "2020-06-01", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('vnettemplateuri')]", "contentversion": "1.0.0.0"}, "parameters": {"virtualnetworkname": {"value": "[parameters('virtualnetworkname')]"}, "virtualnetworkaddressrange": {"value": "[parameters('virtualnetworkaddressrange')]"}, "subnetname": {"value": "[parameters('adsubnetname')]"}, "subnetrange": {"value": "[parameters('adsubnet')]"}, "location": {"value": "[parameters('location')]"}}}}{"name": "createadvm1", "type": "microsoft.resources/deployments", "apiversion": "2020-06-01", "dependson": ["[resourceid('microsoft.resources/deployments","createvnet')]", "[resourceid('microsoft.compute/availabilitysets", variables('adavailabilitysetnameroot'))]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('firstvmtemplateuri')]", "contentversion": "1.0.0.0"}, "parameters": {"virtualnetworkname": {"value": "[parameters('virtualnetworkname')]"}, "subnetname": {"value": "[parameters('adsubnetname')]"}, "adavailabilitysetname": {"value": "[variables('adavailabilitysetnameroot')]"}, "vmname": {"value": "[parameters('rootdc1name')]"}, "vmipaddress": {"value": "[parameters('rootdc1ipaddress')]"}, "adminusername": {"value": "[parameters('adminusername')]"}, "adminpassword": {"value": "[parameters('adminpassword')]"}, "vmsize": {"value": "[parameters('vmsize')]"}, "disktype": {"value": "[parameters('disktype')]"}, "imagesku": {"value": "[parameters('imagesku')]"}, "location": {"value": "[parameters('location')]"}, "_artifactslocation": {"value": "[parameters('_artifactslocation')]"}, "_artifactslocationsastoken": {"value": "[parameters('_artifactslocationsastoken')]"}}}}{"name": "createforest", "type": "microsoft.resources/deployments", "apiversion": "2020-06-01", "dependson": ["microsoft.resources/deployments/createadvm1"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('createforesttemplateuri')]", "contentversion": "1.0.0.0"}, "parameters": {"vmname": {"value": "[parameters('rootdc1name')]"}, "location": {"value": "[parameters('location')]"}, "adminusername": {"value": "[parameters('adminusername')]"}, "adminpassword": {"value": "[parameters('adminpassword')]"}, "domainname": {"value": "[parameters('domainname')]"}, "dnsforwarder": {"value": "[parameters('externaldnsforwarder')]"}, "_artifactslocation": {"value": "[parameters('_artifactslocation')]"}, "_artifactslocationsastoken": {"value": "[parameters('_artifactslocationsastoken')]"}}}}{"name": "createadvm3", "type": "microsoft.resources/deployments", "condition": "[parameters('createchilddomain')]", "apiversion": "2020-06-01", "dependson": ["[resourceid('microsoft.resources/deployments","createvnet')]", "[resourceid('microsoft.compute/availabilitysets", variables('adavailabilitysetnamechild'))]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('firstvmtemplateuri')]", "contentversion": "1.0.0.0"}, "parameters": {"virtualnetworkname": {"value": "[parameters('virtualnetworkname')]"}, "subnetname": {"value": "[parameters('adsubnetname')]"}, "adavailabilitysetname": {"value": "[variables('adavailabilitysetnamechild')]"}, "vmname": {"value": "[parameters('childdc3name')]"}, "vmipaddress": {"value": "[parameters('childdc3ipaddress')]"}, "adminusername": {"value": "[parameters('adminusername')]"}, "adminpassword": {"value": "[parameters('adminpassword')]"}, "vmsize": {"value": "[parameters('vmsize')]"}, "disktype": {"value": "[parameters('disktype')]"}, "imagesku": {"value": "[parameters('imagesku')]"}, "location": {"value": "[parameters('location')]"}, "_artifactslocation": {"value": "[parameters('_artifactslocation')]"}, "_artifactslocationsastoken": {"value": "[parameters('_artifactslocationsastoken')]"}}}}{"name": "createchilddomain", "type": "microsoft.resources/deployments", "apiversion": "2020-06-01", "condition": "[parameters('createchilddomain')]", "dependson": ["microsoft.resources/deployments/createadvm3", "microsoft.resources/deployments/createforest"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('createchilddomaintemplateuri')]", "contentversion": "1.0.0.0"}, "parameters": {"vmname": {"value": "[parameters('childdc3name')]"}, "location": {"value": "[parameters('location')]"}, "adminusername": {"value": "[parameters('adminusername')]"}, "adminpassword": {"value": "[parameters('adminpassword')]"}, "parentdomainname": {"value": "[parameters('domainname')]"}, "childdomainname": {"value": "[parameters('childdomainname')]"}, "dnsforwarder": {"value": "[parameters('rootdc1ipaddress')]"}, "_artifactslocation": {"value": "[parameters('_artifactslocation')]"}, "_artifactslocationsastoken": {"value": "[parameters('_artifactslocationsastoken')]"}}}}{"name": "createadvm2", "type": "microsoft.resources/deployments", "apiversion": "2020-06-01", "condition": "[parameters('createseconddc')]", "dependson": ["[resourceid('microsoft.resources/deployments","createvnet')]", "[resourceid('microsoft.compute/availabilitysets", variables('adavailabilitysetnameroot'))]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('nextvmtemplateuri')]", "contentversion": "1.0.0.0"}, "parameters": {"virtualnetworkname": {"value": "[parameters('virtualnetworkname')]"}, "subnetname": {"value": "[parameters('adsubnetname')]"}, "adavailabilitysetname": {"value": "[variables('adavailabilitysetnameroot')]"}, "vmname": {"value": "[parameters('rootdc2name')]"}, "vmipaddress": {"value": "[parameters('rootdc2ipaddress')]"}, "adminusername": {"value": "[parameters('adminusername')]"}, "adminpassword": {"value": "[parameters('adminpassword')]"}, "vmsize": {"value": "[parameters('vmsize')]"}, "disktype": {"value": "[parameters('disktype')]"}, "imagesku": {"value": "[parameters('imagesku')]"}, "location": {"value": "[parameters('location')]"}, "_artifactslocation": {"value": "[parameters('_artifactslocation')]"}, "_artifactslocationsastoken": {"value": "[parameters('_artifactslocationsastoken')]"}}}}{"name": "configuringrootdc2", "type": "microsoft.resources/deployments", "apiversion": "2020-06-01", "condition": "[parameters('createseconddc')]", "dependson": ["microsoft.resources/deployments/createadvm2", "microsoft.resources/deployments/createchilddomain"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('configureadnextdctemplateuri')]", "contentversion": "1.0.0.0"}, "parameters": {"adnextdcvmname": {"value": "[parameters('rootdc2name')]"}, "location": {"value": "[parameters('location')]"}, "adminusername": {"value": "[parameters('adminusername')]"}, "adminpassword": {"value": "[parameters('adminpassword')]"}, "domainname": {"value": "[parameters('domainname')]"}, "dnsserver": {"value": "[parameters('rootdc1ipaddress')]"}, "adnextdcconfigurationfunction": {"value": "[variables('nextdcconfigurationfunction')]"}, "adnextdcconfigurationmodulesurl": {"value": "[variables('nextdcconfigurationmodulesurl')]"}}}}
Create an Azure Automation account and create a new Azure Monitor Log Analytics workspace if it doesn't exist, and then link them together.
{"type": "microsoft.automation/automationaccounts", "apiversion": "2015-10-31", "name": "[parameters('automationname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.operationalinsights/workspaces/", parameters('workspacename'))]"], "properties": {"sku": {"name": "basic"}}, "resources": [{"type": "variables", "apiversion": "2015-10-31", "name": "[variables('omsworkspaceid')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.automation/automationaccounts/", parameters('automationname'))]"], "properties": {"description": "oms workspace id", "value": "[concat(\""\",reference(resourceid(\"microsoft.operationalinsights/workspaces/\", parameters(\"workspacename\')),\"2021-06-01\').customerid,\""\')]"}}, {"type": "variables", "apiversion": "2021-04-01", "name": "[variables('lastruntimevariable')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.automation/automationaccounts/", parameters('automationname'))]"], "properties": {"description": "lastruntime variable"}}, {"type": "variables", "apiversion": "2021-04-01", "name": "[variables('vmmserversvariable')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.automation/automationaccounts/", parameters('automationname'))]"], "properties": {"description": "vmmservers", "value": "[concat(\""\",parameters(\"vmmservers\'),\""\')]"}}, {"type": "variables", "apiversion": "2021-04-01", "name": "[variables('omsworkspacekey')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.automation/automationaccounts/", parameters('automationname'))]"], "properties": {"description": "oms workspace key", "value": "[concat(\""\",listkeys(resourceid(\"microsoft.operationalinsights/workspaces/\", parameters(\"workspacename\')), \"2021-06-01\').primarysharedkey,\""\')]"}}, {"name": "[variables('runbooks').vmmanalytics.name]", "type": "runbooks", "apiversion": "2020-01-13-preview", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.automation/automationaccounts/", parameters('automationname'))]", "[resourceid('microsoft.automation/automationaccounts/variables", parameters('automationname'), variables('omsworkspaceid'))]", "[resourceid('microsoft.automation/automationaccounts/variables", parameters('automationname'), variables('omsworkspacekey'))]"], "properties": {"runbooktype": "[variables('runbooks').vmmanalytics.type]", "logprogress": false, "logverbose": false, "description": "[variables('runbooks').vmmanalytics.description]", "publishcontentlink": {"uri": "[variables('runbooks').vmmanalytics.uri]", "version": "[variables('runbooks').vmmanalytics.version]"}}}]}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"apiversion": "2019-06-01", "type": "microsoft.storage/storageaccounts", "name": "[variables('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-05-01", "type": "microsoft.network/networksecuritygroups", "location": "[parameters('location')]", "name": "[parameters('nsgname')]"}{"apiversion": "2020-06-01", "type": "microsoft.network/publicipaddresses", "name": "[parameters('loadbalancerpublicipname')]", "location": "[parameters('location')]", "sku": {"name": "standard"}, "properties": {"publicipaddressversion": "ipv4", "publicipallocationmethod": "static", "idletimeoutinminutes": 4}}{"apiversion": "2019-04-01", "type": "microsoft.network/loadbalancers", "location": "[parameters('location')]", "name": "[parameters('loadbalancername')]", "dependson": ["[resourceid('microsoft.network/publicipaddresses/", parameters('loadbalancerpublicipname'))]"], "sku": {"name": "standard", "tier": "regional"}, "properties": {"frontendipconfigurations": [{"name": "[parameters('loadbalancerfrontendconfigname')]", "properties": {"publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", parameters('loadbalancerpublicipname'))]"}}}], "backendaddresspools": [{"name": "[parameters('loadbalancerbackendpoolname')]", "type": "microsoft.network/loadbalancers/backendaddresspools"}], "outboundrules": [{"name": "databricks-outbound-rule", "type": "microsoft.network/loadbalancers/outboundrules", "properties": {"allocatedoutboundports": 0, "protocol": "all", "enabletcpreset": true, "idletimeoutinminutes": 4, "backendaddresspool": {"id": "[variables('loadbalancerbackendpoolid')]"}, "frontendipconfigurations": [{"id": "[variables('loadbalancerfrontendconfigid')]"}]}}]}}{"apiversion": "2019-06-01", "type": "microsoft.network/virtualnetworks", "location": "[parameters('location')]", "name": "[parameters('vnetname')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups/", parameters('nsgname'))]"], "properties": {"addressspace": {"addressprefixes": ["[parameters('vnetcidr')]"]}, "subnets": [{"name": "[parameters('publicsubnetname')]", "properties": {"addressprefix": "[parameters('publicsubnetcidr')]", "networksecuritygroup": {"id": "[variables('nsgid')]"}, "delegations": [{"name": "databricks-del-public", "properties": {"servicename": "microsoft.databricks/workspaces"}}]}}, {"name": "[parameters('privatesubnetname')]", "properties": {"addressprefix": "[parameters('privatesubnetcidr')]", "networksecuritygroup": {"id": "[variables('nsgid')]"}, "delegations": [{"name": "databricks-del-private", "properties": {"servicename": "microsoft.databricks/workspaces"}}]}}]}}
This template demonstrates how to create a instance of Azure API Management within your virtual network's subnet and configure Network Security Group as per recommendation using Service Tags.
{"apiversion": "2019-12-01", "name": "[variables('apimanagementservicename')]", "type": "microsoft.apimanagement/service", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks", parameters('virtualnetworkname'))]"], "sku": {"name": "[parameters('sku')]", "capacity": "[parameters('skucount')]"}, "properties": {"publisheremail": "[parameters('publisheremail')]", "publishername": "[parameters('publishername')]", "virtualnetworktype": "internal", "virtualnetworkconfiguration": {"subnetresourceid": "[variables('subnetref')]"}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "dependson": ["microsoft.resources/deployments/networktemplate"], "name": "dbtemplate", "properties": {"mode": "incremental", "parameters": {"maharacommon": {"value": "[variables('maharacommon')]"}, "lbpubip": {"value": "[reference('networktemplate').outputs.lbpubip.value]"}, "ctlrpubip": {"value": "[reference('networktemplate').outputs.ctlrpubip.value]"}, "dbloginpassword": {"value": "[parameters('dbloginpassword')]"}}, "templatelink": {"uri": "[concat(variables('maharacommon').basetemplateurl, parameters('dbservertype'), ".json", parameters('_artifactslocationsastoken'))]"}}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2015-06-15", "type": "microsoft.network/publicipaddresses", "name": "[concat(variables('publicipaddressname'), copyindex(1))]", "location": "[parameters('location')]", "copy": {"name": "publicipcopy", "count": 2}, "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]"}}{"comments": "default network security group for template", "type": "microsoft.network/networksecuritygroups", "apiversion": "2019-08-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "default-allow-3389", "properties": {"priority": 1000, "access": "allow", "direction": "inbound", "destinationportrange": "3389", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"apiversion": "2015-06-15", "type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"], "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "[variables('subnetprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}}}]}}{"apiversion": "2015-06-15", "type": "microsoft.network/networkinterfaces", "name": "[concat(variables('nicname'), copyindex(1))]", "location": "[parameters('location')]", "copy": {"name": "niccopy", "count": 2}, "dependson": ["[concat(variables('publicipaddressname'), copyindex(1))]", "[variables('virtualnetworkname')]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",concat(variables('publicipaddressname'), copyindex(1)))]"}, "subnet": {"id": "[variables('subnetref')]"}}}]}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"name": "master-nodes", "type": "microsoft.resources/deployments", "apiversion": "2020-06-01", "dependson": ["[resourceid('microsoft.resources/deployments", "shared')]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'), concat(variables('nestedtemplatesfoldername'), "/", variables('mastertemplatefilename'), parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"storagesettings": {"value": "[variables('datanodestoragesettings')]"}, "adminusername": {"value": "[parameters('adminusername')]"}, "authset": {"value": "[variables('authset')]"}, "masternodesipprefix": {"value": "[variables('masternodesipprefix')]"}, "vmsize": {"value": "[parameters('vmsizemasternodes')]"}, "subnet": {"value": "[variables('networksettings').subnet.master]"}, "ossettings": {"value": "[variables('ossettings')]"}, "namespace": {"value": "[concat(parameters('esclustername'), "-master')]"}, "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')]"}}}}{"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')]"}}}}
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.storage/storageaccounts/", parameters('storageaccountname'))]", "[resourceid('microsoft.network/networkinterfaces/", parameters('nicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[parameters('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[parameters('imagepublisher')]", "offer": "[parameters('imageoffer')]", "sku": "[parameters('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",parameters('nicname'))]"}], "inputendpoints": [{"enabledirectserverreturn": "false", "endpointname": "ssh", "privateport": 22, "publicport": 22, "protocol": "tcp"}, {"enabledirectserverreturn": "false", "endpointname": "http", "privateport": 8899, "publicport": 8899, "protocol": "tcp"}]}}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-11-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[parameters('dnslabelprefix')]"}}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"apiversion": "2017-03-30", "type": "microsoft.compute/virtualmachines", "name": "[variables('vmname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts", variables('storageaccountname'))]", "[resourceid('microsoft.network/networkinterfaces", variables('nicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[variables('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('storageaccountname'), "2021-01-01').primaryendpoints["blob"]]"}}}}{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(variables('vmname'),"/nylasscript')]", "location": "[parameters('location')]", "apiversion": "2015-06-15", "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.sh", parameters('_artifactslocationsastoken')))]"], "commandtoexecute": "[concat('sh install.sh ", parameters('adminusername'))]"}}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-07-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[variables('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": "*"}}, {"name": "default-allow-80", "properties": {"priority": 1001, "access": "allow", "direction": "inbound", "destinationportrange": "80", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"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": {}}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"name": "jenkins-master", "type": "microsoft.compute/virtualmachines", "apiversion": "2019-07-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces", "master-networkinterface')]"], "tags": {"displayname": "jenkins master"}, "properties": {"hardwareprofile": {"vmsize": "[parameters('master-vmsize')]"}, "osprofile": {"computername": "jenkins-master", "adminusername": "[parameters('master-username')]", "adminpassword": "[parameters('master-password')]"}, "storageprofile": {"imagereference": {"publisher": "canonical", "offer": "ubuntuserver", "sku": "18.04-lts", "version": "latest"}, "osdisk": {"name": "master-osdisk", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", "master-networkinterface')]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(resourceid('microsoft.storage/storageaccounts", tolower(parameters('storagename')))).primaryendpoints.blob]"}}}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-05-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]"}}{"type": "microsoft.network/networksecuritygroups", "apiversion": "2020-05-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "default-allow-80", "properties": {"priority": 1000, "access": "allow", "direction": "inbound", "destinationportrange": "80", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}, {"name": "default-allow-443", "properties": {"priority": 1001, "access": "allow", "direction": "inbound", "destinationportrange": "443", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}, {"name": "default-allow-3389", "properties": {"priority": 1002, "access": "allow", "direction": "inbound", "destinationportrange": "3389", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"name": "[variables('names').avs]", "type": "microsoft.compute/availabilitysets", "location": "[parameters('location')]", "apiversion": "2020-12-01", "tags": {"displayname": "availabilitysets"}, "properties": {"platformupdatedomaincount": 5, "platformfaultdomaincount": 2}, "sku": {"name": "aligned"}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-04-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[concat(tolower(parameters('vmname')), uniquestring(resourcegroup().id))]"}}}{"apiversion": "2019-08-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('nsgname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allowsshinbound", "properties": {"priority": 100, "access": "allow", "direction": "inbound", "destinationportrange": "22", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"apiversion": "2019-11-01", "type": "microsoft.network/virtualnetworks", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[variables('nsgid')]"], "properties": {"addressspace": {"addressprefixes": ["[parameters('virtualnetworkaddressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetaddressprefix')]", "networksecuritygroup": {"id": "[variables('nsgid')]"}, "privateendpointnetworkpolicies": "disabled", "privatelinkservicenetworkpolicies": "enabled"}}]}}{"apiversion": "2020-04-01", "type": "microsoft.network/networkinterfaces", "name": "[variables('nicname')]", "location": "[parameters('location')]", "dependson": ["[variables('publicipid')]", "[variables('vnetid')]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('publicipaddressname'))]"}, "subnet": {"id": "[variables('subnetid')]"}}}]}}{"type": "microsoft.network/privatednszones", "apiversion": "2018-09-01", "name": "[variables('adlsprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones", "apiversion": "2018-09-01", "name": "[variables('blobprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/privatednszones/a", "apiversion": "2020-06-01", "name": "[format('{0}/{1}", parameters('apimanagementcustomdnsname'), "api')]", "properties": {"ttl": 3600, "arecords": [{"ipv4address": "[reference(resourceid('microsoft.apimanagement/service", variables('apimanagementservicename'))).privateipaddresses[0]]"}]}, "dependson": ["[resourceid('microsoft.apimanagement/service", variables('apimanagementservicename'))]", "[resourceid('microsoft.network/privatednszones", parameters('apimanagementcustomdnsname'))]"]}{"type": "microsoft.network/privatednszones/a", "apiversion": "2020-06-01", "name": "[format('{0}/{1}", parameters('apimanagementcustomdnsname'), "management')]", "properties": {"ttl": 3600, "arecords": [{"ipv4address": "[reference(resourceid('microsoft.apimanagement/service", variables('apimanagementservicename'))).privateipaddresses[0]]"}]}, "dependson": ["[resourceid('microsoft.apimanagement/service", variables('apimanagementservicename'))]", "[resourceid('microsoft.network/privatednszones", parameters('apimanagementcustomdnsname'))]"]}{"type": "microsoft.network/privatednszones/a", "apiversion": "2020-06-01", "name": "[format('{0}/{1}", parameters('apimanagementcustomdnsname'), "portal')]", "properties": {"ttl": 3600, "arecords": [{"ipv4address": "[reference(resourceid('microsoft.apimanagement/service", variables('apimanagementservicename'))).privateipaddresses[0]]"}]}, "dependson": ["[resourceid('microsoft.apimanagement/service", variables('apimanagementservicename'))]", "[resourceid('microsoft.network/privatednszones", parameters('apimanagementcustomdnsname'))]"]}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2020-06-01", "name": "[format('{0}/{1}", parameters('apimanagementcustomdnsname'), "privatednszonelink')]", "location": "global", "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[resourceid('microsoft.network/virtualnetworks", variables('vnetname'))]"}}, "dependson": ["[resourceid('microsoft.network/privatednszones", parameters('apimanagementcustomdnsname'))]", "[resourceid('microsoft.network/virtualnetworks", variables('vnetname'))]"]}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2020-06-01", "name": "[format('{0}/{1}", "privatelink.azurewebsites.net", "webappprivatednszonelink')]", "location": "global", "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[resourceid('microsoft.network/virtualnetworks", variables('vnetname'))]"}}, "dependson": ["[resourceid('microsoft.network/virtualnetworks", variables('vnetname'))]", "[resourceid('microsoft.network/privatednszones", "privatelink.azurewebsites.net')]"]}{"type": "microsoft.network/privateendpoints/privatednszonegroups", "apiversion": "2021-02-01", "name": "[format('{0}/{1}", format('pe-{0}-sites", variables('basename')), "webappprivatednszonegroup')]", "properties": {"privatednszoneconfigs": [{"name": "config", "properties": {"privatednszoneid": "[resourceid('microsoft.network/privatednszones", "privatelink.azurewebsites.net')]"}}]}, "dependson": ["[resourceid('microsoft.network/privatednszones", "privatelink.azurewebsites.net')]", "[resourceid('microsoft.network/privateendpoints", format('pe-{0}-sites", variables('basename')))]"]}{"type": "microsoft.network/privateendpoints/privatednszonegroups", "apiversion": "2021-02-01", "name": "[format('{0}/{1}", format('pe-{0}-kv", variables('basename')), "keyvaultprivatednszonegroup')]", "properties": {"privatednszoneconfigs": [{"name": "config", "properties": {"privatednszoneid": "[resourceid('microsoft.network/privatednszones", "privatelink.vaultcore.azure.net')]"}}]}, "dependson": ["[resourceid('microsoft.network/privatednszones", "privatelink.vaultcore.azure.net')]", "[resourceid('microsoft.network/privateendpoints", format('pe-{0}-kv", variables('basename')))]"]}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2020-06-01", "name": "[format('{0}/{1}", "privatelink.vaultcore.azure.net", "keyvaultprivatednszonelink')]", "location": "global", "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[resourceid('microsoft.network/virtualnetworks", variables('vnetname'))]"}}, "dependson": ["[resourceid('microsoft.network/privatednszones", "privatelink.vaultcore.azure.net')]", "[resourceid('microsoft.network/virtualnetworks", variables('vnetname'))]"]}{"type": "microsoft.network/virtualnetworks", "apiversion": "2021-03-01", "name": "[variables('vnetname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('vnetaddressprefix')]"]}, "subnets": [{"name": "[variables('subnetappserviceintname')]", "properties": {"addressprefix": "[parameters('subnetappserviceintaddressprefix')]", "delegations": [{"name": "delegation", "properties": {"servicename": "microsoft.web/serverfarms"}}]}}, {"name": "[variables('subnetprivateendpointname')]", "properties": {"addressprefix": "[parameters('subnetprivateendpointaddressprefix')]", "privateendpointnetworkpolicies": "disabled"}}, {"name": "[variables('subnetapimanagementname')]", "properties": {"addressprefix": "[parameters('subnetapimanagementaddressprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('nsgapimanagementname'))]"}}}, {"name": "[variables('subnetappgatewayname')]", "properties": {"addressprefix": "[parameters('subnetapplicationgatewayaddressprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('nsgappgatewayname'))]"}}}]}, "dependson": ["[resourceid('microsoft.network/networksecuritygroups", variables('nsgapimanagementname'))]", "[resourceid('microsoft.network/networksecuritygroups", variables('nsgappgatewayname'))]"]}{"type": "microsoft.network/networksecuritygroups", "apiversion": "2021-02-01", "name": "[variables('nsgappgatewayname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "agw-in", "properties": {"direction": "inbound", "access": "allow", "protocol": "*", "description": "app gateway inbound", "priority": 100, "sourceaddressprefix": "gatewaymanager", "sourceportrange": "*", "destinationaddressprefix": "*", "destinationportrange": "65200-65535"}}, {"name": "https-in", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 110, "direction": "inbound", "description": "allow https inbound"}}]}}{"type": "microsoft.network/networksecuritygroups", "apiversion": "2021-02-01", "name": "[variables('nsgapimanagementname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "apim-in", "properties": {"direction": "inbound", "access": "allow", "protocol": "tcp", "description": "api management inbound", "priority": 100, "sourceaddressprefix": "apimanagement", "sourceportrange": "*", "destinationaddressprefix": "virtualnetwork", "destinationportrange": "3443"}}]}}{"type": "microsoft.network/publicipaddresses", "apiversion": "2021-03-01", "name": "[variables('appgatewaypublicipaddressname')]", "location": "[parameters('location')]", "sku": {"name": "standard"}, "properties": {"publicipallocationmethod": "static", "publicipaddressversion": "ipv4", "idletimeoutinminutes": 4}}{"type": "microsoft.network/privatednszones", "apiversion": "2020-06-01", "name": "[parameters('apimanagementcustomdnsname')]", "location": "global"}{"type": "microsoft.network/privatednszones", "apiversion": "2020-06-01", "name": "privatelink.azurewebsites.net", "location": "global"}
This template creates a budget to track cost or usage and get notified whenever a specified threshold is met. There are multiple notification thresholds that are available to configure.
{"type": "microsoft.consumption/budgets", "apiversion": "2021-10-01", "name": "[parameters('budgetname')]", "properties": {"timeperiod": {"startdate": "[parameters('startdate')]", "enddate": "[parameters('enddate')]"}, "timegrain": "[parameters('timegrain')]", "amount": "[parameters('amount')]", "category": "cost", "notifications": {"notificationforexceededbudget1": {"enabled": true, "operator": "greaterthan", "threshold": "[parameters('firstthreshold')]", "contactemails": "[parameters('contactemails')]", "contactroles": "[parameters('contactroles')]", "contactgroups": "[parameters('contactgroups')]"}, "notificationforexceededbudget2": {"enabled": true, "operator": "greaterthan", "threshold": "[parameters('secondthreshold')]", "contactemails": "[parameters('contactemails')]", "contactroles": "[parameters('contactroles')]", "contactgroups": "[parameters('contactgroups')]"}}, "filter": {"and": [{"dimensions": {"name": "resourcegroupname", "operator": "in", "values": "[parameters('resourcegroupfiltervalues')]"}}, {"dimensions": {"name": "metercategory", "operator": "in", "values": "[parameters('metercategoryfiltervalues')]"}}]}}}
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": "[format('ai-{0}", variables('basename'))]", "location": "[parameters('location')]", "kind": "web", "properties": {"application_type": "web", "workspaceresourceid": "[resourceid('microsoft.operationalinsights/workspaces", format('log-{0}", variables('basename')))]"}, "dependson": ["[resourceid('microsoft.operationalinsights/workspaces", format('log-{0}", variables('basename')))]"]}{"type": "microsoft.insights/diagnosticsettings", "apiversion": "2021-05-01-preview", "scope": "[format('microsoft.apimanagement/service/{0}", variables('apimanagementservicename'))]", "name": "apimanagementdiagnosticsettings", "properties": {"workspaceid": "[resourceid('microsoft.operationalinsights/workspaces", format('log-{0}", variables('basename')))]", "logs": [{"category": "gatewaylogs", "enabled": true}], "metrics": [{"category": "allmetrics", "enabled": true}]}, "dependson": ["[resourceid('microsoft.apimanagement/service", variables('apimanagementservicename'))]", "[resourceid('microsoft.operationalinsights/workspaces", format('log-{0}", variables('basename')))]"]}
This template creates a Service Bus Namespace and Topic.
{"apiversion": "2015-08-01", "name": "[parameters('servicebusnamespacename')]", "type": "microsoft.servicebus/namespaces", "location": "[variables('location')]", "kind": "messaging", "tags": {"displayname": "servicebus"}, "sku": {"name": "[parameters('servicebussku')]", "tier": "[parameters('servicebussku')]"}}
Create an Azure Automation account and create a new Azure Monitor Log Analytics workspace if it doesn't exist, and then link them together.
{"type": "microsoft.automation/automationaccounts", "apiversion": "2021-04-01", "location": "[parameters('location')]", "name": "[parameters('automationaccountname')]", "tags": {"arotoolkitversion": "[variables('arotoolkitversion')]"}, "comments": "automation account", "properties": {"sku": {"name": "basic"}}}{"type": "microsoft.automation/automationaccounts/variables", "apiversion": "2021-04-01", "name": "[concat(parameters('automationaccountname'), "/", variables('automationvariables')[copyindex()].name)]", "dependson": ["[resourceid('microsoft.automation/automationaccounts", parameters('automationaccountname'))]"], "copy": {"name": "variableloop", "count": "[length(variables('automationvariables'))]"}, "properties": {"description": "[variables('automationvariables')[copyindex()].description]", "value": "[variables('automationvariables')[copyindex()].value]"}}{"type": "microsoft.automation/automationaccounts/variables", "apiversion": "2021-04-01", "name": "[concat(parameters('automationaccountname'), "/", variables('internalazuresubscriptionid').name)]", "dependson": ["[resourceid('microsoft.automation/automationaccounts", parameters('automationaccountname'))]"], "properties": {"description": "[variables('internalazuresubscriptionid').description]", "isencrypted": true, "type": "string", "value": "[variables('internalazuresubscriptionid').value]"}}{"name": "[concat(parameters('automationaccountname'), "/", variables('azurecredentials'))]", "type": "microsoft.automation/automationaccounts/credentials", "apiversion": "2021-04-01", "dependson": ["[resourceid('microsoft.automation/automationaccounts", parameters('automationaccountname'))]"], "properties": {"description": "azure subscription credentials", "password": "[parameters('azureadminpwd')]", "username": "[parameters('azureadmin')]"}}{"comments": "provision the azurerm.profile module first since others are depenedent on it", "name": "[concat(parameters('automationaccountname'), "/", variables('azurerm.profile').name)]", "type": "microsoft.automation/automationaccounts/modules", "apiversion": "2021-04-01", "dependson": ["[resourceid('microsoft.automation/automationaccounts", parameters('automationaccountname'))]"], "properties": {"contentlink": {"uri": "[variables('azurerm.profile').url]"}}}{"name": "[concat(parameters('automationaccountname'), "/", variables('psmodules')[copyindex()].name)]", "type": "microsoft.automation/automationaccounts/modules", "apiversion": "2021-04-01", "dependson": ["[resourceid('microsoft.automation/automationaccounts", parameters('automationaccountname'))]", "[variables('azurerm.profile').name]"], "copy": {"name": "modulesloop", "count": "[length(variables('psmodules'))]"}, "properties": {"contentlink": {"uri": "[variables('psmodules')[copyindex()].url]"}}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2018-10-01", "type": "microsoft.compute/virtualmachinescalesets", "name": "[variables('nodesettings')[0].vmnodetypename]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]", "[resourceid('microsoft.network/loadbalancers/", concat('lb","-", parameters('clustername'),"-",variables('nodesettings')[0].vmnodetypename))]", "[resourceid('microsoft.storage/storageaccounts/", variables('supportlogstorageaccountname'))]"], "properties": {"overprovision": "[variables('overprovision')]", "upgradepolicy": {"mode": "automatic"}, "virtualmachineprofile": {"extensionprofile": {"extensions": [{"name": "[concat('servicefabricnodevmext","_vmnodetype0name')]", "properties": {"type": "servicefabricnode", "autoupgrademinorversion": true, "protectedsettings": {"storageaccountkey1": "[listkeys(resourceid('microsoft.storage/storageaccounts", variables('supportlogstorageaccountname')),"2021-04-01').keys[0].value]", "storageaccountkey2": "[listkeys(resourceid('microsoft.storage/storageaccounts", variables('supportlogstorageaccountname')),"2021-04-01').keys[1].value]"}, "publisher": "microsoft.azure.servicefabric", "settings": {"clusterendpoint": "[reference(parameters('clustername')).clusterendpoint]", "nodetyperef": "[variables('nodesettings')[0].vmnodetypename]", "datapath": "d:\\svcfab", "durabilitylevel": "bronze", "nicprefixoverride": "[variables('subnetsettings')[0].subnetprefix]", "certificate": {"thumbprint": "[parameters('certificatethumbprint')]", "x509storename": "[parameters('certificatestorevalue')]"}}, "typehandlerversion": "1.0"}}]}, "networkprofile": {"networkinterfaceconfigurations": [{"name": "[concat(variables('nicname'), "-0')]", "properties": {"ipconfigurations": [{"name": "[concat(variables('nicname'),"-",0)]", "properties": {"loadbalancerbackendaddresspools": [{"id": "[resourceid('microsoft.network/loadbalancers/backendaddresspools", concat('lb","-", parameters('clustername'), "-", variables('nodesettings')[0].vmnodetypename), "loadbalancerbeaddresspool')]"}], "loadbalancerinboundnatpools": [{"id": "[resourceid('microsoft.network/loadbalancers/inboundnatpools", concat('lb","-", parameters('clustername'),"-", variables('nodesettings')[0].vmnodetypename), "loadbalancerbeaddressnatpool')]"}], "subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('virtualnetworkname'), variables('subnetsettings')[0].subnetname)]"}}}], "primary": true}}]}, "osprofile": {"adminpassword": "[parameters('adminpassword')]", "adminusername": "[parameters('adminusername')]", "computernameprefix": "[variables('nodesettings')[0].vmnodetypename]", "secrets": [{"sourcevault": {"id": "[parameters('sourcevaultvalue')]"}, "vaultcertificates": [{"certificatestore": "[parameters('certificatestorevalue')]", "certificateurl": "[parameters('certificateurlvalue')]"}]}]}, "storageprofile": {"imagereference": {"publisher": "[parameters('vmimagepublisher')]", "offer": "[parameters('vmimageoffer')]", "sku": "[parameters('vmimagesku')]", "version": "[parameters('vmimageversion')]"}, "osdisk": {"caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "[parameters('disktype')]"}}}}}, "sku": {"name": "[variables('nodesettings')[0].vmnodetypesize]", "capacity": "[variables('nodesettings')[0].instancecount]", "tier": "standard"}, "tags": {"resourcetype": "service fabric", "clustername": "[parameters('clustername')]"}}{"apiversion": "2018-10-01", "type": "microsoft.compute/virtualmachinescalesets", "name": "[variables('nodesettings')[1].vmnodetypename]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]", "[resourceid('microsoft.network/loadbalancers/", concat('lb","-", parameters('clustername'),"-",variables('nodesettings')[1].vmnodetypename))]", "[resourceid('microsoft.storage/storageaccounts/", variables('supportlogstorageaccountname'))]"], "properties": {"overprovision": "[variables('overprovision')]", "upgradepolicy": {"mode": "automatic"}, "virtualmachineprofile": {"extensionprofile": {"extensions": [{"name": "[concat('servicefabricnodevmext","_vmnodetype1name')]", "properties": {"type": "servicefabricnode", "autoupgrademinorversion": true, "protectedsettings": {"storageaccountkey1": "[listkeys(resourceid('microsoft.storage/storageaccounts", variables('supportlogstorageaccountname')),"2021-04-01').keys[0].value]", "storageaccountkey2": "[listkeys(resourceid('microsoft.storage/storageaccounts", variables('supportlogstorageaccountname')),"2021-04-01').keys[1].value]"}, "publisher": "microsoft.azure.servicefabric", "settings": {"clusterendpoint": "[reference(parameters('clustername')).clusterendpoint]", "nodetyperef": "[variables('nodesettings')[1].vmnodetypename]", "datapath": "d:\\svcfab", "durabilitylevel": "bronze", "nicprefixoverride": "[variables('subnetsettings')[1].subnetprefix]", "certificate": {"thumbprint": "[parameters('certificatethumbprint')]", "x509storename": "[parameters('certificatestorevalue')]"}}, "typehandlerversion": "1.0"}}]}, "networkprofile": {"networkinterfaceconfigurations": [{"name": "[concat(variables('nicname'), "-1')]", "properties": {"ipconfigurations": [{"name": "[concat(variables('nicname'),"-",1)]", "properties": {"loadbalancerbackendaddresspools": [{"id": "[resourceid('microsoft.network/loadbalancers/backendaddresspools",concat('lb","-", parameters('clustername'),"-", variables('nodesettings')[1].vmnodetypename), "loadbalancerbeaddresspool')]"}], "loadbalancerinboundnatpools": [{"id": "[resourceid('microsoft.network/loadbalancers/inboundnatpools",concat('lb","-", parameters('clustername'),"-", variables('nodesettings')[1].vmnodetypename), "loadbalancerbeaddressnatpool')]"}], "subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('virtualnetworkname'), variables('subnetsettings')[1].subnetname)]"}}}], "primary": true}}]}, "osprofile": {"adminpassword": "[parameters('adminpassword')]", "adminusername": "[parameters('adminusername')]", "computernameprefix": "[variables('nodesettings')[1].vmnodetypename]", "secrets": [{"sourcevault": {"id": "[parameters('sourcevaultvalue')]"}, "vaultcertificates": [{"certificatestore": "[parameters('certificatestorevalue')]", "certificateurl": "[parameters('certificateurlvalue')]"}]}]}, "storageprofile": {"imagereference": {"publisher": "[parameters('vmimagepublisher')]", "offer": "[parameters('vmimageoffer')]", "sku": "[parameters('vmimagesku')]", "version": "[parameters('vmimageversion')]"}, "osdisk": {"caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "[parameters('disktype')]"}}}}}, "sku": {"name": "[variables('nodesettings')[1].vmnodetypesize]", "capacity": "[variables('nodesettings')[1].instancecount]", "tier": "standard"}, "tags": {"resourcetype": "service fabric", "clustername": "[parameters('clustername')]"}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/virtualnetworks", "name": "[variables('vnetname')]", "apiversion": "2020-05-01", "location": "[parameters('location')]", "tags": {"displayname": "vnet01"}, "dependson": ["[resourceid('microsoft.network/networksecuritygroups/", variables('nsgname'))]", "[resourceid('microsoft.network/publicipaddresses/", concat(variables('vm01name'), "_nic_pip'))]"], "properties": {"addressspace": {"addressprefixes": ["[variables('subnet1prefix')]", "[variables('subnet2prefix')]"]}, "subnets": [{"name": "[variables('subnet1name')]", "properties": {"addressprefix": "[variables('subnet1prefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('nsgname'))]"}}}, {"name": "[variables('subnet2name')]", "properties": {"addressprefix": "[variables('subnet2prefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('nsgname'))]"}}}]}}{"type": "microsoft.network/publicipaddresses", "name": "[concat(variables('vm01name'), "_nic_pip" )]", "apiversion": "2020-05-01", "location": "[parameters('location')]", "tags": {"displayname": "iis01 nic pip"}, "properties": {"publicipallocationmethod": "dynamic", "idletimeoutinminutes": 4}}{"type": "microsoft.network/networkinterfaces", "name": "[concat(variables('vm01name'), "_nic')]", "apiversion": "2020-05-01", "location": "[parameters('location')]", "tags": {"displayname": "iis01 nic"}, "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('vnetname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig", "properties": {"privateipallocationmethod": "static", "privateipaddress": "10.0.1.5", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", concat(variables('vm01name'), "_nic_pip" ))]"}, "subnet": {"id": "[variables('nic01subnetref')]"}}}]}}{"type": "microsoft.network/networkinterfaces", "name": "[concat(variables('vm02name'), "_nic')]", "apiversion": "2020-05-01", "location": "[parameters('location')]", "tags": {"displayname": "appvm01 nic"}, "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('vnetname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig", "properties": {"privateipallocationmethod": "static", "privateipaddress": "10.0.2.5", "subnet": {"id": "[variables('nic02subnetref')]"}}}]}}{"type": "microsoft.network/networkinterfaces", "name": "[concat(variables('vm03name'), "_nic')]", "apiversion": "2020-05-01", "location": "[parameters('location')]", "tags": {"displayname": "appvm02 nic"}, "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('vnetname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig", "properties": {"privateipallocationmethod": "static", "privateipaddress": "10.0.2.6", "subnet": {"id": "[variables('nic03subnetref')]"}}}]}}{"type": "microsoft.network/networkinterfaces", "name": "[concat(variables('vm04name'), "_nic')]", "apiversion": "2020-05-01", "location": "[parameters('location')]", "tags": {"displayname": "dns01 nic"}, "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('vnetname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig", "properties": {"privateipallocationmethod": "static", "privateipaddress": "10.0.2.4", "subnet": {"id": "[variables('nic04subnetref')]"}}}]}}{"type": "microsoft.network/networksecuritygroups", "name": "[variables('nsgname')]", "apiversion": "2020-05-01", "location": "[parameters('location')]", "tags": {"displayname": "myvnetnsg"}, "properties": {"securityrules": [{"name": "enable_dns_rule", "properties": {"description": "enable internal dns", "protocol": "*", "sourceportrange": "*", "destinationportrange": "53", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "10.0.2.4", "access": "allow", "priority": 100, "direction": "inbound"}}, {"name": "enable_rdp_rule", "properties": {"description": "allow rdp", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "3389", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 110, "direction": "inbound"}}, {"name": "enable_web_rule", "properties": {"description": "enable internet to [variables('vm01name')]", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "80", "sourceaddressprefix": "internet", "destinationaddressprefix": "10.0.1.5", "access": "allow", "priority": 120, "direction": "inbound"}}, {"name": "enable_app_rule", "properties": {"description": "enable [variables('vm01name')] to [variables('vm02name')]", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "10.0.1.5", "destinationaddressprefix": "10.0.2.5", "access": "allow", "priority": 130, "direction": "inbound"}}, {"name": "deny_internet_rule", "properties": {"description": "isolate the [variables('vnetname')] vnet from the internet", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "internet", "destinationaddressprefix": "virtualnetwork", "access": "deny", "priority": 140, "direction": "inbound"}}, {"name": "deny_frontend_rule", "properties": {"description": "isolate the [variables('subnet1name')] subnet from the [variables('subnet2name')] subnet", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "[variables('subnet1prefix')]", "destinationaddressprefix": "[variables('subnet2prefix')]", "access": "deny", "priority": 150, "direction": "inbound"}}]}}
Storage Account with Storage Service Encryption and a blob deletion retention policy
{"type": "microsoft.storage/storageaccounts", "apiversion": "2021-04-01", "name": "[format('storage{0}", uniquestring(resourcegroup().id))]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storagev2"}
This template creates a Service Bus Namespace and Topic.
{"type": "microsoft.servicebus/namespaces", "sku": {"name": "standard", "tier": "standard"}, "name": "[parameters('servicebusnamespace')]", "apiversion": "2017-04-01", "location": "[parameters('location')]", "properties": {"metricid": "[concat(subscription().subscriptionid, ":router", parameters('servicebusnamespace'))]", "createdat": "2018-04-07t12:06:43.41z", "updatedat": "2018-04-07t12:07:09.597z", "servicebusendpoint": "[concat('https://", parameters('servicebusnamespace'),".servicebus.windows.net:443/')]", "status": "active"}}{"type": "microsoft.servicebus/namespaces/authorizationrules", "name": "[concat(parameters('servicebusnamespace'), "/", "rootmanagesharedaccesskey')]", "apiversion": "2017-04-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.servicebus/namespaces", parameters('servicebusnamespace'))]"], "properties": {"rights": ["listen", "manage", "send"]}}{"type": "microsoft.servicebus/namespaces/topics", "name": "[concat(parameters('servicebusnamespace'), "/", parameters('messageroutingtopic'))]", "apiversion": "2017-04-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.servicebus/namespaces", parameters('servicebusnamespace'))]"], "properties": {"defaultmessagetimetolive": "p14d", "maxsizeinmegabytes": 1024, "requiresduplicatedetection": false, "duplicatedetectionhistorytimewindow": "pt10m", "enablebatchedoperations": true, "status": "active", "supportordering": false, "autodeleteonidle": "p10675199dt2h48m5.4775807s", "enablepartitioning": true, "enableexpress": false}}{"type": "microsoft.servicebus/namespaces/topics/subscriptions", "name": "[concat(parameters('servicebusnamespace'), "/", parameters('messageroutingtopic'), "/", parameters('backendlogicappsubscription'))]", "apiversion": "2017-04-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.servicebus/namespaces", parameters('servicebusnamespace'))]", "[resourceid('microsoft.servicebus/namespaces/topics", parameters('servicebusnamespace'), parameters('messageroutingtopic'))]"], "properties": {"lockduration": "pt30s", "requiressession": true, "defaultmessagetimetolive": "p14d", "deadletteringonmessageexpiration": false, "deadletteringonfilterevaluationexceptions": false, "maxdeliverycount": 10, "status": "active", "enablebatchedoperations": false, "autodeleteonidle": "p10675199dt2h48m5.4775807s"}}{"type": "microsoft.servicebus/namespaces/topics/subscriptions", "name": "[concat(parameters('servicebusnamespace'), "/", parameters('messageroutingtopic'), "/", parameters('clientlogicappsubscription'))]", "apiversion": "2017-04-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.servicebus/namespaces", parameters('servicebusnamespace'))]", "[resourceid('microsoft.servicebus/namespaces/topics", parameters('servicebusnamespace'), parameters('messageroutingtopic'))]"], "properties": {"lockduration": "pt30s", "requiressession": true, "defaultmessagetimetolive": "p14d", "deadletteringonmessageexpiration": false, "deadletteringonfilterevaluationexceptions": false, "maxdeliverycount": 10, "status": "active", "enablebatchedoperations": false, "autodeleteonidle": "p10675199dt2h48m5.4775807s"}}{"type": "microsoft.servicebus/namespaces/topics/subscriptions", "name": "[concat(parameters('servicebusnamespace'), "/", parameters('messageroutingtopic'), "/", parameters('transformationlogicappsubscription'))]", "apiversion": "2017-04-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.servicebus/namespaces", parameters('servicebusnamespace'))]", "[resourceid('microsoft.servicebus/namespaces/topics", parameters('servicebusnamespace'), parameters('messageroutingtopic'))]"], "properties": {"lockduration": "pt30s", "requiressession": true, "defaultmessagetimetolive": "p14d", "deadletteringonmessageexpiration": false, "deadletteringonfilterevaluationexceptions": false, "maxdeliverycount": 10, "status": "active", "enablebatchedoperations": false, "autodeleteonidle": "p10675199dt2h48m5.4775807s"}}{"type": "microsoft.servicebus/namespaces/topics/subscriptions/rules", "name": "[concat(parameters('servicebusnamespace'), "/", parameters('messageroutingtopic'), "/", parameters('backendlogicappsubscription'), "/", "routetobackendlogicapp')]", "apiversion": "2017-04-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.servicebus/namespaces", parameters('servicebusnamespace'))]", "[resourceid('microsoft.servicebus/namespaces/topics", parameters('servicebusnamespace'), parameters('messageroutingtopic'))]", "[resourceid('microsoft.servicebus/namespaces/topics/subscriptions", parameters('servicebusnamespace'), parameters('messageroutingtopic'), parameters('backendlogicappsubscription'))]"], "properties": {"filtertype": "sqlfilter", "sqlfilter": {"sqlexpression": "source="transformationlogicapp""}}}{"type": "microsoft.servicebus/namespaces/topics/subscriptions/rules", "name": "[concat(parameters('servicebusnamespace'), "/", parameters('messageroutingtopic'), "/", parameters('clientlogicappsubscription'), "/", "routetoclientlogicapp')]", "apiversion": "2017-04-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.servicebus/namespaces", parameters('servicebusnamespace'))]", "[resourceid('microsoft.servicebus/namespaces/topics", parameters('servicebusnamespace'), parameters('messageroutingtopic'))]", "[resourceid('microsoft.servicebus/namespaces/topics/subscriptions", parameters('servicebusnamespace'), parameters('messageroutingtopic'), parameters('clientlogicappsubscription'))]"], "properties": {"filtertype": "sqlfilter", "sqlfilter": {"sqlexpression": "source="backendlogicapp""}}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[variables('adlsstorageaccountprivateendpointid')]", "[variables('blobstorageaccountprivateendpointid')]", "[variables('nicid')]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[parameters('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[parameters('imagepublisher')]", "offer": "[parameters('imageoffer')]", "sku": "[parameters('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage", "disksizegb": "[parameters('osdisksize')]", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}, "copy": [{"name": "datadisks", "count": "[parameters('numdatadisks')]", "input": {"caching": "[parameters('datadiskcaching')]", "disksizegb": "[parameters('datadisksize')]", "lun": "[copyindex('datadisks')]", "name": "[concat(parameters('vmname'),"-datadisk",copyindex('datadisks'))]", "createoption": "empty", "manageddisk": {"storageaccounttype": "[parameters('diskstorageaccountype')]"}}}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('blobstorageaccountid')).primaryendpoints["blob"]]"}}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'), "/customscript')]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"skipdos2unix": false, "timestamp": 123456789, "fileuris": ["[variables('scriptfileuri')]"]}, "protectedsettings": {"commandtoexecute": "[concat('bash ", parameters('scriptfilename'), " ", variables('adlsserviceprimaryendpoint'), " ", variables('blobserviceprimaryendpoint'))]"}}}{"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'),"/loganalytics')]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]", "[variables('workspaceid')]", "[variables('customscriptid')]"], "properties": {"publisher": "microsoft.enterprisecloud.monitoring", "type": "omsagentforlinux", "typehandlerversion": "1.12", "settings": {"workspaceid": "[reference(variables('workspaceid'), "2020-03-01-preview').customerid]", "stoponmultipleconnections": false}, "protectedsettings": {"workspacekey": "[listkeys(variables('workspaceid'),"2020-03-01-preview').primarysharedkey]"}}}
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')]"}}}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"type": "microsoft.storage/storageaccounts", "apiversion": "2021-04-01", "location": "[parameters('location')]", "kind": "storagev2", "name": "[variables('diagstoragename')]", "sku": {"name": "[variables('diagstorageskutype')]", "tier": "standard"}}
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"}}
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')]"}]}}
Storage Account with Storage Service Encryption and a blob deletion retention policy
{"type": "microsoft.storage/storageaccounts", "name": "[parameters('newstorageaccountname')]", "apiversion": "2021-01-01", "location": "[parameters('location')]", "sku": {"name": "[variables('storageaccounttype')]"}, "kind": "storagev2"}
Creates a request-response Logic Apps which perform XSLT based transformation using parameters.
{"properties": {}, "sku": {"name": "standard"}, "name": "[parameters('integrationaccountname')]", "type": "microsoft.logic/integrationaccounts", "location": "[parameters('location')]", "apiversion": "2019-05-01"}{"properties": {"maptype": "xslt", "content": "<?xml version="1.0" encoding="utf-16"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/xsl/transform" xmlns:input="urn:my-input-variables" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:var="https://schemas.microsoft.com/biztalk/2003/var" exclude-result-prefixes="msxsl var s0 usercsharp" version="1.0" xmlns:ns0="https://integration.destination" xmlns:s0="https://integration.source" xmlns:usercsharp="https://schemas.microsoft.com/biztalk/2003/usercsharp"><xsl:import href="https://az818438.vo.msecnd.net/functoids/functoidsscript.xslt" /><xsl:output omit-xml-declaration="yes" method="xml" version="1.0" /> <xsl:param name="input:x"></xsl:param><xsl:param name="input:y"></xsl:param><xsl:template match="/"><xsl:apply-templates select="/s0:root" /></xsl:template><xsl:template match="/s0:root"><ns0:root><sum><xsl:value-of select="usercsharp:mathadd($input:x, $input:y)" /></sum><diff><xsl:value-of select="usercsharp:mathsubtract($input:x, $input:y)" /></diff><product><xsl:value-of select="usercsharp:mathmultiply($input:x, $input:y)" /></product><division><xsl:value-of select="usercsharp:mathdivide($input:x, $input:y)" /></division></ns0:root></xsl:template></xsl:stylesheet>", "contenttype": "application/xml"}, "name": "[concat(parameters('integrationaccountname'), "/map-with-params')]", "type": "microsoft.logic/integrationaccounts/maps", "apiversion": "2016-06-01", "dependson": ["[parameters('integrationaccountname')]"]}{"name": "[parameters('logicappname')]", "type": "microsoft.logic/workflows", "location": "[parameters('location')]", "tags": {"displayname": "logicapp"}, "apiversion": "2016-06-01", "properties": {"state": "enabled", "integrationaccount": {"id": "[resourceid('microsoft.logic/integrationaccounts", parameters('integrationaccountname'))]"}, "definition": {"$schema": "https://schema.management.azure.com/providers/microsoft.logic/schemas/2016-06-01/workflowdefinition.json#", "actions": {"response": {"inputs": {"body": "@body('transform_xml')", "statuscode": 200}, "runafter": {"transform_xml": ["succeeded"]}, "type": "response"}, "transform_xml": {"inputs": {"content": "@{triggerbody()}", "integrationaccount": {"map": {"name": "map-with-params"}}, "xsltparameters": {"input:x": "20", "input:y": "10"}}, "type": "xslt"}}, "contentversion": "1.0.0.0", "outputs": {}, "parameters": {}, "triggers": {"manual": {"inputs": {}, "kind": "http", "type": "request"}}}}, "dependson": ["[parameters('integrationaccountname')]"]}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2015-06-15", "type": "microsoft.compute/availabilitysets", "name": "[variables('ossavailabilitysetsettings').name]", "location": "[parameters('location')]", "sku": {"name": "aligned"}, "properties": {"platformfaultdomaincount": "[variables('ossavailabilitysetsettings').faultdomaincount]", "platformupdatedomaincount": "[variables('ossavailabilitysetsettings').updatedomaincount]"}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"name": "[parameters('dscpullsrvname')]", "type": "microsoft.compute/virtualmachines", "location": "[parameters('location')]", "apiversion": "2020-12-01", "dependson": ["[resourceid('microsoft.network/networkinterfaces/", variables('dscpullsrvnicname'))]"], "tags": {"displayname": "dscpullsrv"}, "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[parameters('dscpullsrvname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[variables('windowsosversion')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('dscpullsrvname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('dscpullsrvnicname'))]"}]}}, "resources": [{"name": "deploydscpullserver", "type": "extensions", "location": "[parameters('location')]", "apiversion": "2020-12-01", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", parameters('dscpullsrvname'))]"], "tags": {"displayname": "deploydscpullserver"}, "properties": {"publisher": "microsoft.powershell", "type": "dsc", "typehandlerversion": "2.19", "autoupgrademinorversion": true, "settings": {"modulesurl": "[variables('deploydscpullserverconfigurationfile')]", "configurationfunction": "[variables('deploydscpullserverconfigurationfunction')]"}}}]}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2017-03-30", "type": "microsoft.compute/virtualmachines", "name": "[variables('vmname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts/", parameters('storageaccountnameprefix'))]", "[resourceid('microsoft.network/networkinterfaces/", variables('nicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[parameters('ubuntuosversion')]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(variables('vmname'),"/newuserscript')]", "apiversion": "2015-06-15", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", variables('vmname'))]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"fileuris": ["[uri(parameters('_artifactslocation'), concat('install_lamp.sh", parameters('_artifactslocationsastoken')))]"]}, "protectedsettings": {"commandtoexecute": "[concat('sh install_lamp.sh ", parameters('mysqlpassword'))]"}}}
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('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[variables('ubuntuosversion')]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(variables('vmname'),"/newuserscript')]", "apiversion": "2020-12-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", variables('vmname'))]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"fileuris": ["[uri(parameters('_artifactslocation'), concat('scripts/",variables('installscriptname'), parameters('_artifactslocationsastoken')))]"]}, "protectedsettings": {"commandtoexecute": "[variables('installcommand')]"}}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "apiversion": "2020-08-01", "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "[variables('subnetprefix')]"}}]}}{"type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "apiversion": "2019-04-01", "properties": {"publicipallocationmethod": "dynamic", "dnssettings": {"domainnamelabel": "[parameters('vmssname')]"}}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-11-01", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["10.0.0.0/16"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "10.0.0.0/24"}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/publicipaddresses", "apiversion": "2020-06-01", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipaddressversion": "ipv4", "publicipallocationmethod": "static", "idletimeoutinminutes": 4, "dnssettings": {"domainnamelabel": "[parameters('dnslabelprefix')]"}}}{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "net", "location": "[parameters('location')]", "tags": {"displayname": "net"}, "properties": {"addressspace": {"addressprefixes": ["[variables('netprefix')]"]}, "subnets": [{"name": "[variables('netsubnet1name')]", "properties": {"addressprefix": "[variables('netsubnet1prefix')]"}}, {"name": "[variables('netsubnet2name')]", "properties": {"addressprefix": "[variables('netsubnet2prefix')]"}}]}}{"type": "microsoft.network/networkinterfaces", "apiversion": "2020-06-01", "name": "[variables('vmnicname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks/", "net')]", "[resourceid('microsoft.network/publicipaddresses/", variables('publicipaddressname'))]"], "tags": {"displayname": "vmnic"}, "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"publicipaddress": {"id": "[resourceid ('microsoft.network/publicipaddresses/", variables('publicipaddressname'))]"}, "privateipallocationmethod": "dynamic", "subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets/", "net", variables('netsubnet1name'))]"}}}]}}
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')]"}}]}}
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", "sku": {"name": "[parameters('sku')]", "capacity": 1}, "name": "[variables('hostingplanname')]", "apiversion": "2020-06-01", "location": "[parameters('location')]", "properties": {}}{"type": "microsoft.web/sites", "name": "[variables('sitename')]", "apiversion": "2020-06-01", "location": "[parameters('location')]", "properties": {"name": "[variables('sitename')]", "serverfarmid": "[resourceid('microsoft.web/serverfarms/", variables('hostingplanname'))]", "siteconfig": {"localmysqlenabled": true, "appsettings": [{"name": "website_mysql_enabled", "value": "1"}, {"name": "website_mysql_general_log", "value": "0"}, {"name": "website_mysql_slow_query_log", "value": "0"}, {"name": "website_mysql_arguments", "value": "--max_allowed_packet=16m"}]}}, "resources": [{"type": "sourcecontrols", "name": "web", "apiversion": "2020-06-01", "properties": {"repourl": "[parameters('repourl')]", "branch": "[parameters('branch')]", "ismanualintegration": true}, "dependson": ["[resourceid('microsoft.web/sites", variables('sitename'))]"]}, {"type": "config", "name": "web", "apiversion": "2020-06-01", "properties": {"phpversion": "7.0"}, "dependson": ["[resourceid('microsoft.web/sites/", variables('sitename'))]"]}], "dependson": ["[resourceid('microsoft.web/serverfarms/", variables('hostingplanname'))]"]}
This template creates a Windows VM and runs a PowerShell script using the custom script extension. It also discovers the Storage Account keys
{"apiversion": "2020-12-01", "type": "microsoft.compute/virtualmachines", "name": "[variables('vmname')]", "location": "[parameters('location')]", "dependson": ["[variables('nicname')]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "microsoftwindowsserver", "offer": "windowsserver", "sku": "2016-datacenter", "version": "latest"}, "osdisk": {"createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}}, "resources": [{"type": "extensions", "name": "customscriptextension", "apiversion": "2020-12-01", "location": "[parameters('location')]", "dependson": ["[variables('vmname')]"], "properties": {"publisher": "microsoft.compute", "type": "customscriptextension", "typehandlerversion": "1.8", "autoupgrademinorversion": true, "settings": {"fileuris": ["[uri(parameters('_artifactslocation'), concat(variables('scriptfolder'),"/",variables('scriptfilename'), parameters('_artifactslocationsastoken')))]"], "commandtoexecute": "[concat('powershell -executionpolicy unrestricted -file ", variables('scriptfolder'), "/", variables('scriptfilename'), " ", variables('scriptparameters'))]"}, "protectedsettings": {"storageaccountname": "[parameters('customscriptstorageaccountname')]", "storageaccountkey": "[listkeys(variables('accountid'),"2021-01-01').keys[0].value]"}}}]}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/networksecuritygroups", "name": "[concat(variables('nsgname'))]", "apiversion": "2020-11-01", "location": "[parameters('location')]", "condition": "[equals(length(parameters('subnetid')), 0)]", "properties": {"securityrules": "[variables('selectedsecurityrules')]"}}{"type": "microsoft.network/virtualnetworks", "name": "[variables('vnetname')]", "apiversion": "2020-11-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": "2020-11-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('vnetname'))]"], "properties": {"ipconfigurations": "[variables('selectedipconfig')]"}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2019-12-01", "type": "microsoft.compute/proximityplacementgroups", "name": "[variables('ppg_name')]", "location": "[parameters('location')]"}{"type": "microsoft.compute/virtualmachines", "apiversion": "2019-07-01", "name": "[variables('ansible_vm_name')]", "location": "[parameters('location')]", "identity": {"type": "systemassigned"}, "dependson": ["[resourceid('microsoft.network/networkinterfaces", variables('ansible_nw_interface'))]", "[resourceid('microsoft.storage/storageaccounts", variables('diagnostic_storagegroup_name'))]", "[resourceid('microsoft.keyvault/vaults",variables('key_vault_name'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('ansiblevmsize')]"}, "storageprofile": {"imagereference": {"publisher": "redhat", "offer": "rhel", "sku": "7.7", "version": "latest"}, "osdisk": {"ostype": "linux", "name": "[concat(variables('ansible_vm_name'),"-osdisk')]", "createoption": "fromimage", "caching": "readwrite", "manageddisk": {"storageaccounttype": "premium_lrs"}, "disksizegb": 64}, "datadisks": [{"name": "[concat(variables('ansible_vm_name'),"-playbook')]", "disksizegb": 50, "lun": 0, "createoption": "empty"}]}, "osprofile": {"computername": "[variables('ansible_vm_name')]", "adminusername": "[parameters('primaryusername')]", "linuxconfiguration": {"disablepasswordauthentication": true, "ssh": {"publickeys": [{"path": "[concat('/home/", parameters('primaryusername'), "/.ssh/authorized_keys')]", "keydata": "[parameters('sshpublickey')]"}]}}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('ansible_nw_interface'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('diagnostic_storagegroup_name')).primaryendpoints.blob]"}}, "proximityplacementgroup": {"id": "[resourceid('microsoft.compute/proximityplacementgroups",variables('ppg_name'))]"}}}{"type": "microsoft.compute/virtualmachines", "apiversion": "2019-07-01", "name": "[variables('rdp_vm_name')]", "location": "[parameters('location')]", "identity": {"type": "systemassigned"}, "dependson": ["[resourceid('microsoft.network/networkinterfaces", variables('rdp_nw_interface'))]", "[resourceid('microsoft.storage/storageaccounts", variables('diagnostic_storagegroup_name'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('windowsrdpvmsize')]"}, "storageprofile": {"imagereference": {"publisher": "microsoftwindowsserver", "offer": "windowsserver", "sku": "[variables('rdp_os_version')]", "version": "latest"}, "osdisk": {"createoption": "fromimage"}}, "osprofile": {"computername": "[variables('rdp_vm_name')]", "adminusername": "[parameters('primaryusername')]", "adminpassword": "[parameters('sasexternalpassword')]"}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('rdp_nw_interface'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('diagnostic_storagegroup_name')).primaryendpoints.blob]"}}, "proximityplacementgroup": {"id": "[resourceid('microsoft.compute/proximityplacementgroups",variables('ppg_name'))]"}}}{"type": "microsoft.compute/virtualmachines", "apiversion": "2019-07-01", "name": "[variables('meta_vm_name')]", "location": "[parameters('location')]", "identity": {"type": "systemassigned"}, "dependson": ["[resourceid('microsoft.network/networkinterfaces", variables('meta_nw_interface'))]", "[resourceid('microsoft.storage/storageaccounts", variables('diagnostic_storagegroup_name'))]"], "tags": "[variables('sas94vm_tags')]", "properties": {"hardwareprofile": {"vmsize": "[parameters('sasmetavmsize')]"}, "storageprofile": {"imagereference": {"publisher": "redhat", "offer": "rhel", "sku": "7.7", "version": "latest"}, "osdisk": {"ostype": "linux", "name": "[concat(variables('meta_vm_name'),"-osdisk')]", "createoption": "fromimage", "caching": "readwrite", "manageddisk": {"storageaccounttype": "premium_lrs"}, "disksizegb": "[variables('sas_osdisk_size')]"}, "datadisks": [{"name": "[concat(variables('meta_vm_name'),"-opt-sas')]", "disksizegb": "[variables('sas_opt_sas_disk_size')]", "lun": 0, "createoption": "empty"}]}, "osprofile": {"computername": "[variables('meta_vm_name')]", "adminusername": "[parameters('primaryusername')]", "linuxconfiguration": {"disablepasswordauthentication": true, "ssh": {"publickeys": [{"path": "[concat('/home/", parameters('primaryusername'), "/.ssh/authorized_keys')]", "keydata": "[parameters('sshpublickey')]"}]}}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('meta_nw_interface'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('diagnostic_storagegroup_name')).primaryendpoints.blob]"}}, "proximityplacementgroup": {"id": "[resourceid('microsoft.compute/proximityplacementgroups",variables('ppg_name'))]"}}}{"type": "microsoft.compute/virtualmachines", "apiversion": "2019-07-01", "name": "[variables('compute_vm_name')]", "location": "[parameters('location')]", "identity": {"type": "systemassigned"}, "dependson": ["[resourceid('microsoft.network/networkinterfaces", variables('compute_nw_interface'))]", "[resourceid('microsoft.storage/storageaccounts", variables('diagnostic_storagegroup_name'))]"], "tags": "[variables('sas94vm_tags')]", "properties": {"hardwareprofile": {"vmsize": "[parameters('sascomputevmsize')]"}, "storageprofile": {"imagereference": {"publisher": "redhat", "offer": "rhel", "sku": "7.7", "version": "latest"}, "osdisk": {"ostype": "linux", "name": "[concat(variables('compute_vm_name'),"-osdisk')]", "createoption": "fromimage", "caching": "readwrite", "manageddisk": {"storageaccounttype": "premium_lrs"}, "disksizegb": "[variables('sas_osdisk_size')]"}, "datadisks": [{"name": "[concat(variables('compute_vm_name'),"-opt-sas')]", "disksizegb": "[variables('sas_opt_sas_disk_size')]", "lun": 0, "createoption": "empty"}, {"name": "[concat(variables('compute_vm_name'),"-sasdata')]", "disksizegb": "[parameters('sasdatastorage')]", "lun": 1, "createoption": "empty"}]}, "osprofile": {"computername": "[variables('compute_vm_name')]", "adminusername": "[parameters('primaryusername')]", "customdata": "[base64(variables('custom_data_sas'))]", "linuxconfiguration": {"disablepasswordauthentication": true, "ssh": {"publickeys": [{"path": "[concat('/home/", parameters('primaryusername'), "/.ssh/authorized_keys')]", "keydata": "[parameters('sshpublickey')]"}]}}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('compute_nw_interface'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(variables('diagnostic_storagegroup_name')).primaryendpoints.blob]"}}, "proximityplacementgroup": {"id": "[resourceid('microsoft.compute/proximityplacementgroups",variables('ppg_name'))]"}}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2015-05-01-preview", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts/", parameters('newstorageaccountname'))]", "[resourceid('microsoft.network/networkinterfaces/", variables('nicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[parameters('vmname')]", "adminusername": "[parameters('username')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[parameters('ubuntuosversion')]", "version": "latest"}, "osdisk": {"name": "osdisk1", "vhd": {"uri": "[uri(reference(resourceid('microsoft.storage/storageaccounts", parameters('newstorageaccountname')), "2021-01-01').primaryendpoints["blob"], concat('/", variables('vmstorageaccountcontainername'),"/",variables('osdiskname'),".vhd'))]"}, "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",variables('nicname'))]"}]}}}{"apiversion": "2015-05-01-preview", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'),"/enabledsc')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", parameters('vmname'))]"], "properties": {"publisher": "microsoft.ostcextensions", "type": "dscforlinux", "typehandlerversion": "2.0", "settings": {"mode": "[parameters('mode')]", "fileuri": "[parameters('fileuri')]"}, "protectedsettings": {"registrationurl": "[parameters('registrationurl')]", "registrationkey": "[parameters('registrationkey')]"}}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-05-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic", "dnssettings": {"domainnamelabel": "[concat('acisite", uniquestring(resourcegroup().id))]"}}}{"type": "microsoft.network/virtualnetworks", "name": "[parameters('vnetname')]", "apiversion": "2020-05-01", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('vnetaddressprefix')]"]}, "subnets": [{"name": "[parameters('subnet1name')]", "properties": {"addressprefix": "[parameters('subnet1addressprefix')]", "serviceendpoints": [{"service": "microsoft.storage", "locations": ["[parameters('location')]"]}], "delegations": [{"name": "delegationservice", "properties": {"servicename": "microsoft.containerinstance/containergroups"}}]}}, {"name": "[parameters('subnet2name')]", "properties": {"addressprefix": "[parameters('subnet2addressprefix')]"}}]}}{"name": "[variables('networkprofilename')]", "type": "microsoft.network/networkprofiles", "apiversion": "2020-05-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks", parameters('vnetname'))]"], "properties": {"containernetworkinterfaceconfigurations": [{"name": "[variables('interfaceconfigname')]", "properties": {"ipconfigurations": [{"name": "[variables('interfaceipconfig')]", "properties": {"subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", parameters('vnetname'), parameters('subnet1name'))]"}}}]}}]}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"name": "[variables('vmname')]", "type": "microsoft.compute/virtualmachines", "location": "[parameters('location')]", "apiversion": "2020-12-01", "dependson": ["[variables('vmnicname')]"], "tags": {"displayname": "vm01"}, "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[variables('vmname')]", "adminusername": "[parameters('vmadminusername')]", "adminpassword": "[parameters('vmadminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "[variables('vmimagepublisher')]", "offer": "[variables('vmimageoffer')]", "sku": "[parameters('vmvisualstudioversion')]", "version": "latest"}, "osdisk": {"caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "standardssd_lrs"}}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('vmnicname'))]"}]}}, "resources": [{"name": "setupchocolatey", "type": "extensions", "location": "[parameters('location')]", "apiversion": "2020-12-01", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", variables('vmname'))]"], "tags": {"displayname": "setupchocolatey"}, "properties": {"publisher": "microsoft.compute", "type": "customscriptextension", "typehandlerversion": "1.9", "autoupgrademinorversion": true, "settings": {"fileuris": ["[uri(parameters('_artifactslocation'), concat('scripts/setupchocolatey.ps1", parameters('_artifactslocationsastoken')))]"], "commandtoexecute": "[concat('powershell -executionpolicy bypass -file scripts/setupchocolatey.ps1 -chocopackages ",parameters('chocopackages'))]"}}}]}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"type": "microsoft.resources/deployments", "apiversion": "2019-10-01", "name": "ansibleroleassignment", "dependson": ["[resourceid('microsoft.compute/virtualmachines", variables('ansible_vm_name'))]", "[resourceid('microsoft.resources/deployments","ansibleaccesspolicy')]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('role_assignment_template')]"}, "parameters": {"roleassignmentname": {"value": "[guid(resourceid('microsoft.compute/virtualmachines", variables('ansible_vm_name')), variables('reader_role'), variables('rbacprincipalid'))]"}, "roledefinitionid": {"value": "[variables('reader_role')]"}, "principalid": {"value": "[reference(resourceid('microsoft.compute/virtualmachines",variables('ansible_vm_name')),"2019-07-01","full').identity.principalid]"}}}}{"type": "microsoft.resources/deployments", "apiversion": "2019-10-01", "name": "ansibleaccesspolicy", "dependson": ["[resourceid('microsoft.compute/virtualmachines", variables('ansible_vm_name'))]", "[resourceid('microsoft.keyvault/vaults", variables('key_vault_name'))]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('access_policy_template')]"}, "parameters": {"keyvaultname": {"value": "[variables('key_vault_name')]"}, "tenantid": {"value": "[variables('tenantid')]"}, "objectid": {"value": "[reference(resourceid('microsoft.compute/virtualmachines",variables('ansible_vm_name')),"2019-12-01", "full').identity.principalid]"}, "secretspermissions": {"value": "[variables('secretspermissions')]"}, "keyspermissions": {"value": "[variables('keyspermissions')]"}, "certificatespermissions": {"value": "[variables('certificatespermissions')]"}}}}
Create a VM from a Windows Image with N Empty Data Disks
{"type": "microsoft.compute/virtualmachines", "apiversion": "2021-07-01", "name": "[parameters('virtualmachinename')]", "location": "[parameters('location')]", "properties": {"hardwareprofile": {"vmsize": "[parameters('virtualmachinesize')]"}, "osprofile": {"computername": "[parameters('virtualmachinename')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"copy": [{"name": "datadisks", "count": "[length(range(0, parameters('datadiskscount')))]", "input": {"name": "[format('{0}-datadisk{1}", parameters('virtualmachinename'), range(0, parameters('datadiskscount'))[copyindex('datadisks')])]", "disksizegb": "[parameters('datadisksize')]", "lun": "[range(0, parameters('datadiskscount'))[copyindex('datadisks')]]", "createoption": "empty", "manageddisk": {"storageaccounttype": "[parameters('disktype')]"}}}], "osdisk": {"ostype": "windows", "name": "[variables('osdiskname')]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "[parameters('disktype')]"}, "disksizegb": 128}, "imagereference": {"publisher": "microsoftwindowsserver", "offer": "windowsserver", "sku": "[parameters('windowsosversion')]", "version": "latest"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('networkinterfacename'))]"}]}}, "dependson": ["[resourceid('microsoft.network/networkinterfaces", variables('networkinterfacename'))]"]}
This template uses Azure Managed Identity to assign access to Azure Maps. See more at https://aka.ms/amauth
{"condition": "[equals(parameters('neworexistingrole'),"new')]", "type": "microsoft.authorization/roledefinitions", "apiversion": "2018-07-01", "name": "[variables('roledefinitionid')]", "properties": {"rolename": "[parameters('customrolename')]", "description": "role definition for ilm specific ad application to access a storage account", "type": "customrole", "iscustom": true, "permissions": [{"actions": ["microsoft.storage/storageaccounts/blobservices/containers/write", "microsoft.storage/storageaccounts/blobservices/containers/delete"], "dataactions": ["microsoft.storage/storageaccounts/blobservices/containers/blobs/read", "microsoft.storage/storageaccounts/blobservices/containers/blobs/write", "microsoft.storage/storageaccounts/blobservices/containers/blobs/delete"]}], "assignablescopes": ["[subscriptionresourceid('microsoft.resources/resourcegroups", resourcegroup().name)]"]}}
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": "dynamic"}}{"apiversion": "2020-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')]"}}]}}
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", parameters('nicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[parameters('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "[parameters('imagepublisher')]", "offer": "[parameters('imageoffer')]", "sku": "[parameters('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('vmname'), "_osdisk')]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "[parameters('storagetype')]"}}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",parameters('nicname'))]"}]}}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"apiversion": "2020-06-01", "type": "microsoft.compute/availabilitysets", "location": "[parameters('location')]", "name": "gw-availabilityset", "properties": {"platformupdatedomaincount": 20, "platformfaultdomaincount": 2}, "sku": {"name": "aligned"}}{"apiversion": "2020-06-01", "type": "microsoft.compute/availabilitysets", "location": "[parameters('location')]", "name": "cb-availabilityset", "properties": {"platformupdatedomaincount": 20, "platformfaultdomaincount": 2}, "sku": {"name": "aligned"}}{"apiversion": "2020-06-01", "type": "microsoft.compute/availabilitysets", "location": "[parameters('location')]", "name": "[concat(parameters('rdshnamingprefix'), "availabilityset')]", "properties": {"platformupdatedomaincount": 20, "platformfaultdomaincount": 2}, "sku": {"name": "aligned"}}{"apiversion": "2020-06-01", "type": "microsoft.compute/virtualmachines", "name": "gw-vm", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/availabilitysets", "gw-availabilityset')]", "[resourceid('microsoft.network/networkinterfaces", "gw-nic')]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('rdshvmsize')]"}, "availabilityset": {"id": "[resourceid('microsoft.compute/availabilitysets", "gw-availabilityset')]"}, "osprofile": {"computername": "gateway", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[parameters('imagesku')]", "version": "latest"}, "osdisk": {"name": "gw_osdisk", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "standardssd_lrs"}}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces","gw-nic')]"}]}}, "resources": [{"apiversion": "2020-06-01", "type": "extensions", "name": "gateway", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines", "gw-vm')]"], "properties": {"publisher": "microsoft.powershell", "type": "dsc", "typehandlerversion": "2.11", "autoupgrademinorversion": true, "settings": {"modulesurl": "[uri(parameters('_artifactslocation'),concat('dsc/configuration.zip", parameters('_artifactslocationsastoken')))]", "configurationfunction": "configuration.ps1\\gateway", "properties": {"domainname": "[parameters('addomainname')]", "admincreds": {"username": "[parameters('adminusername')]", "password": "privatesettingsref:adminpassword"}}}, "protectedsettings": {"items": {"adminpassword": "[parameters('adminpassword')]"}}}}]}{"apiversion": "2020-06-01", "type": "microsoft.compute/virtualmachines", "name": "[concat(parameters('rdshnamingprefix'), copyindex())]", "location": "[parameters('location')]", "copy": {"name": "rdsh-vm-loop", "count": "[parameters('numberofrdshinstances')]"}, "dependson": ["[resourceid('microsoft.compute/availabilitysets", concat(parameters('rdshnamingprefix'), "availabilityset'))]", "[resourceid('microsoft.network/networkinterfaces", concat(parameters('rdshnamingprefix'), copyindex(), "-nic'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('rdshvmsize')]"}, "availabilityset": {"id": "[resourceid('microsoft.compute/availabilitysets", concat(parameters('rdshnamingprefix'), "availabilityset'))]"}, "osprofile": {"computername": "[concat(parameters('rdshnamingprefix'), copyindex())]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[parameters('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('rdshnamingprefix'), copyindex(),"-osdisk')]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "standardssd_lrs"}}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", concat(parameters('rdshnamingprefix'), copyindex(), "-nic'))]"}]}}, "resources": [{"apiversion": "2020-06-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('rdshnamingprefix'), copyindex(),"/sessionhost')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines", concat(parameters('rdshnamingprefix'), copyindex()))]"], "properties": {"publisher": "microsoft.powershell", "type": "dsc", "typehandlerversion": "2.11", "autoupgrademinorversion": true, "settings": {"modulesurl": "[uri(parameters('_artifactslocation'),concat('dsc/configuration.zip", parameters('_artifactslocationsastoken')))]", "configurationfunction": "configuration.ps1\\sessionhost", "properties": {"domainname": "[parameters('addomainname')]", "admincreds": {"username": "[parameters('adminusername')]", "password": "privatesettingsref:adminpassword"}}}, "protectedsettings": {"items": {"adminpassword": "[parameters('adminpassword')]"}}}}]}
This template creates a VMSS placed in separate Availability Zones with a load balancer.
{"type": "microsoft.compute/virtualmachinescalesets", "apiversion": "2020-12-01", "name": "[concat('myscaleset","-zone", variables('myzones')[copyindex()])]", "location": "[parameters('location')]", "zones": ["[variables('myzones')[copyindex()]]"], "copy": {"name": "vmsscount", "count": "[length(variables('myzones'))]"}, "dependson": ["[variables('virtualnetworkname')]", "[variables('lbname')]", "[variables('networksecuritygroupname')]"], "sku": {"name": "[parameters('vmsssku')]", "capacity": "[parameters('numberofvms')]"}, "properties": {"singleplacementgroup": true, "upgradepolicy": {"mode": "manual"}, "virtualmachineprofile": {"storageprofile": {"osdisk": {"createoption": "fromimage"}, "imagereference": "[variables('linuximage')]", "datadisks": [{"lun": 1, "createoption": "empty", "disksizegb": 50}]}, "osprofile": {"computernameprefix": "vm", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "customdata": "[base64(variables('myzones')[copyindex()])]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "networkprofile": {"networkinterfaceconfigurations": [{"name": "mynic", "properties": {"networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}, "primary": true, "ipconfigurations": [{"name": "myipconfig", "properties": {"subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('virtualnetworkname'), variables('subnetname'))]"}, "loadbalancerbackendaddresspools": [{"id": "[resourceid('microsoft.network/loadbalancers/backendaddresspools", variables('lbname'), variables('lbbe'))]"}], "loadbalancerinboundnatpools": [{"id": "[resourceid('microsoft.network/loadbalancers/inboundnatpools", variables('lbname'), concat(variables('lbnat'), copyindex(1)))]"}]}}]}}]}, "extensionprofile": {"extensions": [{"name": "appinstall", "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"fileuris": ["https://raw.githubusercontent.com/azure-samples/compute-automation-configurations/master/automate_nginx.sh"], "commandtoexecute": "bash automate_nginx.sh"}}}]}}}}
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"apiversion": "2017-12-01", "type": "microsoft.compute/availabilitysets", "name": "[variables('availabilitysetname')]", "comments": "the availability set ensures at least one kemp loadmaster will be available during either a planned or unplanned maintenance event.", "location": "[parameters('location')]", "sku": {"name": "aligned"}, "properties": {"platformfaultdomaincount": 2, "platformupdatedomaincount": 5}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"name": "shared", "type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('sharedtemplateurl')]", "contentversion": "1.0.0.0"}, "parameters": {"networksettings": {"value": "[variables('networksettings')]"}, "namespace": {"value": "[variables('namespace')]"}, "zabbixserveripaddress": {"value": "[parameters('zabbixserveripaddress')]"}, "location": {"value": "[parameters('location')]"}}}}{"name": "configsecondarynode1", "type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "dependson": ["[resourceid('microsoft.resources/deployments/", "shared')]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('configsecondarytemplateurl')]", "contentversion": "1.0.0.0"}, "parameters": {"adminusername": {"value": "[parameters('adminusername')]"}, "namespace": {"value": "[variables('namespace')]"}, "vmbasename": {"value": "[concat('configsecondary", "1')]"}, "subnet": {"value": "[variables('networksettings').subnet.dse]"}, "vmsize": {"value": "[parameters('confignodevmsize')]"}, "staticip": {"value": "[variables('networksettings').statics.configsecondaryip1]"}, "zabbixserveripaddress": {"value": "[parameters('zabbixserveripaddress')]"}, "ossettings": {"value": "[variables('configsecondaryossettings')]"}, "authenticationtype": {"value": "[parameters('authenticationtype')]"}, "adminpasswordorkey": {"value": "[parameters('adminpasswordorkey')]"}, "location": {"value": "[parameters('location')]"}}}}
Joins a Windows virtual machine into an AD Domain
{"comments": "join domain - jsonaddomainextension", "apiversion": "2015-06-15", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(trim(variables('vmlistarray')[copyindex()]),"/joindomain')]", "location": "[parameters('location')]", "copy": {"name": "vmdomainjoincopy", "count": "[length(variables('vmlistarray'))]"}, "properties": {"publisher": "microsoft.compute", "type": "jsonaddomainextension", "typehandlerversion": "1.3", "autoupgrademinorversion": true, "settings": {"name": "[parameters('domainfqdn')]", "user": "[parameters('domainjoinusername')]", "restart": "true", "options": "[variables('domainjoinoptions')]", "oupath": "[parameters('oupath')]"}, "protectedsettings": {"password": "[parameters('domainjoinuserpassword')]"}}}
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')]"}}{"condition": "[empty(parameters('subnetid'))]", "type": "microsoft.network/virtualnetworks", "apiversion": "2020-04-01", "name": "[variables('vnetname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups", variables('nsgname'))]"], "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'))]"}}}]}}{"condition": "[empty(parameters('subnetid'))]", "type": "microsoft.network/publicipaddresses", "apiversion": "2020-04-01", "name": "[concat(variables('fspublicipname'), "-", copyindex())]", "dependson": ["[resourceid('microsoft.network/virtualnetworks", variables('vnetname'))]"], "location": "[parameters('location')]", "copy": {"name": "piploop", "count": "[variables('fsvmcount')]"}, "properties": {"publicipallocationmethod": "dynamic"}}{"condition": "[variables('needslb')]", "type": "microsoft.network/loadbalancers", "apiversion": "2020-04-01", "name": "[variables('fsloadbalancername')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks", variables('vnetname'))]"], "properties": {"frontendipconfigurations": "[variables('frontendipconfigurations').frontendipconfigurations]", "backendaddresspools": "[variables('backendaddresspools').backendaddresspools]", "loadbalancingrules": "[variables('loadbalancingrules')]", "probes": "[variables('probes').probes]"}}{"type": "microsoft.network/networkinterfaces", "apiversion": "2020-04-01", "name": "[concat(variables('fsnicname'), "-", copyindex())]", "location": "[parameters('location')]", "copy": {"name": "nicloop", "count": "[variables('fsvmcount')]"}, "dependson": ["piploop", "[resourceid('microsoft.network/virtualnetworks", variables('vnetname'))]", "[resourceid('microsoft.network/loadbalancers", variables('fsloadbalancername'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": "[if(equals(length(parameters(\"subnetid\')), 0), json(concat(\"{"id": "\", resourceid(\"microsoft.network/publicipaddresses\", concat(variables(\"fspublicipname\'), \"-\", copyindex())) ,\""}\')), json(\"null\'))]", "subnet": {"id": "[variables('selectedsubnetid')]"}, "loadbalancerbackendaddresspools": "[if(variables('needslb'), variables('nicbackaddresspools').nicbackaddresspools, json('null'))]"}}], "enableacceleratednetworking": "[variables('usefastnetwork')]"}}
Storage Account with Storage Service Encryption and a blob deletion retention policy
{"type": "microsoft.storage/storageaccounts", "apiversion": "2021-02-01", "name": "[variables('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "[variables('storageaccounttype')]"}, "kind": "storagev2", "properties": {"encryption": {"services": {"blob": {"enabled": true}, "file": {"enabled": true}}, "keysource": "microsoft.storage"}, "supportshttpstrafficonly": true}}
Establish connection to a VNET via an ExpressRoute circuit
{"name": "[parameters('virtualnetworkname')]", "type": "microsoft.network/virtualnetworks", "apiversion": "2020-05-01", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('addressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetprefix')]"}}]}}
Storage Account with Storage Service Encryption and a blob deletion retention policy
{"apiversion": "2019-06-01", "type": "microsoft.storage/storageaccounts", "name": "[variables('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"comments": "resource to track chef automate installations using this template", "type": "microsoft.resources/deployments", "name": "[concat('pid-", variables('tags').provider)]", "apiversion": "2017-05-10", "properties": {"mode": "incremental", "template": {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymenttemplate.json#", "contentversion": "1.0.0.0", "resources": []}}}{"name": "keyvaultresource", "type": "microsoft.resources/deployments", "apiversion": "2015-01-01", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('keyvaultresourcesurl')]", "contentversion": "1.0.0.0"}, "parameters": {"keyvaultsettings": {"value": "[variables('keyvaultsettings')]"}}}}{"name": "manageddisksresource", "type": "microsoft.resources/deployments", "apiversion": "2015-01-01", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('manageddisksresourcesurl')]", "contentversion": "1.0.0.0"}, "parameters": {"computesettings": {"value": "[variables('computesettings')]"}}}}{"name": "diagnosticstorageaccountsresource", "type": "microsoft.resources/deployments", "apiversion": "2015-01-01", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('diagnosticstorageaccountresourcesurl')]", "contentversion": "1.0.0.0"}, "parameters": {"storagesettings": {"value": "[variables('storagesettings')]"}}}}{"name": "availabilitysetsresource", "type": "microsoft.resources/deployments", "apiversion": "2015-01-01", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('availabilitysetsresourcesurl')]", "contentversion": "1.0.0.0"}, "parameters": {"computesettings": {"value": "[variables('computesettings')]"}}}}{"name": "publicipaddressesresource", "type": "microsoft.resources/deployments", "apiversion": "2015-01-01", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('publicipaddressesresourcesurl')]", "contentversion": "1.0.0.0"}, "parameters": {"networksettings": {"value": "[variables('networksettings')]"}}}}{"name": "networksecuritygroupsresource", "type": "microsoft.resources/deployments", "apiversion": "2015-01-01", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('networksecuritygroupsresourcesurl')]", "contentversion": "1.0.0.0"}, "parameters": {"networksettings": {"value": "[variables('networksettings')]"}}}}{"name": "virtualnetworksresource", "type": "microsoft.resources/deployments", "apiversion": "2015-01-01", "dependson": ["networksecuritygroupsresource"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('virtualnetworksresourcesurl')]", "contentversion": "1.0.0.0"}, "parameters": {"networksettings": {"value": "[variables('networksettings')]"}}}}{"name": "fe-loadbalancersresource", "type": "microsoft.resources/deployments", "apiversion": "2015-01-01", "dependson": ["publicipaddressesresource"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('fe-loadbalancersresourcesurl')]", "contentversion": "1.0.0.0"}, "parameters": {"networksettings": {"value": "[variables('networksettings')]"}, "felbpublicipaddressid": {"value": "[variables('felbpublicipaddressid')]"}}}}{"name": "fe-networkinterfacesresource", "type": "microsoft.resources/deployments", "apiversion": "2015-01-01", "dependson": ["fe-loadbalancersresource", "virtualnetworksresource", "networksecuritygroupsresource"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('fe-networkinterfacesresourcesurl')]", "contentversion": "1.0.0.0"}, "parameters": {"networksettings": {"value": "[variables('networksettings')]"}, "fesubnetref": {"value": "[variables('fesubnetref')]"}}}}{"name": "be-networkinterfacesresource", "type": "microsoft.resources/deployments", "apiversion": "2015-01-01", "dependson": ["virtualnetworksresource", "networksecuritygroupsresource"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('be-networkinterfacesresourcesurl')]", "contentversion": "1.0.0.0"}, "parameters": {"networksettings": {"value": "[variables('networksettings')]"}, "besubnetref": {"value": "[variables('besubnetref')]"}}}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2019-11-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic"}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"name": "[concat('clusterset", copyindex())]", "type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "copy": {"name": "deploymentloop", "count": "[parameters('numberofvmss')]"}, "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('newvnetname'))]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'), concat('nestedtemplates/base.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"vmssname": {"value": "[concat(variables('vmssprefix'), padleft(copyindex(), 2, "0'))]"}, "singleplacementgroup": {"value": "[parameters('singleplacementgroup')]"}, "instancecount": {"value": "[parameters('instancecountpervmss')]"}, "subnetid": {"value": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('newvnetname'), variables('subnetname'))]"}, "adminusername": {"value": "[parameters('adminusername')]"}, "authenticationtype": {"value": "[parameters('authenticationtype')]"}, "adminpasswordorkey": {"value": "[parameters('adminpasswordorkey')]"}, "location": {"value": "[parameters('location')]"}, "vmsssku": {"value": "[parameters('vmsssku')]"}}}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"name": "jenkins-master", "type": "microsoft.compute/virtualmachines", "apiversion": "2019-07-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces", "master-networkinterface')]"], "tags": {"displayname": "jenkins master"}, "properties": {"hardwareprofile": {"vmsize": "[parameters('master-vmsize')]"}, "osprofile": {"computername": "jenkins-master", "adminusername": "[parameters('master-username')]", "adminpassword": "[parameters('master-password')]"}, "storageprofile": {"imagereference": {"publisher": "canonical", "offer": "ubuntuserver", "sku": "18.04-lts", "version": "latest"}, "osdisk": {"name": "master-osdisk", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", "master-networkinterface')]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(resourceid('microsoft.storage/storageaccounts", tolower(parameters('storagename')))).primaryendpoints.blob]"}}}}{"name": "node-1", "type": "microsoft.compute/virtualmachines", "apiversion": "2019-07-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces", "node-1-networkinterface')]"], "tags": {"displayname": "node-1"}, "properties": {"hardwareprofile": {"vmsize": "[parameters('linux-worker-vmsize')]"}, "osprofile": {"computername": "node-1", "adminusername": "[parameters('node-username')]", "adminpassword": "[parameters('node-password')]"}, "storageprofile": {"imagereference": {"publisher": "canonical", "offer": "ubuntuserver", "sku": "18.04-lts", "version": "latest"}, "osdisk": {"name": "node-1-osdisk", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", "node-1-networkinterface')]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(resourceid('microsoft.storage/storageaccounts", tolower(parameters('storagename')))).primaryendpoints.blob]"}}}}{"name": "node-2", "type": "microsoft.compute/virtualmachines", "apiversion": "2019-07-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts", tolower(parameters('storagename')))]", "[resourceid('microsoft.network/networkinterfaces", "node-2-networkinterface')]"], "tags": {"displayname": "node-2"}, "properties": {"hardwareprofile": {"vmsize": "[parameters('win-worker-vmsize')]"}, "osprofile": {"computername": "node-2", "adminusername": "[parameters('node-username')]", "adminpassword": "[parameters('node-password')]"}, "storageprofile": {"imagereference": {"publisher": "microsoftwindowsserver", "offer": "windowsserver", "sku": "2019-datacenter-with-containers", "version": "latest"}, "osdisk": {"name": "node-2osdisk", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", "node-2-networkinterface')]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(resourceid('microsoft.storage/storageaccounts", tolower(parameters('storagename')))).primaryendpoints.blob]"}}}}{"name": "jenkins-master/installjenkins", "type": "microsoft.compute/virtualmachines/extensions", "apiversion": "2019-03-01", "location": "[parameters('location')]", "tags": {"displayname": "jenkins-master-script"}, "dependson": ["[resourceid('microsoft.compute/virtualmachines", "jenkins-master')]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"fileuris": ["[variables('scripturlmaster')]"]}, "protectedsettings": {"commandtoexecute": "sh install-jenkins.sh"}}}{"name": "node-2/customscript1", "type": "microsoft.compute/virtualmachines/extensions", "apiversion": "2019-07-01", "location": "[parameters('location')]", "tags": {"displayname": "jenkins slave for windows vm"}, "dependson": ["[resourceid('microsoft.compute/virtualmachines", "node-2')]"], "properties": {"publisher": "microsoft.compute", "type": "customscriptextension", "typehandlerversion": "1.10", "autoupgrademinorversion": true, "settings": {"fileuris": ["[variables('scripturlnode2')]"]}, "protectedsettings": {"commandtoexecute": "powershell -file win-slave.ps1"}}}{"name": "node-1/installslave", "type": "microsoft.compute/virtualmachines/extensions", "apiversion": "2019-07-01", "location": "[parameters('location')]", "tags": {"displayname": "jenkins slave for linux vm"}, "dependson": ["[resourceid('microsoft.compute/virtualmachines", "node-1')]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"fileuris": ["[variables('scripturlnode1')]"]}, "protectedsettings": {"commandtoexecute": "sh install-slave.sh"}}}
This template allows you to deploy an AKS cluster can be easily integrated with entreprise-grade devops process and fullfil the condition to be attached with Azure ML as compute target resources
{"type": "microsoft.containerinstance/containergroups", "apiversion": "2019-12-01", "name": "[variables('wordpresscontainergroupname')]", "location": "[parameters('location')]", "properties": {"containers": [{"name": "wordpress", "properties": {"image": "wordpress:4.9-apache", "ports": [{"protocol": "tcp", "port": 80}], "environmentvariables": [{"name": "wordpress_db_host", "value": "127.0.0.1:3306"}, {"name": "wordpress_db_password", "securevalue": "[parameters('mysqlpassword')]"}], "volumemounts": [{"mountpath": "/var/www/html", "name": "wordpressfile"}], "resources": {"requests": {"cpu": "[variables('cpucores')]", "memoryingb": "[variables('memoryingb')]"}}}}, {"name": "mysql", "properties": {"image": "mysql:5.6", "ports": [{"protocol": "tcp", "port": 3306}], "environmentvariables": [{"name": "mysql_root_password", "value": "[parameters('mysqlpassword')]"}], "volumemounts": [{"mountpath": "/var/lib/mysql", "name": "mysqlfile"}], "resources": {"requests": {"cpu": "[variables('cpucores')]", "memoryingb": "[variables('memoryingb')]"}}}}], "volumes": [{"azurefile": {"sharename": "[variables('wordpresssharename')]", "storageaccountkey": "[listkeys(resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname')), "2021-04-01').keys[0].value]", "storageaccountname": "[parameters('storageaccountname')]"}, "name": "wordpressfile"}, {"azurefile": {"sharename": "[variables('mysqlsharename')]", "storageaccountkey": "[listkeys(resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname')), "2021-04-01').keys[0].value]", "storageaccountname": "[parameters('storageaccountname')]"}, "name": "mysqlfile"}], "ipaddress": {"ports": [{"protocol": "tcp", "port": 80}], "type": "public", "dnsnamelabel": "[parameters('sitename')]"}, "ostype": "linux"}, "dependson": ["[resourceid('microsoft.resources/deploymentscripts", format('{0}-{1}", variables('scriptname'), variables('mysqlsharename')))]", "[resourceid('microsoft.resources/deploymentscripts", format('{0}-{1}", variables('scriptname'), variables('wordpresssharename')))]", "[resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname'))]"]}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"name": "shared", "type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('sharedtemplateurl')]", "contentversion": "1.0.0.0"}, "parameters": {"storagesettings": {"value": "[variables('tshirtsize').storage]"}, "location": {"value": "[parameters('location')]"}, "networksettings": {"value": "[variables('networksettings')]"}, "availabilitysetsettings": {"value": "[variables('availabilitysetsettings')]"}}}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-06-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]", "dnssettings": {"domainnamelabel": "[parameters('vmname')]"}}}{"apiversion": "2020-06-01", "type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('vnetaddressprefix')]"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "[variables('subnetprefix')]"}}]}}{"apiversion": "2020-06-01", "type": "microsoft.network/networkinterfaces", "name": "[variables('nicname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/publicipaddresses/", variables('publicipaddressname'))]", "[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('publicipaddressname'))]"}, "subnet": {"id": "[variables('subnetref')]"}}}]}}
Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-05-01", "type": "microsoft.network/publicipaddresses", "name": "[variables('publicipaddressname')]", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "[variables('publicipaddresstype')]"}}{"comments": "default network security group for template", "type": "microsoft.network/networksecuritygroups", "apiversion": "2020-05-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "default-allow-22", "properties": {"priority": 1000, "access": "allow", "direction": "inbound", "destinationportrange": "22", "protocol": "tcp", "sourceaddressprefix": "*", "sourceportrange": "*", "destinationaddressprefix": "*"}}]}}{"apiversion": "2020-05-01", "type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"], "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "[variables('subnetprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}}}]}}{"apiversion": "2020-05-01", "type": "microsoft.network/networkinterfaces", "name": "[variables('nicname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/publicipaddresses/", variables('publicipaddressname'))]", "[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('publicipaddressname'))]"}, "subnet": {"id": "[variables('subnetref')]"}}}]}}
Create a Redis Cache using a template. Diagnostics data for the cache is kept in a storage account.
{"type": "microsoft.cache/redis", "apiversion": "2020-06-01", "name": "[parameters('rediscachename')]", "location": "[parameters('location')]", "properties": {"enablenonsslport": "[parameters('enablenonsslport')]", "minimumtlsversion": "1.2", "sku": {"capacity": "[parameters('rediscachecapacity')]", "family": "[parameters('rediscachefamily')]", "name": "[parameters('rediscachesku')]"}}}
Establish connection to a VNET via an ExpressRoute circuit
{"condition": "[equals(parameters('virtualnetworkneworexisting'), "new')]", "type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('virtualnetworkaddressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetaddressprefix')]"}}]}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"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'))]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(variables('vmname'),"/newuserscript')]", "apiversion": "2019-12-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", variables('vmname'))]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"fileuris": ["[uri(parameters('_artifactslocation'), concat('install_wordpress.sh", parameters('_artifactslocationsastoken')))]"]}, "protectedsettings": {"commandtoexecute": "[concat('sh install_wordpress.sh ", parameters('mysqlpassword'))]"}}}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"name": "storageaccountvirtualnetworkpublicip", "type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "comments": "this resource will create storage accounts for active directory, sql server, file share witness and diagnostics. it will also create the virtual network and public ip addresses", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('configuration').storageaccountvirtualnetworkpublicip]", "contentversion": "1.0.0.0"}, "parameters": {"location": {"value": "[parameters('location')]"}, "sqlstorageaccountname": {"value": "[parameters('sqlstorageaccountname')]"}, "dcstorageaccountname": {"value": "[parameters('dcstorageaccountname')]"}, "sqlstorageaccounttype": {"value": "[parameters('sqlstorageaccounttype')]"}, "dcstorageaccounttype": {"value": "[parameters('dcstorageaccounttype')]"}, "primarydcipaddressnamewithsuffix": {"value": "[variables('primarydcipaddressnamewithsuffix')]"}, "backupdcipaddressnamewithsuffix": {"value": "[variables('backupdcipaddressnamewithsuffix')]"}, "sql1addressnamewithsuffix": {"value": "[variables('sql1addressnamewithsuffix')]"}, "sql0addressnamewithsuffix": {"value": "[variables('sql0addressnamewithsuffix')]"}, "virtualnetworkname": {"value": "[variables('virtualnetworknamewithsuffix')]"}, "virtualnetworkaddressrange": {"value": "[parameters('virtualnetworkaddressrange')]"}, "subnets": {"value": "[variables('subnets')]"}}}}
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')]"}}}{"type": "microsoft.network/networksecuritygroups", "apiversion": "2020-11-01", "name": "[parameters('nsgname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allowinternet", "properties": {"protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "internet", "access": "allow", "priority": 100, "direction": "outbound"}}]}}
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}}{"apiversion": "2017-03-30", "type": "microsoft.compute/virtualmachines", "name": "[concat('myvm", copyindex())]", "location": "[parameters('location')]", "copy": {"name": "virtualmachineloop", "count": "[parameters('numberofinstances')]"}, "dependson": ["[concat('microsoft.network/networkinterfaces/", "nic1", copyindex())]", "[concat('microsoft.network/networkinterfaces/", "nic2", copyindex())]", "[concat('microsoft.storage/storageaccounts/", parameters('newstorageaccountname'))]", "[concat('microsoft.compute/availabilitysets/", variables('availabilitysetname'))]"], "properties": {"availabilityset": {"id": "[resourceid('microsoft.compute/availabilitysets", variables('availabilitysetname'))]"}, "hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[concat('vm", copyindex())]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[variables('imagesku')]", "version": "latest"}, "osdisk": {"name": "[concat('myvm", copyindex(),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"properties": {"primary": true}, "id": "[resourceid('microsoft.network/networkinterfaces",concat('nic1", copyindex()))]"}, {"properties": {"primary": false}, "id": "[resourceid('microsoft.network/networkinterfaces",concat('nic2", copyindex()))]"}]}}}
This module creates a storageAccount resource with apiVersion 2021-01-01.
{"type": "microsoft.storage/storageaccounts", "name": "[variables('diagstorageaccountname')]", "location": "[parameters('location')]", "kind": "storage", "apiversion": "2019-06-01", "tags": {"displayname": "[variables('diagstorageaccountname')]", "app": "[variables('redhattags').app]", "version": "[variables('redhattags').version]", "platform": "[variables('redhattags').platform]"}, "sku": {"name": "standard_lrs", "tier": "standard"}}
Create a VM from a Windows Image with 4 Empty Data Disks
{"apiversion": "2017-03-30", "type": "microsoft.compute/virtualmachines", "name": "[variables('vmname')]", "location": "[variables('location')]", "dependson": ["[concat('microsoft.storage/storageaccounts/",variables('uniquestorageaccountname'))]", "[concat('microsoft.network/networkinterfaces/",variables('vmnicname'))]"], "properties": {"hardwareprofile": {"vmsize": "[variables('vmsize')]"}, "osprofile": {"computername": "[variables('vmname')]", "adminusername": "[variables('vmadminusername')]", "adminpassword": "[variables('vmadminpassword')]"}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[variables('vmossku')]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmname'),"_osdisk')]", "caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",concat(variables('vmnicname')))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(concat('microsoft.storage/storageaccounts/", variables('uniquestorageaccountname')),"2015-06-15').primaryendpoints.blob]"}}}}
Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/networksecuritygroups", "apiversion": "2019-12-01", "name": "[parameters('backendnetworksecuritygroupname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/proximityplacementgroups", parameters('proximityplacementgroupname'))]"], "properties": {}}
This template creates an Azure Event Grid custom topic and Azure Event Hubs. The event subscription sends events from the custom topic to the event hub.
{"type": "microsoft.eventgrid/topics", "apiversion": "2020-06-01", "name": "[parameters('topicname')]", "location": "[parameters('location')]"}{"scope": "[format('microsoft.eventgrid/topics/{0}", parameters('topicname'))]", "type": "microsoft.eventgrid/eventsubscriptions", "apiversion": "2020-06-01", "name": "[parameters('subscriptionname')]", "dependson": ["[resourceid('microsoft.eventgrid/topics", parameters('topicname'))]", "[resourceid('microsoft.eventhub/namespaces/eventhubs", parameters('eventhubnamespace'), parameters('eventhubname'))]"], "properties": {"destination": {"endpointtype": "eventhub", "properties": {"resourceid": "[resourceid('microsoft.eventhub/namespaces/eventhubs", parameters('eventhubnamespace'), parameters('eventhubname'))]"}}, "filter": {"issubjectcasesensitive": false}}}
This template creates a Service Bus Premium Namespace and a namespace AuthorizationRule
{"apiversion": "2018-01-01-preview", "name": "[parameters('premiumnamespacename')]", "type": "microsoft.servicebus/namespaces", "location": "[parameters('location')]", "kind": "messaging", "sku": {"name": "premium", "tier": "premium", "capacity": "[parameters('skucapacity')]"}, "properties": {"createacsnamespace": true}}{"apiversion": "2017-04-01", "name": "[variables('customsaskeyname')]", "type": "microsoft.servicebus/namespaces/authorizationrules", "dependson": ["[resourceid('microsoft.servicebus/namespaces/", parameters('premiumnamespacename'))]"], "location": "[parameters('location')]", "properties": {"rights": ["send", "listen", "manage"]}}
Enable Azure Sentinel
{"type": "microsoft.operationsmanagement/solutions", "apiversion": "2015-11-01-preview", "name": "[format('securityinsights({0})", parameters('workspacename'))]", "location": "[parameters('location')]", "properties": {"workspaceresourceid": "[resourceid('microsoft.operationalinsights/workspaces", parameters('workspacename'))]"}, "plan": {"name": "[format('securityinsights({0})", parameters('workspacename'))]", "product": "omsgallery/securityinsights", "publisher": "microsoft", "promotioncode": ""}, "dependson": ["[resourceid('microsoft.operationalinsights/workspaces", parameters('workspacename'))]"]}
This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"apiversion": "2020-06-01", "name": "fetchipaddress", "type": "microsoft.resources/deployments", "dependson": ["[variables('applicationgatewayname')]"], "properties": {"mode": "incremental", "templatelink": {"contentversion": "1.0.0.0", "uri": "[uri(parameters('_artifactslocation'), concat('fetchipaddress.json", parameters('_artifactslocationsastoken')))]"}, "parameters": {"publicipaddressid": {"value": "[resourceid('microsoft.network/publicipaddresses", variables('publicipaddressname'))]"}}}}
Storage Account with Storage Service Encryption and a blob deletion retention policy
{"type": "microsoft.storage/storageaccounts", "apiversion": "2021-02-01", "name": "[parameters('functionstorageaccountname')]", "location": "[parameters('location')]", "kind": "storagev2", "sku": {"name": "standard_lrs"}, "properties": {"networkacls": {"bypass": "none", "defaultaction": "deny"}}}
README.md exists but content is empty. Use the Edit dataset card button to edit it.
Downloads last month
0
Edit dataset card