Description
stringlengths 19
200
| IaC
stringlengths 128
8.16k
|
---|---|
This module creates a storageAccount resource with apiVersion 2021-01-01. | {"type": "microsoft.storagepool/diskpools", "apiversion": "2021-08-01", "name": "[parameters('diskpoolname')]", "sku": {"name": "[parameters('diskpoolsku')]"}, "location": "[parameters('diskpoollocation')]", "properties": {"availabilityzones": ["[parameters('diskpoolavailabilityzone')]"], "subnetid": "[variables('subnetid')]", "disks": [{"id": "[variables('diskid')]"}]}} |
This module creates a storageAccount resource with apiVersion 2021-01-01. | {"type": "microsoft.storagepool/diskpools", "apiversion": "2021-08-01", "name": "[parameters('diskpoolname')]", "sku": {"name": "[parameters('diskpoolsku')]"}, "location": "[parameters('diskpoollocation')]", "properties": {"availabilityzones": ["[parameters('diskpoolavailabilityzone')]"], "subnetid": "[variables('subnetid')]", "disks": [{"id": "[variables('diskid')]"}]}}{"type": "microsoft.storagepool/diskpools/iscsitargets", "apiversion": "2021-08-01", "name": "[format('{0}/{1}", parameters('diskpoolname'), parameters('targetname'))]", "properties": {"targetiqn": "iqn.2021-04.org.microsoft.com:target", "aclmode": "dynamic", "luns": [{"manageddiskazureresourceid": "[variables('diskid')]", "name": "lun0"}]}, "dependson": ["[resourceid('microsoft.storagepool/diskpools", parameters('diskpoolname'))]"]} |
Storage Account with Storage Service Encryption and a blob deletion retention policy | {"type": "microsoft.storagepool/diskpools", "apiversion": "2021-08-01", "name": "[parameters('diskpoolname')]", "sku": {"name": "[parameters('diskpoolsku')]"}, "location": "[parameters('diskpoollocation')]", "properties": {"availabilityzones": ["[parameters('diskpoolavailabilityzone')]"], "subnetid": "[variables('subnetid')]", "disks": [{"id": "[variables('diskid')]"}]}} |
Storage Account with Storage Service Encryption and a blob deletion retention policy | {"type": "microsoft.storagepool/diskpools", "apiversion": "2021-08-01", "name": "[parameters('diskpoolname')]", "sku": {"name": "[parameters('diskpoolsku')]"}, "location": "[parameters('diskpoollocation')]", "properties": {"availabilityzones": ["[parameters('diskpoolavailabilityzone')]"], "subnetid": "[variables('subnetid')]", "disks": [{"id": "[variables('diskid')]"}]}}{"type": "microsoft.storagepool/diskpools/iscsitargets", "apiversion": "2021-08-01", "name": "[format('{0}/{1}", parameters('diskpoolname'), parameters('targetname'))]", "properties": {"targetiqn": "iqn.2021-04.org.microsoft.com:target", "aclmode": "dynamic", "luns": [{"manageddiskazureresourceid": "[variables('diskid')]", "name": "lun0"}]}, "dependson": ["[resourceid('microsoft.storagepool/diskpools", parameters('diskpoolname'))]"]} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('vnetaddressprefix')]"]}}} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('vnetaddressprefix')]"]}}}{"type": "microsoft.network/virtualnetworks/subnets", "apiversion": "2020-06-01", "name": "[format('{0}/{1}", parameters('virtualnetworkname'), parameters('subnetname'))]", "properties": {"addressprefix": "[parameters('subnetprefix')]"}, "dependson": ["[resourceid('microsoft.network/virtualnetworks", parameters('virtualnetworkname'))]"]} |
This module creates a key resource in an existing KeyVault with apiVersion 2019-09-01. | {"type": "microsoft.keyvault/managedhsms", "apiversion": "2021-04-01-preview", "name": "[parameters('managedhsmname')]", "location": "[parameters('location')]", "sku": {"name": "standard_b1", "family": "b"}, "properties": {"enablesoftdelete": "[greater(parameters('softretentionindays'), 0)]", "softdeleteretentionindays": "[if(equals(parameters('softretentionindays'), 0), null(), parameters('softretentionindays'))]", "enablepurgeprotection": false, "tenantid": "[parameters('tenantid')]", "initialadminobjectids": "[parameters('initialadminobjectids')]", "publicnetworkaccess": "enabled", "networkacls": {"bypass": "none", "defaultaction": "allow"}}} |
This module creates a key resource in an existing KeyVault with apiVersion 2019-09-01. | {"type": "microsoft.keyvault/vaults", "apiversion": "2021-04-01-preview", "name": "[parameters('keyvaultname')]", "location": "[parameters('location')]", "properties": {"enabledfordeployment": "[parameters('enabledfordeployment')]", "enabledfortemplatedeployment": "[parameters('enabledfortemplatedeployment')]", "enabledfordiskencryption": "[parameters('enabledfordiskencryption')]", "tenantid": "[parameters('tenantid')]", "accesspolicies": [{"objectid": "[parameters('objectid')]", "tenantid": "[parameters('tenantid')]", "permissions": {"keys": "[parameters('keyspermissions')]", "secrets": "[parameters('secretspermissions')]"}}], "sku": {"name": "[parameters('skuname')]", "family": "a"}, "networkacls": {"defaultaction": "allow", "bypass": "azureservices"}}} |
This module creates a key resource in an existing KeyVault with apiVersion 2019-09-01. | {"type": "microsoft.keyvault/vaults", "apiversion": "2021-04-01-preview", "name": "[parameters('keyvaultname')]", "location": "[parameters('location')]", "properties": {"enabledfordeployment": "[parameters('enabledfordeployment')]", "enabledfordiskencryption": "[parameters('enabledfordiskencryption')]", "enabledfortemplatedeployment": "[parameters('enabledfortemplatedeployment')]", "tenantid": "[parameters('tenantid')]", "accesspolicies": [{"objectid": "[parameters('objectid')]", "tenantid": "[parameters('tenantid')]", "permissions": {"keys": "[parameters('keyspermissions')]", "secrets": "[parameters('secretspermissions')]"}}], "sku": {"name": "[parameters('skuname')]", "family": "a"}, "networkacls": {"defaultaction": "allow", "bypass": "azureservices"}}} |
This module creates a key resource in an existing KeyVault with apiVersion 2019-09-01. | {"type": "microsoft.keyvault/vaults", "apiversion": "2021-04-01-preview", "name": "[parameters('keyvaultname')]", "location": "[parameters('location')]", "properties": {"enabledfordeployment": "[parameters('enabledfordeployment')]", "enabledfordiskencryption": "[parameters('enabledfordiskencryption')]", "enabledfortemplatedeployment": "[parameters('enabledfortemplatedeployment')]", "tenantid": "[parameters('tenantid')]", "accesspolicies": [{"objectid": "[parameters('objectid')]", "tenantid": "[parameters('tenantid')]", "permissions": {"keys": "[parameters('keyspermissions')]", "secrets": "[parameters('secretspermissions')]"}}], "sku": {"name": "[parameters('skuname')]", "family": "a"}, "networkacls": {"defaultaction": "allow", "bypass": "azureservices"}}}{"type": "microsoft.keyvault/vaults/secrets", "apiversion": "2021-04-01-preview", "name": "[format('{0}/{1}", parameters('keyvaultname'), parameters('secretname'))]", "properties": {"value": "[parameters('secretvalue')]"}, "dependson": ["[resourceid('microsoft.keyvault/vaults", parameters('keyvaultname'))]"]} |
This module creates a key resource in an existing KeyVault with apiVersion 2019-09-01. | {"type": "microsoft.keyvault/vaults", "apiversion": "2021-04-01-preview", "name": "[parameters('keyvaultname')]", "location": "[parameters('location')]", "properties": {"enabledfordeployment": "[parameters('enabledfordeployment')]", "enabledfordiskencryption": "[parameters('enabledfordiskencryption')]", "enabledfortemplatedeployment": "[parameters('enabledfortemplatedeployment')]", "enablerbacauthorization": true, "tenantid": "[parameters('tenantid')]", "sku": {"name": "[parameters('skuname')]", "family": "a"}, "networkacls": {"defaultaction": "allow", "bypass": "azureservices"}}} |
This module creates a key resource in an existing KeyVault with apiVersion 2019-09-01. | {"type": "microsoft.keyvault/vaults", "apiversion": "2021-04-01-preview", "name": "[parameters('keyvaultname')]", "location": "[parameters('location')]", "properties": {"enabledfordeployment": "[parameters('enabledfordeployment')]", "enabledfordiskencryption": "[parameters('enabledfordiskencryption')]", "enabledfortemplatedeployment": "[parameters('enabledfortemplatedeployment')]", "enablerbacauthorization": true, "tenantid": "[parameters('tenantid')]", "sku": {"name": "[parameters('skuname')]", "family": "a"}, "networkacls": {"defaultaction": "allow", "bypass": "azureservices"}}}{"type": "microsoft.keyvault/vaults/secrets", "apiversion": "2021-04-01-preview", "name": "[format('{0}/{1}", parameters('keyvaultname'), parameters('secretname'))]", "properties": {"value": "[parameters('secretvalue')]"}, "dependson": ["[resourceid('microsoft.keyvault/vaults", parameters('keyvaultname'))]"]} |
This template uses Azure Managed Identity to assign access to Azure Maps. See more at https://aka.ms/amauth | {"type": "microsoft.authorization/roleassignments", "apiversion": "2020-04-01-preview", "scope": "[format('microsoft.keyvault/vaults/{0}", parameters('keyvaultname'))]", "name": "[guid(variables('roleidmapping')[parameters('rolename')], parameters('objectid'), resourceid('microsoft.keyvault/vaults", parameters('keyvaultname')))]", "properties": {"roledefinitionid": "[subscriptionresourceid('microsoft.authorization/roledefinitions", variables('roleidmapping')[parameters('rolename')])]", "principalid": "[parameters('objectid')]", "principaltype": "serviceprincipal"}, "dependson": ["[resourceid('microsoft.keyvault/vaults", parameters('keyvaultname'))]"]} |
This module creates a key resource in an existing KeyVault with apiVersion 2019-09-01. | {"type": "microsoft.keyvault/vaults/accesspolicies", "name": "[concat(parameters('keyvaultname'), "/add')]", "apiversion": "2019-09-01", "properties": {"accesspolicies": [{"tenantid": "[parameters('tenantid')]", "objectid": "[parameters('objectid')]", "permissions": {"secrets": "[parameters('secretspermissions')]"}}]}} |
This sample contains a script to easily migrate template gallery templates to templateSpec resources. | {"apiversion": "2020-06-01", "name": "dynamicsecret", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"contentversion": "1.0.0.0", "uri": "[uri(parameters('_artifactslocation'), concat('./nested/sqlserver.json", parameters('_artifactslocationsastoken')))]"}, "parameters": {"location": {"value": "[parameters('location')]"}, "adminlogin": {"value": "ghuser"}, "adminpassword": {"reference": {"keyvault": {"id": "[resourceid(parameters('vaultsubscription'), parameters('vaultresourcegroupname'), "microsoft.keyvault/vaults", parameters('vaultname'))]"}, "secretname": "[parameters('secretname')]"}}}}} |
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01. | {"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "identity": {"type": "systemassigned"}, "dependson": ["[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"]]"}}}} |
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01. | {"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "identity": {"type": "systemassigned"}, "dependson": ["[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')]", "[variables('keyvaultid')]", "[variables('keyvaultprivateendpointid')]", "[variables('keyvaultprivatednszonegroupid')]"], "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('keyvaultserviceendpoint'), " ", variables('blobserviceprimaryendpoint'), " ", variables('azureenvironment'))]"}}} |
This module creates a Shared Image Gallery resource with apiVersion 2019-12-01. | {"apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "identity": {"type": "systemassigned"}, "dependson": ["[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')]", "[variables('keyvaultid')]", "[variables('keyvaultprivateendpointid')]", "[variables('keyvaultprivatednszonegroupid')]"], "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('keyvaultserviceendpoint'), " ", variables('blobserviceprimaryendpoint'), " ", variables('azureenvironment'))]"}}}{"condition": "[parameters('deployloganalytics')]", "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]"}}}{"condition": "[parameters('deployloganalytics')]", "apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'),"/dependencyagent')]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]", "[variables('workspaceid')]", "[variables('customscriptid')]", "[variables('omsagentforlinuxid')]"], "properties": {"publisher": "microsoft.azure.monitoring.dependencyagent", "type": "dependencyagentlinux", "typehandlerversion": "9.10", "autoupgrademinorversion": true}} |
This module creates a key resource in an existing KeyVault with apiVersion 2019-09-01. | {"apiversion": "2019-09-01", "type": "microsoft.keyvault/vaults", "name": "[parameters('keyvaultname')]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]"], "properties": {"tenantid": "[parameters('tenantid')]", "sku": {"name": "[parameters('skuname')]", "family": "a"}, "enabledfordeployment": "[parameters('enabledfordeployment')]", "enabledfortemplatedeployment": "[parameters('enabledfortemplatedeployment')]", "enabledfordiskencryption": "[parameters('enabledfordiskencryption')]", "enablesoftdelete": "[parameters('enablesoftdelete')]", "softdeleteretentionindays": "[parameters('softdeleteretentionindays')]", "enablerbacauthorization": "[parameters('enablerbacauthorization')]", "accesspolicies": [{"tenantid": "[parameters('tenantid')]", "objectid": "[reference(variables('vmid'), "2019-12-01", "full').identity.principalid]", "permissions": {"keys": "[parameters('keyspermissions')]", "secrets": "[parameters('secretspermissions')]", "certificates": "[parameters('certificatespermissions')]"}}]}} |
This module creates a key resource in an existing KeyVault with apiVersion 2019-09-01. | {"apiversion": "2019-09-01", "type": "microsoft.keyvault/vaults", "name": "[parameters('keyvaultname')]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]"], "properties": {"tenantid": "[parameters('tenantid')]", "sku": {"name": "[parameters('skuname')]", "family": "a"}, "enabledfordeployment": "[parameters('enabledfordeployment')]", "enabledfortemplatedeployment": "[parameters('enabledfortemplatedeployment')]", "enabledfordiskencryption": "[parameters('enabledfordiskencryption')]", "enablesoftdelete": "[parameters('enablesoftdelete')]", "softdeleteretentionindays": "[parameters('softdeleteretentionindays')]", "enablerbacauthorization": "[parameters('enablerbacauthorization')]", "accesspolicies": [{"tenantid": "[parameters('tenantid')]", "objectid": "[reference(variables('vmid'), "2019-12-01", "full').identity.principalid]", "permissions": {"keys": "[parameters('keyspermissions')]", "secrets": "[parameters('secretspermissions')]", "certificates": "[parameters('certificatespermissions')]"}}]}}{"apiversion": "2019-09-01", "type": "microsoft.keyvault/vaults/secrets", "name": "[concat(parameters('keyvaultname'), "/", parameters('secretsarray')[copyindex()].secretname)]", "dependson": ["[variables('keyvaultid')]"], "copy": {"name": "secretscopy", "count": "[length(parameters('secretsarray'))]"}, "properties": {"value": "[parameters('secretsarray')[copyindex()].secretvalue]"}} |
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')]", "identity": {"type": "systemassigned"}, "dependson": ["[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"]]"}}}} |
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')]", "identity": {"type": "systemassigned"}, "dependson": ["[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')]", "[variables('keyvaultid')]", "[variables('keyvaultprivateendpointid')]", "[variables('keyvaultprivatednszonegroupid')]"], "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('keyvaultserviceendpoint'), " ", variables('blobserviceprimaryendpoint'), " ", variables('azureenvironment'))]"}}} |
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')]", "identity": {"type": "systemassigned"}, "dependson": ["[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')]", "[variables('keyvaultid')]", "[variables('keyvaultprivateendpointid')]", "[variables('keyvaultprivatednszonegroupid')]"], "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('keyvaultserviceendpoint'), " ", variables('blobserviceprimaryendpoint'), " ", variables('azureenvironment'))]"}}}{"condition": "[parameters('deployloganalytics')]", "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]"}}} |
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')]", "identity": {"type": "systemassigned"}, "dependson": ["[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')]", "[variables('keyvaultid')]", "[variables('keyvaultprivateendpointid')]", "[variables('keyvaultprivatednszonegroupid')]"], "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('keyvaultserviceendpoint'), " ", variables('blobserviceprimaryendpoint'), " ", variables('azureenvironment'))]"}}}{"condition": "[parameters('deployloganalytics')]", "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]"}}}{"condition": "[parameters('deployloganalytics')]", "apiversion": "2019-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'),"/dependencyagent')]", "location": "[parameters('location')]", "dependson": ["[variables('vmid')]", "[variables('workspaceid')]", "[variables('customscriptid')]", "[variables('omsagentforlinuxid')]"], "properties": {"publisher": "microsoft.azure.monitoring.dependencyagent", "type": "dependencyagentlinux", "typehandlerversion": "9.10", "autoupgrademinorversion": true}} |
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('keyvaultprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}} |
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('keyvaultprivatednszonename')]", "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 | {"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('keyvaultprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones", "apiversion": "2018-09-01", "name": "[variables('blobprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2018-09-01", "name": "[concat(variables('keyvaultprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('keyvaultprivatednszoneid')]", "[variables('vnetid')]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[variables('vnetid')]"}}} |
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('keyvaultprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones", "apiversion": "2018-09-01", "name": "[variables('blobprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2018-09-01", "name": "[concat(variables('keyvaultprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('keyvaultprivatednszoneid')]", "[variables('vnetid')]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[variables('vnetid')]"}}}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2018-09-01", "name": "[concat(variables('blobprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('blobprivatednszoneid')]", "[variables('vnetid')]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[variables('vnetid')]"}}} |
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('keyvaultprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones", "apiversion": "2018-09-01", "name": "[variables('blobprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2018-09-01", "name": "[concat(variables('keyvaultprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('keyvaultprivatednszoneid')]", "[variables('vnetid')]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[variables('vnetid')]"}}}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2018-09-01", "name": "[concat(variables('blobprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('blobprivatednszoneid')]", "[variables('vnetid')]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[variables('vnetid')]"}}}{"type": "microsoft.network/privateendpoints", "apiversion": "2020-04-01", "name": "[parameters('keyvaultprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetid')]", "[variables('keyvaultid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('keyvaultprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('keyvaultid')]", "groupids": ["[variables('keyvaultprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}, "customdnsconfigs": [{"fqdn": "[concat(parameters('keyvaultname'), variables('keyvaultpublicdnszoneforwarder'))]"}]}} |
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('keyvaultprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones", "apiversion": "2018-09-01", "name": "[variables('blobprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2018-09-01", "name": "[concat(variables('keyvaultprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('keyvaultprivatednszoneid')]", "[variables('vnetid')]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[variables('vnetid')]"}}}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2018-09-01", "name": "[concat(variables('blobprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('blobprivatednszoneid')]", "[variables('vnetid')]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[variables('vnetid')]"}}}{"type": "microsoft.network/privateendpoints", "apiversion": "2020-04-01", "name": "[parameters('keyvaultprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetid')]", "[variables('keyvaultid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('keyvaultprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('keyvaultid')]", "groupids": ["[variables('keyvaultprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}, "customdnsconfigs": [{"fqdn": "[concat(parameters('keyvaultname'), variables('keyvaultpublicdnszoneforwarder'))]"}]}}{"type": "microsoft.network/privateendpoints", "apiversion": "2020-04-01", "name": "[parameters('blobstorageaccountprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetid')]", "[variables('blobstorageaccountid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('blobstorageaccountprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('blobstorageaccountid')]", "groupids": ["[variables('blobstorageaccountprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}, "customdnsconfigs": [{"fqdn": "[concat(parameters('blobstorageaccountname'), variables('blobpublicdnszoneforwarder'))]"}]}} |
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('keyvaultprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones", "apiversion": "2018-09-01", "name": "[variables('blobprivatednszonename')]", "location": "global", "properties": {"maxnumberofrecordsets": 25000, "maxnumberofvirtualnetworklinks": 1000, "maxnumberofvirtualnetworklinkswithregistration": 100}}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2018-09-01", "name": "[concat(variables('keyvaultprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('keyvaultprivatednszoneid')]", "[variables('vnetid')]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[variables('vnetid')]"}}}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2018-09-01", "name": "[concat(variables('blobprivatednszonename'), "/link_to_", tolower(parameters('virtualnetworkname')))]", "location": "global", "dependson": ["[variables('blobprivatednszoneid')]", "[variables('vnetid')]"], "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[variables('vnetid')]"}}}{"type": "microsoft.network/privateendpoints", "apiversion": "2020-04-01", "name": "[parameters('keyvaultprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetid')]", "[variables('keyvaultid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('keyvaultprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('keyvaultid')]", "groupids": ["[variables('keyvaultprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}, "customdnsconfigs": [{"fqdn": "[concat(parameters('keyvaultname'), variables('keyvaultpublicdnszoneforwarder'))]"}]}}{"type": "microsoft.network/privateendpoints", "apiversion": "2020-04-01", "name": "[parameters('blobstorageaccountprivateendpointname')]", "location": "[parameters('location')]", "dependson": ["[variables('vnetid')]", "[variables('blobstorageaccountid')]"], "properties": {"privatelinkserviceconnections": [{"name": "[parameters('blobstorageaccountprivateendpointname')]", "properties": {"privatelinkserviceid": "[variables('blobstorageaccountid')]", "groupids": ["[variables('blobstorageaccountprivateendpointgroupname')]"]}}], "subnet": {"id": "[variables('subnetid')]"}, "customdnsconfigs": [{"fqdn": "[concat(parameters('blobstorageaccountname'), variables('blobpublicdnszoneforwarder'))]"}]}}{"type": "microsoft.network/privateendpoints/privatednszonegroups", "apiversion": "2020-03-01", "name": "[variables('keyvaultprivatednszonegroupname')]", "location": "[parameters('location')]", "dependson": ["[variables('keyvaultid')]", "[variables('keyvaultprivatednszoneid')]", "[variables('keyvaultprivateendpointid')]"], "properties": {"privatednszoneconfigs": [{"name": "dnsconfig", "properties": {"privatednszoneid": "[variables('keyvaultprivatednszoneid')]"}}]}}{"type": "microsoft.network/privateendpoints/privatednszonegroups", "apiversion": "2020-03-01", "name": "[variables('blobprivatednszonegroupname')]", "location": "[parameters('location')]", "dependson": ["[variables('blobprivatednszoneid')]", "[variables('blobstorageaccountprivateendpointid')]"], "properties": {"privatednszoneconfigs": [{"name": "dnsconfig", "properties": {"privatednszoneid": "[variables('blobprivatednszoneid')]"}}]}} |
This module creates a key resource in an existing KeyVault with apiVersion 2019-09-01. | {"type": "microsoft.keyvault/vaults", "apiversion": "2021-04-01-preview", "name": "[parameters('keyvaultname')]", "location": "[parameters('location')]", "tags": {"displayname": "key vault with logging"}, "properties": {"sku": {"name": "[parameters('vaultsku')]", "family": "a"}, "tenantid": "[subscription().tenantid]", "accesspolicies": [{"objectid": "[parameters('objectid')]", "tenantid": "[subscription().tenantid]", "permissions": {"keys": "[parameters('keyspermissions')]", "secrets": "[parameters('secretspermissions')]"}}]}} |
This module creates a storageAccount resource with apiVersion 2021-01-01. | {"type": "microsoft.storage/storageaccounts", "apiversion": "2021-06-01", "name": "[variables('diagnosticstorageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storagev2", "tags": {"displayname": "[format('key vault {0} diagnostics storage account", parameters('keyvaultname'))]"}} |
This template creates a data collection rule defining the data source (Syslog) and the destination workspace. | {"type": "microsoft.insights/diagnosticsettings", "apiversion": "2021-05-01-preview", "scope": "[format('microsoft.keyvault/vaults/{0}", parameters('keyvaultname'))]", "name": "service", "properties": {"storageaccountid": "[resourceid('microsoft.storage/storageaccounts", variables('diagnosticstorageaccountname'))]", "logs": [{"category": "auditevent", "enabled": true, "retentionpolicy": {"enabled": true, "days": "[parameters('logsretentionindays')]"}}]}, "dependson": ["[resourceid('microsoft.keyvault/vaults", parameters('keyvaultname'))]", "[resourceid('microsoft.storage/storageaccounts", variables('diagnosticstorageaccountname'))]"]} |
This template uses Azure Managed Identity to assign access to Azure Maps. See more at https://aka.ms/amauth | {"condition": "[parameters('protectwithlocks')]", "type": "microsoft.authorization/locks", "apiversion": "2017-04-01", "scope": "[format('microsoft.keyvault/vaults/{0}", parameters('keyvaultname'))]", "name": "keyvaultdonotdelete", "properties": {"level": "cannotdelete"}, "dependson": ["[resourceid('microsoft.keyvault/vaults", parameters('keyvaultname'))]"]} |
This template uses Azure Managed Identity to assign access to Azure Maps. See more at https://aka.ms/amauth | {"condition": "[parameters('protectwithlocks')]", "type": "microsoft.authorization/locks", "apiversion": "2017-04-01", "scope": "[format('microsoft.keyvault/vaults/{0}", parameters('keyvaultname'))]", "name": "keyvaultdonotdelete", "properties": {"level": "cannotdelete"}, "dependson": ["[resourceid('microsoft.keyvault/vaults", parameters('keyvaultname'))]"]}{"condition": "[parameters('protectwithlocks')]", "type": "microsoft.authorization/locks", "apiversion": "2017-04-01", "scope": "[format('microsoft.storage/storageaccounts/{0}", variables('diagnosticstorageaccountname'))]", "name": "storagedonotdelete", "properties": {"level": "cannotdelete"}, "dependson": ["[resourceid('microsoft.storage/storageaccounts", variables('diagnosticstorageaccountname'))]"]} |
Storage Account with Storage Service Encryption and a blob deletion retention policy | {"type": "microsoft.storage/storageaccounts", "apiversion": "2021-06-01", "name": "[variables('diagnosticstorageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storagev2", "tags": {"displayname": "[format('key vault {0} diagnostics storage account", parameters('keyvaultname'))]"}} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["172.20.0.0/16"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "172.20.0.0/24", "privateendpointnetworkpolicies": "disabled"}}]}} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["172.20.0.0/16"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "172.20.0.0/24", "privateendpointnetworkpolicies": "disabled"}}]}}{"type": "microsoft.network/privateendpoints", "apiversion": "2020-07-01", "name": "[parameters('privateendpointname')]", "location": "[parameters('location')]", "properties": {"subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", parameters('virtualnetworkname'), variables('subnetname'))]"}, "privatelinkserviceconnections": [{"name": "myconnection", "properties": {"privatelinkserviceid": "[resourceid('microsoft.documentdb/databaseaccounts", parameters('accountname'))]", "groupids": ["sql"]}}]}, "dependson": ["[resourceid('microsoft.documentdb/databaseaccounts", parameters('accountname'))]"]} |
Application Gateway routing Internet traffic to a virtual network (internal mode) API Management instance which services a web API hosted in an Azure Web App. | {"type": "microsoft.web/serverfarms", "apiversion": "2020-06-01", "name": "[variables('hostingplanname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('appserviceplantier')]", "capacity": "[parameters('appserviceplaninstances')]"}}{"type": "microsoft.web/sites", "apiversion": "2020-06-01", "name": "[variables('websitename')]", "location": "[parameters('location')]", "properties": {"serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]", "siteconfig": {"appsettings": [{"name": "cosmosdb:account", "value": "[reference(resourceid('microsoft.documentdb/databaseaccounts", variables('cosmosaccountname'))).documentendpoint]"}, {"name": "cosmosdb:key", "value": "[listkeys(resourceid('microsoft.documentdb/databaseaccounts", variables('cosmosaccountname')), "2021-04-15').primarymasterkey]"}, {"name": "cosmosdb:databasename", "value": "[parameters('databasename')]"}, {"name": "cosmosdb:containername", "value": "[parameters('containername')]"}]}}, "dependson": ["[resourceid('microsoft.documentdb/databaseaccounts", variables('cosmosaccountname'))]", "[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]"]} |
Application Gateway routing Internet traffic to a virtual network (internal mode) API Management instance which services a web API hosted in an Azure Web App. | {"type": "microsoft.web/serverfarms", "apiversion": "2020-06-01", "name": "[variables('hostingplanname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('appserviceplantier')]", "capacity": "[parameters('appserviceplaninstances')]"}}{"type": "microsoft.web/sites", "apiversion": "2020-06-01", "name": "[variables('websitename')]", "location": "[parameters('location')]", "properties": {"serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]", "siteconfig": {"appsettings": [{"name": "cosmosdb:account", "value": "[reference(resourceid('microsoft.documentdb/databaseaccounts", variables('cosmosaccountname'))).documentendpoint]"}, {"name": "cosmosdb:key", "value": "[listkeys(resourceid('microsoft.documentdb/databaseaccounts", variables('cosmosaccountname')), "2021-04-15').primarymasterkey]"}, {"name": "cosmosdb:databasename", "value": "[parameters('databasename')]"}, {"name": "cosmosdb:containername", "value": "[parameters('containername')]"}]}}, "dependson": ["[resourceid('microsoft.documentdb/databaseaccounts", variables('cosmosaccountname'))]", "[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]"]}{"type": "microsoft.web/sites/sourcecontrols", "apiversion": "2020-06-01", "name": "[format('{0}/web", variables('websitename'))]", "properties": {"repourl": "[parameters('repositoryurl')]", "branch": "[parameters('branch')]", "ismanualintegration": true}, "dependson": ["[resourceid('microsoft.web/sites", variables('websitename'))]"]} |
This sample contains a script to easily migrate template gallery templates to templateSpec resources. | {"type": "microsoft.resources/deployments", "apiversion": "2020-07-01", "name": "setactivedeployment", "dependson": ["[resourceid('microsoft.appplatform/spring/apps/deployments", parameters('servicename'), parameters('app1'), "default')]", "[resourceid('microsoft.appplatform/spring/apps/deployments", parameters('servicename'), parameters('app2'), "default')]", "[resourceid('microsoft.appplatform/spring/apps/deployments", parameters('servicename'), parameters('app3'), "default')]"], "properties": {"mode": "incremental", "parameters": {}, "template": {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymenttemplate.json#", "contentversion": "1.0.0.0", "parameters": {}, "variables": {}, "resources": [{"type": "microsoft.appplatform/spring/apps", "apiversion": "2020-07-01", "name": "[concat(parameters('servicename'), "/", parameters('app1'))]", "properties": {"public": true, "activedeploymentname": "default"}}, {"type": "microsoft.appplatform/spring/apps", "apiversion": "2020-07-01", "name": "[concat(parameters('servicename'), "/", parameters('app2'))]", "properties": {"public": false, "activedeploymentname": "default"}}, {"type": "microsoft.appplatform/spring/apps", "apiversion": "2020-07-01", "name": "[concat(parameters('servicename'), "/", parameters('app3'))]", "properties": {"public": false, "activedeploymentname": "default"}}]}}} |
This sample contains a script to easily migrate template gallery templates to templateSpec resources. | {"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "storage", "properties": {"expressionevaluationoptions": {"scope": "inner"}, "mode": "incremental", "parameters": {"location": {"value": "[parameters('location')]"}, "accountname": {"value": "[parameters('storageaccountname')]"}, "skuname": {"value": "[parameters('storageskuname')]"}, "blobcontainername": {"value": "[parameters('storageblobcontainername')]"}}, "template": {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymenttemplate.json#", "contentversion": "1.0.0.0", "metadata": {"_generator": {"name": "bicep", "version": "0.4.1272.37030", "templatehash": "2271884228718129813"}}, "parameters": {"location": {"type": "string", "metadata": {"description": "the location into which the azure storage resources should be deployed."}}, "accountname": {"type": "string", "metadata": {"description": "the name of the azure storage account to create. this must be globally unique."}}, "skuname": {"type": "string", "allowedvalues": ["standard_lrs", "standard_grs", "standard_zrs", "premium_lrs"], "metadata": {"description": "the name of the sku to use when creating the azure storage account."}}, "blobcontainername": {"type": "string", "metadata": {"description": "the name of the azure storage blob container to create."}}}, "resources": [{"type": "microsoft.storage/storageaccounts", "apiversion": "2021-08-01", "name": "[parameters('accountname')]", "location": "[parameters('location')]", "kind": "storagev2", "sku": {"name": "[parameters('skuname')]"}, "properties": {"networkacls": {"defaultaction": "deny"}}}, {"type": "microsoft.storage/storageaccounts/blobservices/containers", "apiversion": "2021-08-01", "name": "[format('{0}/{1}/{2}", parameters('accountname'), "default", parameters('blobcontainername'))]", "properties": {"publicaccess": "none"}, "dependson": ["[resourceid('microsoft.storage/storageaccounts", parameters('accountname'))]"]}], "outputs": {"blobendpointhostname": {"type": "string", "value": "[replace(replace(reference(resourceid('microsoft.storage/storageaccounts", parameters('accountname'))).primaryendpoints.blob, "https://", "'), "/", "')]"}, "storageresourceid": {"type": "string", "value": "[resourceid('microsoft.storage/storageaccounts", parameters('accountname'))]"}}}}} |
This template creates a data collection rule defining the data source (Syslog) and the destination workspace. | {"type": "microsoft.insights/diagnosticsettings", "apiversion": "2021-05-01-preview", "scope": "[format('microsoft.cdn/profiles/{0}", variables('profilename'))]", "name": "diagnosticsettings", "properties": {"workspaceid": "[resourceid('microsoft.operationalinsights/workspaces", parameters('loganalyticsworkspacename'))]", "logs": [{"category": "frontdoorwebapplicationfirewalllog", "enabled": true, "retentionpolicy": {"days": 0, "enabled": true}}]}, "dependson": ["[resourceid('microsoft.operationalinsights/workspaces", parameters('loganalyticsworkspacename'))]", "[resourceid('microsoft.cdn/profiles", variables('profilename'))]"]} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/frontdoorwebapplicationfirewallpolicies", "apiversion": "2020-11-01", "name": "[variables('wafpolicyname')]", "location": "global", "sku": {"name": "[parameters('frontdoorskuname')]"}, "properties": {"policysettings": {"enabledstate": "enabled", "mode": "[parameters('wafmode')]"}, "customrules": {"rules": [{"name": "blocktrafficfromipranges", "priority": 100, "enabledstate": "enabled", "ruletype": "matchrule", "action": "block", "matchconditions": [{"matchvariable": "remoteaddr", "operator": "ipmatch", "matchvalue": "[parameters('ipaddressrangestoblock')]"}]}]}}} |
This template provides an example of how to create API Management service and configure all sub-entities | {"type": "microsoft.apimanagement/service/namedvalues", "apiversion": "2021-08-01", "name": "[format('{0}/{1}", parameters('apimanagementservicename'), variables('apimanagementfrontdooridnamedvaluename'))]", "properties": {"displayname": "frontdoorid", "value": "[reference(resourceid('microsoft.resources/deployments", "front-door')).outputs.frontdoorid.value]", "secret": true}, "dependson": ["[resourceid('microsoft.resources/deployments", "api-management')]", "[resourceid('microsoft.resources/deployments", "front-door')]"]} |
This template provides an example of how to create API Management service and configure all sub-entities | {"type": "microsoft.apimanagement/service/namedvalues", "apiversion": "2021-08-01", "name": "[format('{0}/{1}", parameters('apimanagementservicename'), variables('apimanagementfrontdooridnamedvaluename'))]", "properties": {"displayname": "frontdoorid", "value": "[reference(resourceid('microsoft.resources/deployments", "front-door')).outputs.frontdoorid.value]", "secret": true}, "dependson": ["[resourceid('microsoft.resources/deployments", "api-management')]", "[resourceid('microsoft.resources/deployments", "front-door')]"]}{"type": "microsoft.apimanagement/service/policies", "apiversion": "2021-08-01", "name": "[format('{0}/{1}", parameters('apimanagementservicename'), "policy')]", "properties": {"value": "<policies>\n <inbound>\n <check-header name="x-azure-fdid" failed-check-httpcode="403" failed-check-error-message="invalid request." ignore-case="false">\n <value>{{frontdoorid}}</value>\n </check-header>\n </inbound>\n <backend>\n <forward-request />\n </backend>\n</policies>", "format": "xml"}, "dependson": ["[resourceid('microsoft.apimanagement/service/namedvalues", parameters('apimanagementservicename'), variables('apimanagementfrontdooridnamedvaluename'))]"]} |
This sample contains a script to easily migrate template gallery templates to templateSpec resources. | {"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "function", "properties": {"expressionevaluationoptions": {"scope": "inner"}, "mode": "incremental", "parameters": {"location": {"value": "[parameters('location')]"}, "appname": {"value": "[parameters('appname')]"}, "functionplanskuname": {"value": "[parameters('functionappserviceplanskuname')]"}}, "template": {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymenttemplate.json#", "contentversion": "1.0.0.0", "metadata": {"_generator": {"name": "bicep", "version": "0.4.1272.37030", "templatehash": "869628039175802548"}}, "parameters": {"location": {"type": "string", "metadata": {"description": "the location into which the azure functions resources should be deployed."}}, "appname": {"type": "string", "metadata": {"description": "the name of the azure functions application to create. this must be globally unique."}}, "functionruntime": {"type": "string", "defaultvalue": "dotnet", "metadata": {"description": "the application runtime that the function app uses."}}, "functionplanskuname": {"type": "string", "metadata": {"description": "the name of the sku to use when creating the azure functions plan. common skus include y1 (consumption) and ep1, ep2, and ep3 (premium)."}}}, "variables": {"appserviceplanname": "functionplan", "appinsightsname": "appinsights", "storageaccountname": "[format('fnstor{0}", uniquestring(resourcegroup().id, parameters('appname')))]", "functionplankind": "[if(equals(parameters('functionplanskuname'), "y1'), "functionapp", "elastic')]", "functionname": "myhttptriggeredfunction"}, "resources": [{"type": "microsoft.storage/storageaccounts", "apiversion": "2021-08-01", "name": "[variables('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storagev2", "properties": {"supportshttpstrafficonly": true, "encryption": {"services": {"file": {"keytype": "account", "enabled": true}, "blob": {"keytype": "account", "enabled": true}}, "keysource": "microsoft.storage"}, "accesstier": "hot"}}, {"type": "microsoft.insights/components", "apiversion": "2020-02-02", "name": "[variables('appinsightsname')]", "location": "[parameters('location')]", "kind": "web", "properties": {"application_type": "web", "publicnetworkaccessforingestion": "enabled", "publicnetworkaccessforquery": "enabled"}}, {"type": "microsoft.web/serverfarms", "apiversion": "2020-06-01", "name": "[variables('appserviceplanname')]", "location": "[parameters('location')]", "kind": "[variables('functionplankind')]", "sku": {"name": "[parameters('functionplanskuname')]"}, "properties": {}}, {"type": "microsoft.web/sites", "apiversion": "2020-06-01", "name": "[parameters('appname')]", "location": "[parameters('location')]", "kind": "functionapp", "properties": {"serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('appserviceplanname'))]", "siteconfig": {"appsettings": [{"name": "azurewebjobsstorage", "value": "[format('defaultendpointsprotocol=https;accountname={0};endpointsuffix={1};accountkey={2}", variables('storageaccountname'), environment().suffixes.storage, listkeys(resourceid('microsoft.storage/storageaccounts", variables('storageaccountname')), "2021-08-01').keys[0].value)]"}, {"name": "website_contentazurefileconnectionstring", "value": "[format('defaultendpointsprotocol=https;accountname={0};endpointsuffix={1};accountkey={2}", variables('storageaccountname'), environment().suffixes.storage, listkeys(resourceid('microsoft.storage/storageaccounts", variables('storageaccountname')), "2021-08-01').keys[0].value)]"}, {"name": "appinsights_instrumentationkey", "value": "[reference(resourceid('microsoft.insights/components", variables('appinsightsname'))).instrumentationkey]"}, {"name": "applicationinsights_connection_string", "value": "[format('instrumentationkey={0}", reference(resourceid('microsoft.insights/components", variables('appinsightsname'))).instrumentationkey)]"}, {"name": "functions_worker_runtime", "value": "[parameters('functionruntime')]"}, {"name": "functions_extension_version", "value": "~3"}, {"name": "azurewebjobsdisablehomepage", "value": "true"}]}, "httpsonly": true}, "dependson": ["[resourceid('microsoft.insights/components", variables('appinsightsname'))]", "[resourceid('microsoft.web/serverfarms", variables('appserviceplanname'))]", "[resourceid('microsoft.storage/storageaccounts", variables('storageaccountname'))]"]}, {"type": "microsoft.web/sites/functions", "apiversion": "2021-03-01", "name": "[format('{0}/{1}", parameters('appname'), variables('functionname'))]", "properties": {"config": {"disabled": false, "bindings": [{"name": "req", "type": "httptrigger", "direction": "in", "authlevel": "anonymous", "methods": ["get"]}, {"name": "$return", "type": "http", "direction": "out"}]}, "files": {"run.csx": "#r "newtonsoft.json"\n\nusing system.net;\nusing microsoft.aspnetcore.mvc;\nusing microsoft.extensions.primitives;\nusing newtonsoft.json;\n\npublic static async task<iactionresult> run(httprequest req, ilogger log)\n{\n log.loginformation("c# http trigger function processed a request.");\n string name = req.query["name"];\n string requestbody = await new streamreader(req.body).readtoendasync();\n dynamic data = jsonconvert.deserializeobject(requestbody);\n name = name ?? data?.name;\n \n string responsemessage = string.isnullorempty(name)\n ? "this http triggered function executed successfully. pass a name in the query string or in the request body for a personalized response."\n : $"hello, {name}. this http triggered function executed successfully.";\n \n return new okobjectresult(responsemessage);\n}"}}, "dependson": ["[resourceid('microsoft.web/sites", parameters('appname'))]"]}], "outputs": {"functionapphostname": {"type": "string", "value": "[reference(resourceid('microsoft.web/sites", parameters('appname'))).defaulthostname]"}, "functionname": {"type": "string", "value": "[variables('functionname')]"}, "functionappresourceid": {"type": "string", "value": "[resourceid('microsoft.web/sites", parameters('appname'))]"}}}}} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/frontdoorwebapplicationfirewallpolicies", "apiversion": "2020-11-01", "name": "[variables('wafpolicyname')]", "location": "global", "sku": {"name": "[variables('skuname')]"}, "properties": {"policysettings": {"enabledstate": "enabled", "mode": "[parameters('wafmode')]"}, "managedrules": {"managedrulesets": "[parameters('wafmanagedrulesets')]"}}} |
This sample contains a script to easily migrate template gallery templates to templateSpec resources. | {"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "functionapp", "properties": {"expressionevaluationoptions": {"scope": "inner"}, "mode": "incremental", "parameters": {"location": {"value": "[parameters('location')]"}, "appname": {"value": "[parameters('functionappname')]"}, "functionplanskuname": {"value": "[parameters('functionplanskuname')]"}, "frontdoorid": {"value": "[reference(resourceid('microsoft.cdn/profiles", variables('frontdoorprofilename'))).frontdoorid]"}}, "template": {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymenttemplate.json#", "contentversion": "1.0.0.0", "metadata": {"_generator": {"name": "bicep", "version": "0.4.1272.37030", "templatehash": "1404162154099305518"}}, "parameters": {"location": {"type": "string", "metadata": {"description": "the location into which the azure functions resources should be deployed."}}, "appname": {"type": "string", "metadata": {"description": "the name of the azure functions application to create. this must be globally unique."}}, "functionruntime": {"type": "string", "defaultvalue": "dotnet", "metadata": {"description": "the runtime to deploy onto the azure functions application."}}, "functionplanskuname": {"type": "string", "metadata": {"description": "the name of the sku to use when creating the azure functions plan. common skus include y1 (consumption) and ep1, ep2, and ep3 (premium)."}}, "frontdoorid": {"type": "string", "metadata": {"description": "the unique id associated with the front door profile that will send traffic to this application. access restrictions will be configured to disallow traffic that hasn"t had this id attached to it."}}}, "variables": {"appserviceplanname": "functionplan", "appinsightsname": "appinsights", "storageaccountname": "[format('fnstor{0}", uniquestring(resourcegroup().id, parameters('appname')))]", "functionplankind": "[if(equals(parameters('functionplanskuname'), "y1'), "functionapp", "elastic')]", "functionname": "myhttptriggeredfunction"}, "resources": [{"type": "microsoft.storage/storageaccounts", "apiversion": "2021-08-01", "name": "[variables('storageaccountname')]", "location": "[parameters('location')]", "sku": {"name": "standard_lrs"}, "kind": "storagev2", "properties": {"supportshttpstrafficonly": true, "encryption": {"services": {"file": {"keytype": "account", "enabled": true}, "blob": {"keytype": "account", "enabled": true}}, "keysource": "microsoft.storage"}, "accesstier": "hot"}}, {"type": "microsoft.insights/components", "apiversion": "2020-02-02", "name": "[variables('appinsightsname')]", "location": "[parameters('location')]", "kind": "web", "properties": {"application_type": "web", "publicnetworkaccessforingestion": "enabled", "publicnetworkaccessforquery": "enabled"}}, {"type": "microsoft.web/serverfarms", "apiversion": "2020-06-01", "name": "[variables('appserviceplanname')]", "location": "[parameters('location')]", "kind": "[variables('functionplankind')]", "sku": {"name": "[parameters('functionplanskuname')]"}, "properties": {}}, {"type": "microsoft.web/sites", "apiversion": "2020-06-01", "name": "[parameters('appname')]", "location": "[parameters('location')]", "kind": "functionapp", "properties": {"serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('appserviceplanname'))]", "siteconfig": {"appsettings": [{"name": "azurewebjobsstorage", "value": "[format('defaultendpointsprotocol=https;accountname={0};endpointsuffix={1};accountkey={2}", variables('storageaccountname'), environment().suffixes.storage, listkeys(resourceid('microsoft.storage/storageaccounts", variables('storageaccountname')), "2021-08-01').keys[0].value)]"}, {"name": "website_contentazurefileconnectionstring", "value": "[format('defaultendpointsprotocol=https;accountname={0};endpointsuffix={1};accountkey={2}", variables('storageaccountname'), environment().suffixes.storage, listkeys(resourceid('microsoft.storage/storageaccounts", variables('storageaccountname')), "2021-08-01').keys[0].value)]"}, {"name": "appinsights_instrumentationkey", "value": "[reference(resourceid('microsoft.insights/components", variables('appinsightsname'))).instrumentationkey]"}, {"name": "applicationinsights_connection_string", "value": "[format('instrumentationkey={0}", reference(resourceid('microsoft.insights/components", variables('appinsightsname'))).instrumentationkey)]"}, {"name": "functions_worker_runtime", "value": "[parameters('functionruntime')]"}, {"name": "functions_extension_version", "value": "~3"}, {"name": "azurewebjobsdisablehomepage", "value": "true"}], "ipsecurityrestrictions": [{"tag": "servicetag", "ipaddress": "azurefrontdoor.backend", "action": "allow", "priority": 100, "headers": {"x-azure-fdid": ["[parameters('frontdoorid')]"]}, "name": "allow traffic from front door"}]}, "httpsonly": true}, "dependson": ["[resourceid('microsoft.insights/components", variables('appinsightsname'))]", "[resourceid('microsoft.web/serverfarms", variables('appserviceplanname'))]", "[resourceid('microsoft.storage/storageaccounts", variables('storageaccountname'))]"]}, {"type": "microsoft.web/sites/functions", "apiversion": "2021-03-01", "name": "[format('{0}/{1}", parameters('appname'), variables('functionname'))]", "properties": {"config": {"disabled": false, "bindings": [{"name": "req", "type": "httptrigger", "direction": "in", "authlevel": "anonymous", "methods": ["get"]}, {"name": "$return", "type": "http", "direction": "out"}]}, "files": {"run.csx": "#r "newtonsoft.json"\n\nusing system.net;\nusing microsoft.aspnetcore.mvc;\nusing microsoft.extensions.primitives;\nusing newtonsoft.json;\n\npublic static async task<iactionresult> run(httprequest req, ilogger log)\n{\n log.loginformation("c# http trigger function processed a request.");\n string name = req.query["name"];\n string requestbody = await new streamreader(req.body).readtoendasync();\n dynamic data = jsonconvert.deserializeobject(requestbody);\n name = name ?? data?.name;\n \n string responsemessage = string.isnullorempty(name)\n ? "this http triggered function executed successfully. pass a name in the query string or in the request body for a personalized response."\n : $"hello, {name}. this http triggered function executed successfully.";\n \n return new okobjectresult(responsemessage);\n}"}}, "dependson": ["[resourceid('microsoft.web/sites", parameters('appname'))]"]}], "outputs": {"functionapphostname": {"type": "string", "value": "[reference(resourceid('microsoft.web/sites", parameters('appname'))).defaulthostname]"}, "functionname": {"type": "string", "value": "[variables('functionname')]"}}}}, "dependson": ["[resourceid('microsoft.cdn/profiles", variables('frontdoorprofilename'))]"]} |
This sample contains a script to easily migrate template gallery templates to templateSpec resources. | {"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "network", "properties": {"expressionevaluationoptions": {"scope": "inner"}, "mode": "incremental", "parameters": {"location": {"value": "[parameters('location')]"}, "vnetipprefix": {"value": "[parameters('vnetipprefix')]"}, "vmsubnetipprefix": {"value": "[parameters('vmsubnetipprefix')]"}, "privatelinkservicesubnetipprefix": {"value": "[parameters('privatelinkservicesubnetipprefix')]"}}, "template": {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymenttemplate.json#", "contentversion": "1.0.0.0", "metadata": {"_generator": {"name": "bicep", "version": "0.4.1272.37030", "templatehash": "11351038166691976046"}}, "parameters": {"location": {"type": "string", "metadata": {"description": "the location into which the virtual network resources should be deployed."}}, "vnetipprefix": {"type": "string", "metadata": {"description": "the ip address prefix (cidr range) to use when deploying the virtual network."}}, "vmsubnetipprefix": {"type": "string", "metadata": {"description": "the ip address prefix (cidr range) to use when deploying the vm subnet within the virtual network."}}, "privatelinkservicesubnetipprefix": {"type": "string", "metadata": {"description": "the ip address prefix (cidr range) to use when deploying the private link service environment subnet within the virtual network."}}}, "variables": {"vnetname": "vnet", "vmsubnetname": "vms", "privatelinkservicesubnetname": "privatelinkservice"}, "resources": [{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[variables('vnetname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('vnetipprefix')]"]}, "subnets": [{"name": "[variables('vmsubnetname')]", "properties": {"addressprefix": "[parameters('vmsubnetipprefix')]"}}, {"name": "[variables('privatelinkservicesubnetname')]", "properties": {"addressprefix": "[parameters('privatelinkservicesubnetipprefix')]", "privatelinkservicenetworkpolicies": "disabled"}}]}}], "outputs": {"vnetname": {"type": "string", "value": "[variables('vnetname')]"}, "vmsubnetresourceid": {"type": "string", "value": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('vnetname'), variables('vmsubnetname'))]"}, "privatelinkservicesubnetresourceid": {"type": "string", "value": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('vnetname'), variables('privatelinkservicesubnetname'))]"}}}}} |
This sample contains a script to easily migrate template gallery templates to templateSpec resources. | {"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "network", "properties": {"expressionevaluationoptions": {"scope": "inner"}, "mode": "incremental", "parameters": {"location": {"value": "[parameters('location')]"}, "vnetipprefix": {"value": "[parameters('vnetipprefix')]"}, "vmsubnetipprefix": {"value": "[parameters('vmsubnetipprefix')]"}, "privatelinkservicesubnetipprefix": {"value": "[parameters('privatelinkservicesubnetipprefix')]"}}, "template": {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymenttemplate.json#", "contentversion": "1.0.0.0", "metadata": {"_generator": {"name": "bicep", "version": "0.4.1272.37030", "templatehash": "11351038166691976046"}}, "parameters": {"location": {"type": "string", "metadata": {"description": "the location into which the virtual network resources should be deployed."}}, "vnetipprefix": {"type": "string", "metadata": {"description": "the ip address prefix (cidr range) to use when deploying the virtual network."}}, "vmsubnetipprefix": {"type": "string", "metadata": {"description": "the ip address prefix (cidr range) to use when deploying the vm subnet within the virtual network."}}, "privatelinkservicesubnetipprefix": {"type": "string", "metadata": {"description": "the ip address prefix (cidr range) to use when deploying the private link service environment subnet within the virtual network."}}}, "variables": {"vnetname": "vnet", "vmsubnetname": "vms", "privatelinkservicesubnetname": "privatelinkservice"}, "resources": [{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[variables('vnetname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('vnetipprefix')]"]}, "subnets": [{"name": "[variables('vmsubnetname')]", "properties": {"addressprefix": "[parameters('vmsubnetipprefix')]"}}, {"name": "[variables('privatelinkservicesubnetname')]", "properties": {"addressprefix": "[parameters('privatelinkservicesubnetipprefix')]", "privatelinkservicenetworkpolicies": "disabled"}}]}}], "outputs": {"vnetname": {"type": "string", "value": "[variables('vnetname')]"}, "vmsubnetresourceid": {"type": "string", "value": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('vnetname'), variables('vmsubnetname'))]"}, "privatelinkservicesubnetresourceid": {"type": "string", "value": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('vnetname'), variables('privatelinkservicesubnetname'))]"}}}}}{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "load-balancer", "properties": {"expressionevaluationoptions": {"scope": "inner"}, "mode": "incremental", "parameters": {"location": {"value": "[parameters('location')]"}, "subnetresourceid": {"value": "[reference(resourceid('microsoft.resources/deployments", "network')).outputs.vmsubnetresourceid.value]"}}, "template": {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymenttemplate.json#", "contentversion": "1.0.0.0", "metadata": {"_generator": {"name": "bicep", "version": "0.4.1272.37030", "templatehash": "16599086315146897739"}}, "parameters": {"location": {"type": "string", "metadata": {"description": "the location into which the load balancer resources should be deployed."}}, "subnetresourceid": {"type": "string", "metadata": {"description": "the resource id of the virtual network subnet that the load balancer should be deployed into."}}}, "variables": {"loadbalancername": "myloadbalancer", "frontendipconfigurationname": "myfrontendipconfiguration", "healthprobename": "myhealthprobe", "backendaddresspoolname": "mybackendaddresspool"}, "resources": [{"type": "microsoft.network/loadbalancers", "apiversion": "2020-06-01", "name": "[variables('loadbalancername')]", "location": "[parameters('location')]", "sku": {"name": "standard"}, "properties": {"frontendipconfigurations": [{"name": "[variables('frontendipconfigurationname')]", "properties": {"privateipallocationmethod": "dynamic", "subnet": {"id": "[parameters('subnetresourceid')]"}}}], "backendaddresspools": [{"name": "[variables('backendaddresspoolname')]"}], "probes": [{"name": "[variables('healthprobename')]", "properties": {"protocol": "tcp", "port": 80, "intervalinseconds": 15, "numberofprobes": 2}}], "loadbalancingrules": [{"name": "httprule", "properties": {"protocol": "tcp", "frontendport": 80, "backendport": 80, "idletimeoutinminutes": 15, "frontendipconfiguration": {"id": "[resourceid('microsoft.network/loadbalancers/frontendipconfigurations", variables('loadbalancername'), variables('frontendipconfigurationname'))]"}, "backendaddresspool": {"id": "[resourceid('microsoft.network/loadbalancers/backendaddresspools", variables('loadbalancername'), variables('backendaddresspoolname'))]"}, "probe": {"id": "[resourceid('microsoft.network/loadbalancers/probes", variables('loadbalancername'), variables('healthprobename'))]"}}}]}}], "outputs": {"frontendipaddress": {"type": "string", "value": "[reference(resourceid('microsoft.network/loadbalancers", variables('loadbalancername'))).frontendipconfigurations[0].properties.privateipaddress]"}, "frontendipconfigurationresourceid": {"type": "string", "value": "[resourceid('microsoft.network/loadbalancers/frontendipconfigurations", variables('loadbalancername'), variables('frontendipconfigurationname'))]"}, "backendaddresspoolresourceid": {"type": "string", "value": "[resourceid('microsoft.network/loadbalancers/backendaddresspools", variables('loadbalancername'), variables('backendaddresspoolname'))]"}}}}, "dependson": ["[resourceid('microsoft.resources/deployments", "network')]"]} |
This sample contains a script to easily migrate template gallery templates to templateSpec resources. | {"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "storage", "properties": {"expressionevaluationoptions": {"scope": "inner"}, "mode": "incremental", "parameters": {"location": {"value": "[parameters('location')]"}, "accountname": {"value": "[parameters('storageaccountname')]"}, "skuname": {"value": "[parameters('storageskuname')]"}, "indexdocument": {"value": "[parameters('storagestaticwebsiteindexdocument')]"}, "errordocument404path": {"value": "[parameters('storagestaticwebsiteerrordocument404path')]"}}, "template": {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymenttemplate.json#", "contentversion": "1.0.0.0", "metadata": {"_generator": {"name": "bicep", "version": "0.4.1272.37030", "templatehash": "3023640385073315435"}}, "parameters": {"location": {"type": "string", "metadata": {"description": "the location into which the azure storage resources should be deployed."}}, "accountname": {"type": "string", "metadata": {"description": "the name of the azure storage account to create. this must be globally unique."}}, "skuname": {"type": "string", "allowedvalues": ["standard_lrs", "standard_grs", "standard_zrs", "standard_gzrs", "premium_lrs"], "metadata": {"description": "the name of the sku to use when creating the azure storage account."}}, "indexdocument": {"type": "string", "metadata": {"description": "the name of the page to display when a user navigates to the root of your static website."}}, "errordocument404path": {"type": "string", "metadata": {"description": "the name of the page to display when a user attempts to navigate to a page that does not exist in your static website."}}}, "variables": {"storageaccountcontributorroledefinitionid": "[subscriptionresourceid('microsoft.authorization/roledefinitions", "17d1049b-9a84-46fb-8f53-869881c3d3ab')]", "storageaccountstorageblobdatacontributorroledefinitionid": "[subscriptionresourceid('microsoft.authorization/roledefinitions", "ba92f5b4-2d11-453d-a403-e96b0029c9fe')]", "managedidentityname": "storagestaticwebsiteenabler", "deploymentscriptname": "enablestoragestaticwebsite"}, "resources": [{"type": "microsoft.storage/storageaccounts", "apiversion": "2021-04-01", "name": "[parameters('accountname')]", "location": "[parameters('location')]", "kind": "storagev2", "sku": {"name": "[parameters('skuname')]"}}, {"type": "microsoft.managedidentity/userassignedidentities", "apiversion": "2018-11-30", "name": "[variables('managedidentityname')]", "location": "[parameters('location')]"}, {"type": "microsoft.authorization/roleassignments", "apiversion": "2020-04-01-preview", "scope": "[format('microsoft.storage/storageaccounts/{0}", parameters('accountname'))]", "name": "[guid(resourcegroup().id, resourceid('microsoft.managedidentity/userassignedidentities", variables('managedidentityname')), variables('storageaccountcontributorroledefinitionid'))]", "properties": {"roledefinitionid": "[variables('storageaccountcontributorroledefinitionid')]", "principalid": "[reference(resourceid('microsoft.managedidentity/userassignedidentities", variables('managedidentityname'))).principalid]", "principaltype": "serviceprincipal"}, "dependson": ["[resourceid('microsoft.managedidentity/userassignedidentities", variables('managedidentityname'))]", "[resourceid('microsoft.storage/storageaccounts", parameters('accountname'))]"]}, {"type": "microsoft.authorization/roleassignments", "apiversion": "2020-04-01-preview", "scope": "[format('microsoft.storage/storageaccounts/{0}", parameters('accountname'))]", "name": "[guid(resourcegroup().id, resourceid('microsoft.managedidentity/userassignedidentities", variables('managedidentityname')), variables('storageaccountstorageblobdatacontributorroledefinitionid'))]", "properties": {"roledefinitionid": "[variables('storageaccountstorageblobdatacontributorroledefinitionid')]", "principalid": "[reference(resourceid('microsoft.managedidentity/userassignedidentities", variables('managedidentityname'))).principalid]", "principaltype": "serviceprincipal"}, "dependson": ["[resourceid('microsoft.managedidentity/userassignedidentities", variables('managedidentityname'))]", "[resourceid('microsoft.storage/storageaccounts", parameters('accountname'))]"]}, {"type": "microsoft.resources/deploymentscripts", "apiversion": "2020-10-01", "name": "[variables('deploymentscriptname')]", "location": "[parameters('location')]", "kind": "azurepowershell", "identity": {"type": "userassigned", "userassignedidentities": {"[format('{0}", resourceid('microsoft.managedidentity/userassignedidentities", variables('managedidentityname')))]": {}}}, "properties": {"azpowershellversion": "5.4", "scriptcontent": "param (\n [string] $resourcegroupname,\n [string] $storageaccountname,\n [string] $indexdocument,\n [string] $errordocument404path\n)\n\n$erroractionpreference = "stop"\n\n$storageaccount = get-azstorageaccount -resourcegroupname $resourcegroupname -accountname $storageaccountname\n$ctx = $storageaccount.context\nenable-azstoragestaticwebsite -context $ctx -indexdocument $indexdocument -errordocument404path $errordocument404path\n\nnew-item $indexdocument -force\nset-content $indexdocument "<h1>welcome</h1>"\nset-azstorageblobcontent -context $ctx -container "$web" -file $indexdocument -blob $indexdocument -properties @{"contenttype" = "text/html"}\n\nnew-item $errordocument404path -force\nset-content $errordocument404path "<h1>error: 404 not found</h1>"\nset-azstorageblobcontent -context $ctx -container "$web" -file $errordocument404path -blob $errordocument404path -properties @{"contenttype" = "text/html"}\n", "cleanuppreference": "onsuccess", "retentioninterval": "pt4h", "arguments": "[format('-resourcegroupname {0} -storageaccountname {1} -indexdocument {2} -errordocument404path {3}", resourcegroup().name, parameters('accountname'), parameters('indexdocument'), parameters('errordocument404path'))]"}, "dependson": ["[resourceid('microsoft.managedidentity/userassignedidentities", variables('managedidentityname'))]", "[extensionresourceid(resourceid('microsoft.storage/storageaccounts", parameters('accountname')), "microsoft.authorization/roleassignments", guid(resourcegroup().id, resourceid('microsoft.managedidentity/userassignedidentities", variables('managedidentityname')), variables('storageaccountcontributorroledefinitionid')))]", "[extensionresourceid(resourceid('microsoft.storage/storageaccounts", parameters('accountname')), "microsoft.authorization/roleassignments", guid(resourcegroup().id, resourceid('microsoft.managedidentity/userassignedidentities", variables('managedidentityname')), variables('storageaccountstorageblobdatacontributorroledefinitionid')))]"]}], "outputs": {"staticwebsitehostname": {"type": "string", "value": "[replace(replace(reference(resourceid('microsoft.storage/storageaccounts", parameters('accountname'))).primaryendpoints.web, "https://", "'), "/", "')]"}, "storageresourceid": {"type": "string", "value": "[resourceid('microsoft.storage/storageaccounts", parameters('accountname'))]"}, "storagelocation": {"type": "string", "value": "[reference(resourceid('microsoft.storage/storageaccounts", parameters('accountname')), "2021-04-01", "full').location]"}}}}} |
This module creates a storageAccount resource with apiVersion 2021-01-01. | {"type": "microsoft.storage/storageaccounts", "apiversion": "2021-01-01", "name": "[variables('storageaccountname')]", "location": "[parameters('location')]", "tags": {"displayname": "[variables('storageaccountname')]"}, "kind": "storagev2", "sku": {"name": "standard_lrs"}} |
Storage Account with Storage Service Encryption and a blob deletion retention policy | {"type": "microsoft.storage/storageaccounts", "apiversion": "2021-01-01", "name": "[variables('storageaccountname')]", "location": "[parameters('location')]", "tags": {"displayname": "[variables('storageaccountname')]"}, "kind": "storagev2", "sku": {"name": "standard_lrs"}} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/frontdoorwebapplicationfirewallpolicies", "apiversion": "2020-11-01", "name": "[variables('wafpolicyname')]", "location": "global", "sku": {"name": "[parameters('frontdoorskuname')]"}, "properties": {"policysettings": {"enabledstate": "enabled", "mode": "[parameters('wafmode')]"}, "customrules": {"rules": [{"name": "applyratelimit", "priority": 100, "enabledstate": "enabled", "ruletype": "ratelimitrule", "ratelimitthreshold": "[parameters('ratelimitthreshold')]", "ratelimitdurationinminutes": "[parameters('ratelimitdurationinminutes')]", "action": "block", "matchconditions": [{"matchvariable": "remoteaddr", "operator": "ipmatch", "negatecondition": true, "matchvalue": ["[variables('documentationipaddressrange')]"]}]}]}}} |
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": "2021-03-01", "name": "[variables('containergroupname')]", "location": "[parameters('location')]", "properties": {"containers": [{"name": "[variables('containername')]", "properties": {"image": "[variables('containerimageuri')]", "ports": [{"port": 80}], "resources": {"requests": {"cpu": 1, "memoryingb": 4}}}}], "restartpolicy": "onfailure", "ostype": "linux", "networkprofile": {"id": "[resourceid('microsoft.network/networkprofiles", variables('containergroupnetworkprofilename'))]"}}, "dependson": ["[resourceid('microsoft.network/networkprofiles", variables('containergroupnetworkprofilename'))]"]} |
This sample contains a script to easily migrate template gallery templates to templateSpec resources. | {"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "network", "properties": {"expressionevaluationoptions": {"scope": "inner"}, "mode": "incremental", "parameters": {"location": {"value": "[parameters('location')]"}, "vnetipprefix": {"value": "[parameters('vnetipprefix')]"}, "containerinstancessubnetipprefix": {"value": "[parameters('containerinstancessubnetipprefix')]"}, "applicationgatewaysubnetipprefix": {"value": "[parameters('applicationgatewaysubnetipprefix')]"}}, "template": {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymenttemplate.json#", "contentversion": "1.0.0.0", "metadata": {"_generator": {"name": "bicep", "version": "0.4.1272.37030", "templatehash": "2097233642399514556"}}, "parameters": {"location": {"type": "string", "metadata": {"description": "the location into which the virtual network resources should be deployed."}}, "vnetipprefix": {"type": "string", "metadata": {"description": "the ip address prefix (cidr range) to use when deploying the virtual network."}}, "containerinstancessubnetipprefix": {"type": "string", "metadata": {"description": "the ip address prefix (cidr range) to use when deploying the container group subnet within the virtual network."}}, "applicationgatewaysubnetipprefix": {"type": "string", "metadata": {"description": "the ip address prefix (cidr range) to use when deploying the application gateway subnet within the virtual network."}}}, "variables": {"vnetname": "vnet", "containergroupsubnetname": "containers", "applicationgatewaysubnetname": "applicationgateway", "nsgname": "mynsg"}, "resources": [{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[variables('vnetname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('vnetipprefix')]"]}, "subnets": [{"name": "[variables('containergroupsubnetname')]", "properties": {"addressprefix": "[parameters('containerinstancessubnetipprefix')]", "delegations": [{"name": "delegationservice", "properties": {"servicename": "microsoft.containerinstance/containergroups"}}]}}, {"name": "[variables('applicationgatewaysubnetname')]", "properties": {"addressprefix": "[parameters('applicationgatewaysubnetipprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('nsgname'))]"}}}]}, "dependson": ["[resourceid('microsoft.network/networksecuritygroups", variables('nsgname'))]"]}, {"type": "microsoft.network/networksecuritygroups", "apiversion": "2020-05-01", "name": "[variables('nsgname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allow_front_door_to_send_http_traffic", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportranges": ["80", "443"], "sourceaddressprefix": "azurefrontdoor.backend", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 120, "direction": "inbound"}}, {"name": "allow_gwm", "properties": {"protocol": "*", "sourceportrange": "*", "destinationportrange": "65200-65535", "sourceaddressprefix": "gatewaymanager", "destinationaddressprefix": "*", "access": "allow", "priority": 100, "direction": "inbound"}}, {"name": "allow_azureloadbalancer", "properties": {"protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "azureloadbalancer", "destinationaddressprefix": "*", "access": "allow", "priority": 110, "direction": "inbound"}}]}}], "outputs": {"vnetname": {"type": "string", "value": "[variables('vnetname')]"}, "vnetresourceid": {"type": "string", "value": "[resourceid('microsoft.network/virtualnetworks", variables('vnetname'))]"}, "applicationgatewaysubnetresourceid": {"type": "string", "value": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('vnetname'), variables('applicationgatewaysubnetname'))]"}, "containergroupsubnetresourceid": {"type": "string", "value": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('vnetname'), variables('containergroupsubnetname'))]"}}}}} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/networkprofiles", "apiversion": "2021-02-01", "name": "[variables('containergroupnetworkprofilename')]", "location": "[parameters('location')]", "properties": {"containernetworkinterfaceconfigurations": [{"name": "[variables('containergroupnetworkprofileinterfacename')]", "properties": {"ipconfigurations": [{"name": "[variables('containergroupnetworkprofileinterfaceipconfigurationname')]", "properties": {"subnet": {"id": "[reference(resourceid('microsoft.resources/deployments", "network')).outputs.containergroupsubnetresourceid.value]"}}}]}}]}, "dependson": ["[resourceid('microsoft.resources/deployments", "network')]"]} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/frontdoorwebapplicationfirewallpolicies", "apiversion": "2020-11-01", "name": "[variables('wafpolicyname')]", "location": "global", "sku": {"name": "[parameters('frontdoorskuname')]"}, "properties": {"policysettings": {"enabledstate": "enabled", "mode": "[parameters('wafmode')]"}, "customrules": {"rules": [{"name": "applygeofilter", "priority": 100, "enabledstate": "enabled", "ruletype": "matchrule", "action": "block", "matchconditions": [{"matchvariable": "remoteaddr", "operator": "geomatch", "negatecondition": true, "matchvalue": "[parameters('allowedcountries')]"}]}]}}} |
Application Gateway routing Internet traffic to a virtual network (internal mode) API Management instance which services a web API hosted in an Azure Web App. | {"type": "microsoft.web/serverfarms", "apiversion": "2020-06-01", "name": "[variables('appserviceplanname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('appserviceplanskuname')]", "capacity": "[parameters('appserviceplancapacity')]"}, "kind": "app"} |
Application Gateway routing Internet traffic to a virtual network (internal mode) API Management instance which services a web API hosted in an Azure Web App. | {"type": "microsoft.web/serverfarms", "apiversion": "2020-06-01", "name": "[variables('appserviceplanname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('appserviceplanskuname')]", "capacity": "[parameters('appserviceplancapacity')]"}, "kind": "app"}{"type": "microsoft.web/sites", "apiversion": "2020-06-01", "name": "[parameters('appname')]", "location": "[parameters('location')]", "kind": "app", "identity": {"type": "systemassigned"}, "properties": {"serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('appserviceplanname'))]", "httpsonly": true, "siteconfig": {"detailederrorloggingenabled": true, "httploggingenabled": true, "requesttracingenabled": true, "ftpsstate": "disabled", "mintlsversion": "1.2", "ipsecurityrestrictions": [{"tag": "servicetag", "ipaddress": "azurefrontdoor.backend", "action": "allow", "priority": 100, "headers": {"x-azure-fdid": ["[reference(resourceid('microsoft.cdn/profiles", variables('frontdoorprofilename'))).frontdoorid]"]}, "name": "allow traffic from front door"}]}}, "dependson": ["[resourceid('microsoft.web/serverfarms", variables('appserviceplanname'))]", "[resourceid('microsoft.cdn/profiles", variables('frontdoorprofilename'))]"]} |
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": "2021-03-01", "name": "[variables('containergroupname')]", "location": "[parameters('location')]", "properties": {"containers": [{"name": "[variables('containername')]", "properties": {"image": "[variables('containerimageuri')]", "ports": [{"port": 80}], "resources": {"requests": {"cpu": 1, "memoryingb": 4}}}}], "restartpolicy": "onfailure", "ostype": "linux", "ipaddress": {"type": "public", "dnsnamelabel": "[parameters('containergroupdnsnamelabel')]", "ports": [{"protocol": "tcp", "port": 80}]}}} |
This sample contains a script to easily migrate template gallery templates to templateSpec resources. | {"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "network", "properties": {"expressionevaluationoptions": {"scope": "inner"}, "mode": "incremental", "parameters": {"location": {"value": "[parameters('location')]"}, "vnetipprefix": {"value": "[parameters('vnetipprefix')]"}, "applicationgatewaysubnetipprefix": {"value": "[parameters('applicationgatewaysubnetipprefix')]"}}, "template": {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymenttemplate.json#", "contentversion": "1.0.0.0", "metadata": {"_generator": {"name": "bicep", "version": "0.4.1272.37030", "templatehash": "8770842469947396052"}}, "parameters": {"location": {"type": "string", "metadata": {"description": "the location into which the virtual network resources should be deployed."}}, "vnetipprefix": {"type": "string", "metadata": {"description": "the ip address prefix (cidr range) to use when deploying the virtual network."}}, "applicationgatewaysubnetipprefix": {"type": "string", "metadata": {"description": "the ip address prefix (cidr range) to use when deploying the application gateway subnet within the virtual network."}}}, "variables": {"vnetname": "vnet", "applicationgatewaysubnetname": "applicationgateway", "nsgname": "mynsg"}, "resources": [{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[variables('vnetname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('vnetipprefix')]"]}, "subnets": [{"name": "[variables('applicationgatewaysubnetname')]", "properties": {"addressprefix": "[parameters('applicationgatewaysubnetipprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('nsgname'))]"}}}]}, "dependson": ["[resourceid('microsoft.network/networksecuritygroups", variables('nsgname'))]"]}, {"type": "microsoft.network/networksecuritygroups", "apiversion": "2020-05-01", "name": "[variables('nsgname')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "allow_front_door_to_send_http_traffic", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportranges": ["80", "443"], "sourceaddressprefix": "azurefrontdoor.backend", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 120, "direction": "inbound"}}, {"name": "allow_gwm", "properties": {"protocol": "*", "sourceportrange": "*", "destinationportrange": "65200-65535", "sourceaddressprefix": "gatewaymanager", "destinationaddressprefix": "*", "access": "allow", "priority": 100, "direction": "inbound"}}, {"name": "allow_azureloadbalancer", "properties": {"protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "azureloadbalancer", "destinationaddressprefix": "*", "access": "allow", "priority": 110, "direction": "inbound"}}]}}], "outputs": {"vnetname": {"type": "string", "value": "[variables('vnetname')]"}, "applicationgatewaysubnetresourceid": {"type": "string", "value": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('vnetname'), variables('applicationgatewaysubnetname'))]"}}}}} |
This sample contains a script to easily migrate template gallery templates to templateSpec resources. | {"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "appservice", "properties": {"expressionevaluationoptions": {"scope": "inner"}, "mode": "incremental", "parameters": {"location": {"value": "[parameters('location')]"}, "appname": {"value": "[parameters('appname')]"}, "appserviceplanskuname": {"value": "[parameters('appserviceplanskuname')]"}, "appserviceplancapacity": {"value": "[parameters('appserviceplancapacity')]"}}, "template": {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymenttemplate.json#", "contentversion": "1.0.0.0", "metadata": {"_generator": {"name": "bicep", "version": "0.4.1272.37030", "templatehash": "16474206997191810045"}}, "parameters": {"location": {"type": "string", "metadata": {"description": "the location into which the app service resources should be deployed."}}, "appname": {"type": "string", "metadata": {"description": "the name of the app service application to create. this must be globally unique."}}, "appserviceplanskuname": {"type": "string", "metadata": {"description": "the name of the sku to use when creating the app service plan. this must be a sku that is compatible with private endpoints, i.e. p1v2 or better."}}, "appserviceplancapacity": {"type": "int", "metadata": {"description": "the number of worker instances of your app service plan that should be provisioned."}}}, "variables": {"appserviceplanname": "appserviceplan"}, "resources": [{"type": "microsoft.web/serverfarms", "apiversion": "2020-06-01", "name": "[variables('appserviceplanname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('appserviceplanskuname')]", "capacity": "[parameters('appserviceplancapacity')]"}, "kind": "app"}, {"type": "microsoft.web/sites", "apiversion": "2020-06-01", "name": "[parameters('appname')]", "location": "[parameters('location')]", "kind": "app", "properties": {"serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('appserviceplanname'))]"}, "dependson": ["[resourceid('microsoft.web/serverfarms", variables('appserviceplanname'))]"]}], "outputs": {"apphostname": {"type": "string", "value": "[reference(resourceid('microsoft.web/sites", parameters('appname'))).defaulthostname]"}, "appserviceresourceid": {"type": "string", "value": "[resourceid('microsoft.web/sites", parameters('appname'))]"}}}}} |
Application Gateway routing Internet traffic to a virtual network (internal mode) API Management instance which services a web API hosted in an Azure Web App. | {"type": "microsoft.web/serverfarms", "apiversion": "2021-02-01", "name": "[parameters('serverfarmname')]", "location": "[parameters('location')]", "tags": {"displayname": "[parameters('serverfarmname')]"}, "sku": {"name": "f1", "capacity": 1}}{"type": "microsoft.web/sites", "apiversion": "2021-02-01", "name": "[parameters('webappname')]", "location": "[parameters('location')]", "tags": {"displayname": "[parameters('webappname')]"}, "properties": {"serverfarmid": "[resourceid('microsoft.web/serverfarms", parameters('serverfarmname'))]", "siteconfig": {"ftpsstate": "ftpsonly", "mintlsversion": "1.2", "scmmintlsversion": "1.2"}, "httpsonly": true}, "identity": {"type": "systemassigned"}, "dependson": ["[resourceid('microsoft.web/serverfarms", parameters('serverfarmname'))]"]} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/networksecuritygroups", "name": "[variables('apimnsgname')]", "apiversion": "2020-06-01", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "management_endpoint_for_azure_portal_and_powershell", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "3443", "sourceaddressprefix": "apimanagement", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 120, "direction": "inbound"}}, {"name": "dependency_on_redis_cache", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "6381-6383", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 130, "direction": "inbound"}}, {"name": "dependency_to_sync_rate_limit_inbound", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "4290", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 135, "direction": "inbound"}}, {"name": "dependency_on_azure_sql", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "1433", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "sql", "access": "allow", "priority": 140, "direction": "outbound"}}, {"name": "dependency_for_log_to_event_hub_policy", "properties": {"protocol": "*", "sourceportrange": "*", "destinationportrange": "5671", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "eventhub", "access": "allow", "priority": 150, "direction": "outbound"}}, {"name": "dependency_on_redis_cache_outbound", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "6381-6383", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 160, "direction": "outbound"}}, {"name": "depenedency_to_sync_ratelimit_outbound", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "4290", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 165, "direction": "outbound"}}, {"name": "dependency_on_azure_file_share_for_git", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "445", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "storage", "access": "allow", "priority": 170, "direction": "outbound"}}, {"name": "azure_infrastructure_load_balancer", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "6390", "sourceaddressprefix": "azureloadbalancer", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 180, "direction": "inbound"}}, {"name": "publish_diagnosticlogs_and_metrics", "properties": {"description": "apim logs and metrics for consumption by admins and your it team are all part of the management plane", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azuremonitor", "access": "allow", "priority": 185, "direction": "outbound", "destinationportranges": ["443", "12000", "1886"]}}, {"name": "connect_to_smtp_relay_for_sendingemails", "properties": {"description": "apim features the ability to generate email traffic as part of the data plane and the management plane", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "internet", "access": "allow", "priority": 190, "direction": "outbound", "destinationportranges": ["25", "587", "25028"]}}, {"name": "authenticate_to_azure_active_directory", "properties": {"description": "connect to azure active directory for developer portal authentication or for oauth2 flow during any proxy authentication", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azureactivedirectory", "access": "allow", "priority": 200, "direction": "outbound", "destinationportranges": ["80", "443"]}}, {"name": "dependency_on_azure_storage", "properties": {"description": "apim service dependency on azure blob and azure table storage", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "storage", "access": "allow", "priority": 100, "direction": "outbound"}}, {"name": "publish_monitoring_logs", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azurecloud", "access": "allow", "priority": 300, "direction": "outbound"}}, {"name": "access_keyvault", "properties": {"description": "allow apim service control plane access to keyvault to refresh secrets", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azurekeyvault", "access": "allow", "priority": 350, "direction": "outbound", "destinationportranges": ["443"]}}, {"name": "deny_all_internet_outbound", "properties": {"protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "internet", "access": "deny", "priority": 999, "direction": "outbound"}}]}} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/networksecuritygroups", "name": "[variables('apimnsgname')]", "apiversion": "2020-06-01", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "management_endpoint_for_azure_portal_and_powershell", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "3443", "sourceaddressprefix": "apimanagement", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 120, "direction": "inbound"}}, {"name": "dependency_on_redis_cache", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "6381-6383", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 130, "direction": "inbound"}}, {"name": "dependency_to_sync_rate_limit_inbound", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "4290", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 135, "direction": "inbound"}}, {"name": "dependency_on_azure_sql", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "1433", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "sql", "access": "allow", "priority": 140, "direction": "outbound"}}, {"name": "dependency_for_log_to_event_hub_policy", "properties": {"protocol": "*", "sourceportrange": "*", "destinationportrange": "5671", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "eventhub", "access": "allow", "priority": 150, "direction": "outbound"}}, {"name": "dependency_on_redis_cache_outbound", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "6381-6383", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 160, "direction": "outbound"}}, {"name": "depenedency_to_sync_ratelimit_outbound", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "4290", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 165, "direction": "outbound"}}, {"name": "dependency_on_azure_file_share_for_git", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "445", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "storage", "access": "allow", "priority": 170, "direction": "outbound"}}, {"name": "azure_infrastructure_load_balancer", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "6390", "sourceaddressprefix": "azureloadbalancer", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 180, "direction": "inbound"}}, {"name": "publish_diagnosticlogs_and_metrics", "properties": {"description": "apim logs and metrics for consumption by admins and your it team are all part of the management plane", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azuremonitor", "access": "allow", "priority": 185, "direction": "outbound", "destinationportranges": ["443", "12000", "1886"]}}, {"name": "connect_to_smtp_relay_for_sendingemails", "properties": {"description": "apim features the ability to generate email traffic as part of the data plane and the management plane", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "internet", "access": "allow", "priority": 190, "direction": "outbound", "destinationportranges": ["25", "587", "25028"]}}, {"name": "authenticate_to_azure_active_directory", "properties": {"description": "connect to azure active directory for developer portal authentication or for oauth2 flow during any proxy authentication", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azureactivedirectory", "access": "allow", "priority": 200, "direction": "outbound", "destinationportranges": ["80", "443"]}}, {"name": "dependency_on_azure_storage", "properties": {"description": "apim service dependency on azure blob and azure table storage", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "storage", "access": "allow", "priority": 100, "direction": "outbound"}}, {"name": "publish_monitoring_logs", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azurecloud", "access": "allow", "priority": 300, "direction": "outbound"}}, {"name": "access_keyvault", "properties": {"description": "allow apim service control plane access to keyvault to refresh secrets", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azurekeyvault", "access": "allow", "priority": 350, "direction": "outbound", "destinationportranges": ["443"]}}, {"name": "deny_all_internet_outbound", "properties": {"protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "internet", "access": "deny", "priority": 999, "direction": "outbound"}}]}}{"apiversion": "2020-05-01", "type": "microsoft.network/publicipaddresses", "name": "[parameters('publicipname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('publicipsku')]"}, "properties": {"publicipallocationmethod": "[parameters('publicipallocationmethod')]", "publicipaddressversion": "ipv4", "dnssettings": {"domainnamelabel": "[parameters('dnslabelprefix')]"}}} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/networksecuritygroups", "name": "[variables('apimnsgname')]", "apiversion": "2020-06-01", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "management_endpoint_for_azure_portal_and_powershell", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "3443", "sourceaddressprefix": "apimanagement", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 120, "direction": "inbound"}}, {"name": "dependency_on_redis_cache", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "6381-6383", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 130, "direction": "inbound"}}, {"name": "dependency_to_sync_rate_limit_inbound", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "4290", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 135, "direction": "inbound"}}, {"name": "dependency_on_azure_sql", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "1433", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "sql", "access": "allow", "priority": 140, "direction": "outbound"}}, {"name": "dependency_for_log_to_event_hub_policy", "properties": {"protocol": "*", "sourceportrange": "*", "destinationportrange": "5671", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "eventhub", "access": "allow", "priority": 150, "direction": "outbound"}}, {"name": "dependency_on_redis_cache_outbound", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "6381-6383", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 160, "direction": "outbound"}}, {"name": "depenedency_to_sync_ratelimit_outbound", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "4290", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 165, "direction": "outbound"}}, {"name": "dependency_on_azure_file_share_for_git", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "445", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "storage", "access": "allow", "priority": 170, "direction": "outbound"}}, {"name": "azure_infrastructure_load_balancer", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "6390", "sourceaddressprefix": "azureloadbalancer", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 180, "direction": "inbound"}}, {"name": "publish_diagnosticlogs_and_metrics", "properties": {"description": "apim logs and metrics for consumption by admins and your it team are all part of the management plane", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azuremonitor", "access": "allow", "priority": 185, "direction": "outbound", "destinationportranges": ["443", "12000", "1886"]}}, {"name": "connect_to_smtp_relay_for_sendingemails", "properties": {"description": "apim features the ability to generate email traffic as part of the data plane and the management plane", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "internet", "access": "allow", "priority": 190, "direction": "outbound", "destinationportranges": ["25", "587", "25028"]}}, {"name": "authenticate_to_azure_active_directory", "properties": {"description": "connect to azure active directory for developer portal authentication or for oauth2 flow during any proxy authentication", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azureactivedirectory", "access": "allow", "priority": 200, "direction": "outbound", "destinationportranges": ["80", "443"]}}, {"name": "dependency_on_azure_storage", "properties": {"description": "apim service dependency on azure blob and azure table storage", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "storage", "access": "allow", "priority": 100, "direction": "outbound"}}, {"name": "publish_monitoring_logs", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azurecloud", "access": "allow", "priority": 300, "direction": "outbound"}}, {"name": "access_keyvault", "properties": {"description": "allow apim service control plane access to keyvault to refresh secrets", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azurekeyvault", "access": "allow", "priority": 350, "direction": "outbound", "destinationportranges": ["443"]}}, {"name": "deny_all_internet_outbound", "properties": {"protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "internet", "access": "deny", "priority": 999, "direction": "outbound"}}]}}{"apiversion": "2020-05-01", "type": "microsoft.network/publicipaddresses", "name": "[parameters('publicipname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('publicipsku')]"}, "properties": {"publicipallocationmethod": "[parameters('publicipallocationmethod')]", "publicipaddressversion": "ipv4", "dnssettings": {"domainnamelabel": "[parameters('dnslabelprefix')]"}}}{"apiversion": "2020-06-01", "type": "microsoft.network/virtualnetworks", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups", variables('apimnsgname'))]"], "properties": {"addressspace": {"addressprefixes": ["[parameters('virtualnetworkaddressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('apimnsgname'))]"}, "serviceendpoints": "[parameters('apimsubnetserviceendpoints')]"}}]}} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/networksecuritygroups", "name": "[variables('apimnsgname')]", "apiversion": "2020-06-01", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "client_communication_to_api_management", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "80", "sourceaddressprefix": "internet", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 100, "direction": "inbound"}}, {"name": "secure_client_communication_to_api_management", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "internet", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 110, "direction": "inbound"}}, {"name": "management_endpoint_for_azure_portal_and_powershell", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "3443", "sourceaddressprefix": "apimanagement", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 120, "direction": "inbound"}}, {"name": "dependency_on_redis_cache", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "6381-6383", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 130, "direction": "inbound"}}, {"name": "dependency_to_sync_rate_limit_inbound", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "4290", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 135, "direction": "inbound"}}, {"name": "dependency_on_azure_sql", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "1433", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "sql", "access": "allow", "priority": 140, "direction": "outbound"}}, {"name": "dependency_for_log_to_event_hub_policy", "properties": {"protocol": "*", "sourceportrange": "*", "destinationportrange": "5671", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "eventhub", "access": "allow", "priority": 150, "direction": "outbound"}}, {"name": "dependency_on_redis_cache_outbound", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "6381-6383", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 160, "direction": "outbound"}}, {"name": "depenedency_to_sync_ratelimit_outbound", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "4290", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 165, "direction": "outbound"}}, {"name": "dependency_on_azure_file_share_for_git", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "445", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "storage", "access": "allow", "priority": 170, "direction": "outbound"}}, {"name": "azure_infrastructure_load_balancer", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "azureloadbalancer", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 180, "direction": "inbound"}}, {"name": "publish_diagnosticlogs_and_metrics", "properties": {"description": "apim logs and metrics for consumption by admins and your it team are all part of the management plane", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azuremonitor", "access": "allow", "priority": 185, "direction": "outbound", "destinationportranges": ["443", "12000", "1886"]}}, {"name": "connect_to_smtp_relay_for_sendingemails", "properties": {"description": "apim features the ability to generate email traffic as part of the data plane and the management plane", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "internet", "access": "allow", "priority": 190, "direction": "outbound", "destinationportranges": ["25", "587", "25028"]}}, {"name": "authenticate_to_azure_active_directory", "properties": {"description": "connect to azure active directory for developer portal authentication or for oauth2 flow during any proxy authentication", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azureactivedirectory", "access": "allow", "priority": 200, "direction": "outbound", "destinationportranges": ["80", "443"]}}, {"name": "dependency_on_azure_storage", "properties": {"description": "apim service dependency on azure blob and azure table storage", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "storage", "access": "allow", "priority": 100, "direction": "outbound"}}, {"name": "publish_monitoring_logs", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azurecloud", "access": "allow", "priority": 300, "direction": "outbound"}}, {"name": "access_keyvault", "properties": {"description": "allow apim service control plane access to keyvault to refresh secrets", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azurekeyvault", "access": "allow", "priority": 350, "direction": "outbound", "destinationportranges": ["443"]}}, {"name": "deny_all_internet_outbound", "properties": {"protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "internet", "access": "deny", "priority": 999, "direction": "outbound"}}]}} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/networksecuritygroups", "name": "[variables('apimnsgname')]", "apiversion": "2020-06-01", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "client_communication_to_api_management", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "80", "sourceaddressprefix": "internet", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 100, "direction": "inbound"}}, {"name": "secure_client_communication_to_api_management", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "internet", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 110, "direction": "inbound"}}, {"name": "management_endpoint_for_azure_portal_and_powershell", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "3443", "sourceaddressprefix": "apimanagement", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 120, "direction": "inbound"}}, {"name": "dependency_on_redis_cache", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "6381-6383", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 130, "direction": "inbound"}}, {"name": "dependency_to_sync_rate_limit_inbound", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "4290", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 135, "direction": "inbound"}}, {"name": "dependency_on_azure_sql", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "1433", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "sql", "access": "allow", "priority": 140, "direction": "outbound"}}, {"name": "dependency_for_log_to_event_hub_policy", "properties": {"protocol": "*", "sourceportrange": "*", "destinationportrange": "5671", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "eventhub", "access": "allow", "priority": 150, "direction": "outbound"}}, {"name": "dependency_on_redis_cache_outbound", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "6381-6383", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 160, "direction": "outbound"}}, {"name": "depenedency_to_sync_ratelimit_outbound", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "4290", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 165, "direction": "outbound"}}, {"name": "dependency_on_azure_file_share_for_git", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "445", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "storage", "access": "allow", "priority": 170, "direction": "outbound"}}, {"name": "azure_infrastructure_load_balancer", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "azureloadbalancer", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 180, "direction": "inbound"}}, {"name": "publish_diagnosticlogs_and_metrics", "properties": {"description": "apim logs and metrics for consumption by admins and your it team are all part of the management plane", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azuremonitor", "access": "allow", "priority": 185, "direction": "outbound", "destinationportranges": ["443", "12000", "1886"]}}, {"name": "connect_to_smtp_relay_for_sendingemails", "properties": {"description": "apim features the ability to generate email traffic as part of the data plane and the management plane", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "internet", "access": "allow", "priority": 190, "direction": "outbound", "destinationportranges": ["25", "587", "25028"]}}, {"name": "authenticate_to_azure_active_directory", "properties": {"description": "connect to azure active directory for developer portal authentication or for oauth2 flow during any proxy authentication", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azureactivedirectory", "access": "allow", "priority": 200, "direction": "outbound", "destinationportranges": ["80", "443"]}}, {"name": "dependency_on_azure_storage", "properties": {"description": "apim service dependency on azure blob and azure table storage", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "storage", "access": "allow", "priority": 100, "direction": "outbound"}}, {"name": "publish_monitoring_logs", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azurecloud", "access": "allow", "priority": 300, "direction": "outbound"}}, {"name": "access_keyvault", "properties": {"description": "allow apim service control plane access to keyvault to refresh secrets", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azurekeyvault", "access": "allow", "priority": 350, "direction": "outbound", "destinationportranges": ["443"]}}, {"name": "deny_all_internet_outbound", "properties": {"protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "internet", "access": "deny", "priority": 999, "direction": "outbound"}}]}}{"apiversion": "2020-06-01", "type": "microsoft.network/virtualnetworks", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups", variables('apimnsgname'))]"], "properties": {"addressspace": {"addressprefixes": ["[parameters('virtualnetworkaddressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('apimnsgname'))]"}, "serviceendpoints": "[parameters('apimsubnetserviceendpoints')]"}}]}} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/networksecuritygroups", "name": "[variables('apimnsgname')]", "apiversion": "2020-06-01", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "client_communication_to_api_management", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "80", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 100, "direction": "inbound"}}, {"name": "secure_client_communication_to_api_management", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 110, "direction": "inbound"}}, {"name": "management_endpoint_for_azure_portal_and_powershell", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "3443", "sourceaddressprefix": "apimanagement", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 120, "direction": "inbound"}}, {"name": "dependency_on_redis_cache", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "6381-6383", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 130, "direction": "inbound"}}, {"name": "dependency_to_sync_rate_limit_inbound", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "4290", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 135, "direction": "inbound"}}, {"name": "dependency_on_azure_sql", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "1433", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "sql", "access": "allow", "priority": 140, "direction": "outbound"}}, {"name": "dependency_for_log_to_event_hub_policy", "properties": {"protocol": "*", "sourceportrange": "*", "destinationportrange": "5671", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "eventhub", "access": "allow", "priority": 150, "direction": "outbound"}}, {"name": "dependency_on_redis_cache_outbound", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "6381-6383", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 160, "direction": "outbound"}}, {"name": "depenedency_to_sync_ratelimit_outbound", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "4290", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 165, "direction": "outbound"}}, {"name": "dependency_on_azure_file_share_for_git", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "445", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "storage", "access": "allow", "priority": 170, "direction": "outbound"}}, {"name": "azure_infrastructure_load_balancer", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "azureloadbalancer", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 180, "direction": "inbound"}}, {"name": "publish_diagnosticlogs_and_metrics", "properties": {"description": "apim logs and metrics for consumption by admins and your it team are all part of the management plane", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azuremonitor", "access": "allow", "priority": 185, "direction": "outbound", "destinationportranges": ["443", "12000", "1886"]}}, {"name": "connect_to_smtp_relay_for_sendingemails", "properties": {"description": "apim features the ability to generate email traffic as part of the data plane and the management plane", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "internet", "access": "allow", "priority": 190, "direction": "outbound", "destinationportranges": ["25", "587", "25028"]}}, {"name": "authenticate_to_azure_active_directory", "properties": {"description": "connect to azure active directory for developer portal authentication or for oauth2 flow during any proxy authentication", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azureactivedirectory", "access": "allow", "priority": 200, "direction": "outbound", "destinationportranges": ["80", "443"]}}, {"name": "dependency_on_azure_storage", "properties": {"description": "apim service dependency on azure blob and azure table storage", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "storage", "access": "allow", "priority": 100, "direction": "outbound"}}, {"name": "publish_monitoring_logs", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azurecloud", "access": "allow", "priority": 300, "direction": "outbound"}}, {"name": "access_keyvault", "properties": {"description": "allow apim service control plane access to keyvault to refresh secrets", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azurekeyvault", "access": "allow", "priority": 350, "direction": "outbound", "destinationportranges": ["443"]}}, {"name": "deny_all_internet_outbound", "properties": {"protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "internet", "access": "deny", "priority": 999, "direction": "outbound"}}]}} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/networksecuritygroups", "name": "[variables('apimnsgname')]", "apiversion": "2020-06-01", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "client_communication_to_api_management", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "80", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 100, "direction": "inbound"}}, {"name": "secure_client_communication_to_api_management", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 110, "direction": "inbound"}}, {"name": "management_endpoint_for_azure_portal_and_powershell", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "3443", "sourceaddressprefix": "apimanagement", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 120, "direction": "inbound"}}, {"name": "dependency_on_redis_cache", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "6381-6383", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 130, "direction": "inbound"}}, {"name": "dependency_to_sync_rate_limit_inbound", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "4290", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 135, "direction": "inbound"}}, {"name": "dependency_on_azure_sql", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "1433", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "sql", "access": "allow", "priority": 140, "direction": "outbound"}}, {"name": "dependency_for_log_to_event_hub_policy", "properties": {"protocol": "*", "sourceportrange": "*", "destinationportrange": "5671", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "eventhub", "access": "allow", "priority": 150, "direction": "outbound"}}, {"name": "dependency_on_redis_cache_outbound", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "6381-6383", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 160, "direction": "outbound"}}, {"name": "depenedency_to_sync_ratelimit_outbound", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "4290", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 165, "direction": "outbound"}}, {"name": "dependency_on_azure_file_share_for_git", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "445", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "storage", "access": "allow", "priority": 170, "direction": "outbound"}}, {"name": "azure_infrastructure_load_balancer", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "azureloadbalancer", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 180, "direction": "inbound"}}, {"name": "publish_diagnosticlogs_and_metrics", "properties": {"description": "apim logs and metrics for consumption by admins and your it team are all part of the management plane", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azuremonitor", "access": "allow", "priority": 185, "direction": "outbound", "destinationportranges": ["443", "12000", "1886"]}}, {"name": "connect_to_smtp_relay_for_sendingemails", "properties": {"description": "apim features the ability to generate email traffic as part of the data plane and the management plane", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "internet", "access": "allow", "priority": 190, "direction": "outbound", "destinationportranges": ["25", "587", "25028"]}}, {"name": "authenticate_to_azure_active_directory", "properties": {"description": "connect to azure active directory for developer portal authentication or for oauth2 flow during any proxy authentication", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azureactivedirectory", "access": "allow", "priority": 200, "direction": "outbound", "destinationportranges": ["80", "443"]}}, {"name": "dependency_on_azure_storage", "properties": {"description": "apim service dependency on azure blob and azure table storage", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "storage", "access": "allow", "priority": 100, "direction": "outbound"}}, {"name": "publish_monitoring_logs", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azurecloud", "access": "allow", "priority": 300, "direction": "outbound"}}, {"name": "access_keyvault", "properties": {"description": "allow apim service control plane access to keyvault to refresh secrets", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azurekeyvault", "access": "allow", "priority": 350, "direction": "outbound", "destinationportranges": ["443"]}}, {"name": "deny_all_internet_outbound", "properties": {"protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "internet", "access": "deny", "priority": 999, "direction": "outbound"}}]}}{"apiversion": "2019-11-01", "type": "microsoft.network/virtualnetworks", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups", variables('apimnsgname'))]"], "properties": {"addressspace": {"addressprefixes": ["[parameters('virtualnetworkaddressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('apimnsgname'))]"}, "serviceendpoints": "[parameters('apimsubnetserviceendpoints')]"}}]}} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["172.20.0.0/16"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "172.20.0.0/24", "privateendpointnetworkpolicies": "disabled"}}]}}{"type": "microsoft.network/privateendpoints", "apiversion": "2020-07-01", "name": "[parameters('privateendpointname')]", "location": "[parameters('location')]", "properties": {"subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", parameters('virtualnetworkname'), variables('subnetname'))]"}, "privatelinkserviceconnections": [{"name": "myconnection", "properties": {"privatelinkserviceid": "[resourceid('microsoft.apimanagement/service", parameters('apimanagementservicename'))]", "groupids": ["gateway"]}}]}, "dependson": ["[resourceid('microsoft.apimanagement/service", parameters('apimanagementservicename'))]"]}{"type": "microsoft.network/privatednszones", "apiversion": "2020-06-01", "name": "[variables('privatednszonename')]", "location": "global", "dependson": ["[resourceid('microsoft.network/virtualnetworks", parameters('virtualnetworkname'))]"]} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["172.20.0.0/16"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "172.20.0.0/24", "privateendpointnetworkpolicies": "disabled"}}]}}{"type": "microsoft.network/privateendpoints", "apiversion": "2020-07-01", "name": "[parameters('privateendpointname')]", "location": "[parameters('location')]", "properties": {"subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", parameters('virtualnetworkname'), variables('subnetname'))]"}, "privatelinkserviceconnections": [{"name": "myconnection", "properties": {"privatelinkserviceid": "[resourceid('microsoft.apimanagement/service", parameters('apimanagementservicename'))]", "groupids": ["gateway"]}}]}, "dependson": ["[resourceid('microsoft.apimanagement/service", parameters('apimanagementservicename'))]"]}{"type": "microsoft.network/privatednszones", "apiversion": "2020-06-01", "name": "[variables('privatednszonename')]", "location": "global", "dependson": ["[resourceid('microsoft.network/virtualnetworks", parameters('virtualnetworkname'))]"]}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2020-06-01", "name": "[format('{0}/{1}", variables('privatednszonename'), format('{0}-link", variables('privatednszonename')))]", "location": "global", "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[resourceid('microsoft.network/virtualnetworks", parameters('virtualnetworkname'))]"}}, "dependson": ["[resourceid('microsoft.network/privatednszones", variables('privatednszonename'))]", "[resourceid('microsoft.network/virtualnetworks", parameters('virtualnetworkname'))]"]} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/virtualnetworks", "apiversion": "2020-06-01", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["172.20.0.0/16"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "172.20.0.0/24", "privateendpointnetworkpolicies": "disabled"}}]}}{"type": "microsoft.network/privateendpoints", "apiversion": "2020-07-01", "name": "[parameters('privateendpointname')]", "location": "[parameters('location')]", "properties": {"subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", parameters('virtualnetworkname'), variables('subnetname'))]"}, "privatelinkserviceconnections": [{"name": "myconnection", "properties": {"privatelinkserviceid": "[resourceid('microsoft.apimanagement/service", parameters('apimanagementservicename'))]", "groupids": ["gateway"]}}]}, "dependson": ["[resourceid('microsoft.apimanagement/service", parameters('apimanagementservicename'))]"]}{"type": "microsoft.network/privatednszones", "apiversion": "2020-06-01", "name": "[variables('privatednszonename')]", "location": "global", "dependson": ["[resourceid('microsoft.network/virtualnetworks", parameters('virtualnetworkname'))]"]}{"type": "microsoft.network/privatednszones/virtualnetworklinks", "apiversion": "2020-06-01", "name": "[format('{0}/{1}", variables('privatednszonename'), format('{0}-link", variables('privatednszonename')))]", "location": "global", "properties": {"registrationenabled": false, "virtualnetwork": {"id": "[resourceid('microsoft.network/virtualnetworks", parameters('virtualnetworkname'))]"}}, "dependson": ["[resourceid('microsoft.network/privatednszones", variables('privatednszonename'))]", "[resourceid('microsoft.network/virtualnetworks", parameters('virtualnetworkname'))]"]}{"type": "microsoft.network/privateendpoints/privatednszonegroups", "apiversion": "2020-08-01", "name": "[format('{0}/{1}", parameters('privateendpointname'), "dnsgroupname')]", "properties": {"privatednszoneconfigs": [{"name": "config1", "properties": {"privatednszoneid": "[resourceid('microsoft.network/privatednszones", variables('privatednszonename'))]"}}]}, "dependson": ["[resourceid('microsoft.network/privatednszones", variables('privatednszonename'))]", "[resourceid('microsoft.network/privateendpoints", parameters('privateendpointname'))]"]} |
This module creates a key resource in an existing KeyVault with apiVersion 2019-09-01. | {"type": "microsoft.keyvault/vaults", "apiversion": "2021-06-01-preview", "name": "[parameters('keyvaultname')]", "location": "[parameters('location')]", "properties": {"sku": {"name": "standard", "family": "a"}, "tenantid": "[reference(resourceid('microsoft.managedidentity/userassignedidentities", variables('identityname'))).tenantid]", "enablerbacauthorization": true, "enablesoftdelete": true}, "dependson": ["[resourceid('microsoft.managedidentity/userassignedidentities", variables('identityname'))]"]} |
This module creates a key resource in an existing KeyVault with apiVersion 2019-09-01. | {"type": "microsoft.keyvault/vaults", "apiversion": "2021-06-01-preview", "name": "[parameters('keyvaultname')]", "location": "[parameters('location')]", "properties": {"sku": {"name": "standard", "family": "a"}, "tenantid": "[reference(resourceid('microsoft.managedidentity/userassignedidentities", variables('identityname'))).tenantid]", "enablerbacauthorization": true, "enablesoftdelete": true}, "dependson": ["[resourceid('microsoft.managedidentity/userassignedidentities", variables('identityname'))]"]}{"type": "microsoft.keyvault/vaults/secrets", "apiversion": "2019-09-01", "name": "[format('{0}/sslcert", parameters('keyvaultname'))]", "properties": {"value": "[parameters('sslcertvalue')]", "contenttype": "application/x-pkcs12", "attributes": {"enabled": true}}, "dependson": ["[resourceid('microsoft.keyvault/vaults", parameters('keyvaultname'))]"]} |
This template uses Azure Managed Identity to assign access to Azure Maps. See more at https://aka.ms/amauth | {"type": "microsoft.authorization/roleassignments", "apiversion": "2020-04-01-preview", "scope": "[format('microsoft.keyvault/vaults/{0}", parameters('keyvaultname'))]", "name": "[guid(variables('keyvaultsecretsuserroledefinitionid'), resourceid('microsoft.managedidentity/userassignedidentities", variables('identityname')), resourceid('microsoft.keyvault/vaults", parameters('keyvaultname')))]", "properties": {"roledefinitionid": "[subscriptionresourceid('microsoft.authorization/roledefinitions", variables('keyvaultsecretsuserroledefinitionid'))]", "principalid": "[reference(resourceid('microsoft.managedidentity/userassignedidentities", variables('identityname'))).principalid]", "principaltype": "serviceprincipal"}, "dependson": ["[resourceid('microsoft.keyvault/vaults", parameters('keyvaultname'))]", "[resourceid('microsoft.managedidentity/userassignedidentities", variables('identityname'))]"]} |
Creates and optionally secures a Key Vault with logging linked to a storage account. | {"type": "microsoft.keyvault/vaults", "apiversion": "2021-06-01-preview", "name": "[parameters('keyvaultname')]", "location": "[parameters('location')]", "properties": {"sku": {"name": "standard", "family": "a"}, "tenantid": "[reference(resourceid('microsoft.managedidentity/userassignedidentities", variables('identityname'))).tenantid]", "enablerbacauthorization": true, "enablesoftdelete": true}, "dependson": ["[resourceid('microsoft.managedidentity/userassignedidentities", variables('identityname'))]"]} |
Creates and optionally secures a Key Vault with logging linked to a storage account. | {"type": "microsoft.keyvault/vaults", "apiversion": "2021-06-01-preview", "name": "[parameters('keyvaultname')]", "location": "[parameters('location')]", "properties": {"sku": {"name": "standard", "family": "a"}, "tenantid": "[reference(resourceid('microsoft.managedidentity/userassignedidentities", variables('identityname'))).tenantid]", "enablerbacauthorization": true, "enablesoftdelete": true}, "dependson": ["[resourceid('microsoft.managedidentity/userassignedidentities", variables('identityname'))]"]}{"type": "microsoft.keyvault/vaults/secrets", "apiversion": "2019-09-01", "name": "[format('{0}/sslcert", parameters('keyvaultname'))]", "properties": {"value": "[parameters('sslcertvalue')]", "contenttype": "application/x-pkcs12", "attributes": {"enabled": true}}, "dependson": ["[resourceid('microsoft.keyvault/vaults", parameters('keyvaultname'))]"]} |
This sample contains a script to easily migrate template gallery templates to templateSpec resources. | {"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "storage-deploy", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('azstoragetempluri')]", "contentversion": "1.0.0.0"}, "parameters": {"storageaccountname": {"value": "[variables('storageaccountname')]"}, "tags": {"value": "[variables('tags')]"}, "location": {"value": "[parameters('location')]"}}}}{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "eventhub-deploy", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('azeventhubtempluri')]", "contentversion": "1.0.0.0"}, "parameters": {"eventhubnsname": {"value": "[parameters('dnsnameprefix')]"}, "eventhubname": {"value": "[parameters('dnsnameprefix')]"}, "eventhubsendpolicyname": {"value": "[variables('eventhubsendpolicyname')]"}, "eventhublistenpolicy": {"value": "[variables('eventhublistenpolicy')]"}, "tags": {"value": "[variables('tags')]"}, "location": {"value": "[parameters('location')]"}}}} |
This sample contains a script to easily migrate template gallery templates to templateSpec resources. | {"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "storage-deploy", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('azstoragetempluri')]", "contentversion": "1.0.0.0"}, "parameters": {"storageaccountname": {"value": "[variables('storageaccountname')]"}, "tags": {"value": "[variables('tags')]"}, "location": {"value": "[parameters('location')]"}}}}{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "eventhub-deploy", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('azeventhubtempluri')]", "contentversion": "1.0.0.0"}, "parameters": {"eventhubnsname": {"value": "[parameters('dnsnameprefix')]"}, "eventhubname": {"value": "[parameters('dnsnameprefix')]"}, "eventhubsendpolicyname": {"value": "[variables('eventhubsendpolicyname')]"}, "eventhublistenpolicy": {"value": "[variables('eventhublistenpolicy')]"}, "tags": {"value": "[variables('tags')]"}, "location": {"value": "[parameters('location')]"}}}}{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "api-management-logger-deploy", "condition": "[variables('apimgrspecified')]", "dependson": ["[resourceid('microsoft.resources/deployments", "eventhub-deploy')]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('azapimgmtloggerinstalltempluri')]", "contentversion": "1.0.0.0"}, "parameters": {"existingapimgmtname": {"value": "[parameters('existingapimgmtname')]"}, "logtoeventhubloggername": {"value": "[variables('apimanagementloggername')]"}, "eventhubns": {"value": "[variables('eventhubns')]"}, "eventhubname": {"value": "[variables('eventhubname')]"}, "eventhubsendpolicyname": {"value": "[variables('eventhubsendpolicyname')]"}, "tags": {"value": "[variables('tags')]"}}}} |
This sample contains a script to easily migrate template gallery templates to templateSpec resources. | {"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "storage-deploy", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('azstoragetempluri')]", "contentversion": "1.0.0.0"}, "parameters": {"storageaccountname": {"value": "[variables('storageaccountname')]"}, "tags": {"value": "[variables('tags')]"}, "location": {"value": "[parameters('location')]"}}}}{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "eventhub-deploy", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('azeventhubtempluri')]", "contentversion": "1.0.0.0"}, "parameters": {"eventhubnsname": {"value": "[parameters('dnsnameprefix')]"}, "eventhubname": {"value": "[parameters('dnsnameprefix')]"}, "eventhubsendpolicyname": {"value": "[variables('eventhubsendpolicyname')]"}, "eventhublistenpolicy": {"value": "[variables('eventhublistenpolicy')]"}, "tags": {"value": "[variables('tags')]"}, "location": {"value": "[parameters('location')]"}}}}{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "api-management-logger-deploy", "condition": "[variables('apimgrspecified')]", "dependson": ["[resourceid('microsoft.resources/deployments", "eventhub-deploy')]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('azapimgmtloggerinstalltempluri')]", "contentversion": "1.0.0.0"}, "parameters": {"existingapimgmtname": {"value": "[parameters('existingapimgmtname')]"}, "logtoeventhubloggername": {"value": "[variables('apimanagementloggername')]"}, "eventhubns": {"value": "[variables('eventhubns')]"}, "eventhubname": {"value": "[variables('eventhubname')]"}, "eventhubsendpolicyname": {"value": "[variables('eventhubsendpolicyname')]"}, "tags": {"value": "[variables('tags')]"}}}}{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "app-service-plan-deploy", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('azappserviceplantempluri')]", "contentversion": "1.0.0.0"}, "parameters": {"appserviceplanname": {"value": "[parameters('dnsnameprefix')]"}, "appserviceskuname": {"value": "[parameters('azureappservicesku')]"}, "tags": {"value": "[variables('tags')]"}, "location": {"value": "[parameters('location')]"}}}} |
This sample contains a script to easily migrate template gallery templates to templateSpec resources. | {"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "storage-deploy", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('azstoragetempluri')]", "contentversion": "1.0.0.0"}, "parameters": {"storageaccountname": {"value": "[variables('storageaccountname')]"}, "tags": {"value": "[variables('tags')]"}, "location": {"value": "[parameters('location')]"}}}}{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "eventhub-deploy", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('azeventhubtempluri')]", "contentversion": "1.0.0.0"}, "parameters": {"eventhubnsname": {"value": "[parameters('dnsnameprefix')]"}, "eventhubname": {"value": "[parameters('dnsnameprefix')]"}, "eventhubsendpolicyname": {"value": "[variables('eventhubsendpolicyname')]"}, "eventhublistenpolicy": {"value": "[variables('eventhublistenpolicy')]"}, "tags": {"value": "[variables('tags')]"}, "location": {"value": "[parameters('location')]"}}}}{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "api-management-logger-deploy", "condition": "[variables('apimgrspecified')]", "dependson": ["[resourceid('microsoft.resources/deployments", "eventhub-deploy')]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('azapimgmtloggerinstalltempluri')]", "contentversion": "1.0.0.0"}, "parameters": {"existingapimgmtname": {"value": "[parameters('existingapimgmtname')]"}, "logtoeventhubloggername": {"value": "[variables('apimanagementloggername')]"}, "eventhubns": {"value": "[variables('eventhubns')]"}, "eventhubname": {"value": "[variables('eventhubname')]"}, "eventhubsendpolicyname": {"value": "[variables('eventhubsendpolicyname')]"}, "tags": {"value": "[variables('tags')]"}}}}{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "app-service-plan-deploy", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('azappserviceplantempluri')]", "contentversion": "1.0.0.0"}, "parameters": {"appserviceplanname": {"value": "[parameters('dnsnameprefix')]"}, "appserviceskuname": {"value": "[parameters('azureappservicesku')]"}, "tags": {"value": "[variables('tags')]"}, "location": {"value": "[parameters('location')]"}}}}{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "app-service-deploy", "dependson": ["[resourceid('microsoft.resources/deployments", "app-service-plan-deploy')]", "[resourceid('microsoft.resources/deployments", "storage-deploy')]", "[resourceid('microsoft.resources/deployments", "eventhub-deploy')]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('azappservicetempluri')]", "contentversion": "1.0.0.0"}, "parameters": {"appservicename": {"value": "[parameters('dnsnameprefix')]"}, "appserviceplanname": {"value": "[parameters('dnsnameprefix')]"}, "eventhubnamespace": {"value": "[parameters('dnsnameprefix')]"}, "eventhubname": {"value": "[parameters('dnsnameprefix')]"}, "eventhublistenpolicy": {"value": "[variables('eventhublistenpolicy')]"}, "apimevtstorname": {"value": "[variables('storageaccountname')]"}, "apimevtmoesifapplicationid": {"value": "[parameters('moesifapplicationid')]"}, "apimevtmoesifsessiontoken": {"value": "[variables('moesifsessiontoken')]"}, "apimevtmoesifapiversion": {"value": "[variables('moesifapiversion')]"}, "azurewebsitesdomain": {"value": "[variables('azurewebsitesdomain')]"}, "tags": {"value": "[variables('tags')]"}, "location": {"value": "[parameters('location')]"}}}} |
This sample contains a script to easily migrate template gallery templates to templateSpec resources. | {"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "storage-deploy", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('azstoragetempluri')]", "contentversion": "1.0.0.0"}, "parameters": {"storageaccountname": {"value": "[variables('storageaccountname')]"}, "tags": {"value": "[variables('tags')]"}, "location": {"value": "[parameters('location')]"}}}}{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "eventhub-deploy", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('azeventhubtempluri')]", "contentversion": "1.0.0.0"}, "parameters": {"eventhubnsname": {"value": "[parameters('dnsnameprefix')]"}, "eventhubname": {"value": "[parameters('dnsnameprefix')]"}, "eventhubsendpolicyname": {"value": "[variables('eventhubsendpolicyname')]"}, "eventhublistenpolicy": {"value": "[variables('eventhublistenpolicy')]"}, "tags": {"value": "[variables('tags')]"}, "location": {"value": "[parameters('location')]"}}}}{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "api-management-logger-deploy", "condition": "[variables('apimgrspecified')]", "dependson": ["[resourceid('microsoft.resources/deployments", "eventhub-deploy')]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('azapimgmtloggerinstalltempluri')]", "contentversion": "1.0.0.0"}, "parameters": {"existingapimgmtname": {"value": "[parameters('existingapimgmtname')]"}, "logtoeventhubloggername": {"value": "[variables('apimanagementloggername')]"}, "eventhubns": {"value": "[variables('eventhubns')]"}, "eventhubname": {"value": "[variables('eventhubname')]"}, "eventhubsendpolicyname": {"value": "[variables('eventhubsendpolicyname')]"}, "tags": {"value": "[variables('tags')]"}}}}{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "app-service-plan-deploy", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('azappserviceplantempluri')]", "contentversion": "1.0.0.0"}, "parameters": {"appserviceplanname": {"value": "[parameters('dnsnameprefix')]"}, "appserviceskuname": {"value": "[parameters('azureappservicesku')]"}, "tags": {"value": "[variables('tags')]"}, "location": {"value": "[parameters('location')]"}}}}{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "app-service-deploy", "dependson": ["[resourceid('microsoft.resources/deployments", "app-service-plan-deploy')]", "[resourceid('microsoft.resources/deployments", "storage-deploy')]", "[resourceid('microsoft.resources/deployments", "eventhub-deploy')]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('azappservicetempluri')]", "contentversion": "1.0.0.0"}, "parameters": {"appservicename": {"value": "[parameters('dnsnameprefix')]"}, "appserviceplanname": {"value": "[parameters('dnsnameprefix')]"}, "eventhubnamespace": {"value": "[parameters('dnsnameprefix')]"}, "eventhubname": {"value": "[parameters('dnsnameprefix')]"}, "eventhublistenpolicy": {"value": "[variables('eventhublistenpolicy')]"}, "apimevtstorname": {"value": "[variables('storageaccountname')]"}, "apimevtmoesifapplicationid": {"value": "[parameters('moesifapplicationid')]"}, "apimevtmoesifsessiontoken": {"value": "[variables('moesifsessiontoken')]"}, "apimevtmoesifapiversion": {"value": "[variables('moesifapiversion')]"}, "azurewebsitesdomain": {"value": "[variables('azurewebsitesdomain')]"}, "tags": {"value": "[variables('tags')]"}, "location": {"value": "[parameters('location')]"}}}}{"type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "name": "app-service-webjob-msdeploy", "dependson": ["[resourceid('microsoft.resources/deployments", "app-service-deploy')]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('azappservicewebjobtempluri')]", "contentversion": "1.0.0.0"}, "parameters": {"appservicename": {"value": "[parameters('dnsnameprefix')]"}, "webjobzipdeployurl": {"value": "[variables('azappservicewebjobzipuri')]"}}}} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/networksecuritygroups", "name": "[variables('apimnsgname')]", "apiversion": "2020-06-01", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "client_communication_to_api_management", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "80", "sourceaddressprefix": "internet", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 100, "direction": "inbound"}}, {"name": "secure_client_communication_to_api_management", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "internet", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 110, "direction": "inbound"}}, {"name": "management_endpoint_for_azure_portal_and_powershell", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "3443", "sourceaddressprefix": "apimanagement", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 120, "direction": "inbound"}}, {"name": "dependency_on_redis_cache", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "6381-6383", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 130, "direction": "inbound"}}, {"name": "dependency_to_sync_rate_limit_inbound", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "4290", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 135, "direction": "inbound"}}, {"name": "dependency_on_azure_sql", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "1433", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "sql", "access": "allow", "priority": 140, "direction": "outbound"}}, {"name": "dependency_for_log_to_event_hub_policy", "properties": {"protocol": "*", "sourceportrange": "*", "destinationportrange": "5671", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "eventhub", "access": "allow", "priority": 150, "direction": "outbound"}}, {"name": "dependency_on_redis_cache_outbound", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "6381-6383", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 160, "direction": "outbound"}}, {"name": "depenedency_to_sync_ratelimit_outbound", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "4290", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 165, "direction": "outbound"}}, {"name": "dependency_on_azure_file_share_for_git", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "445", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "storage", "access": "allow", "priority": 170, "direction": "outbound"}}, {"name": "azure_infrastructure_load_balancer", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "6390", "sourceaddressprefix": "azureloadbalancer", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 180, "direction": "inbound"}}, {"name": "publish_diagnosticlogs_and_metrics", "properties": {"description": "apim logs and metrics for consumption by admins and your it team are all part of the management plane", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azuremonitor", "access": "allow", "priority": 185, "direction": "outbound", "destinationportranges": ["443", "12000", "1886"]}}, {"name": "connect_to_smtp_relay_for_sendingemails", "properties": {"description": "apim features the ability to generate email traffic as part of the data plane and the management plane", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "internet", "access": "allow", "priority": 190, "direction": "outbound", "destinationportranges": ["25", "587", "25028"]}}, {"name": "authenticate_to_azure_active_directory", "properties": {"description": "connect to azure active directory for developer portal authentication or for oauth2 flow during any proxy authentication", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azureactivedirectory", "access": "allow", "priority": 200, "direction": "outbound", "destinationportranges": ["80", "443"]}}, {"name": "dependency_on_azure_storage", "properties": {"description": "apim service dependency on azure blob and azure table storage", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "storage", "access": "allow", "priority": 100, "direction": "outbound"}}, {"name": "publish_monitoring_logs", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azurecloud", "access": "allow", "priority": 300, "direction": "outbound"}}, {"name": "access_keyvault", "properties": {"description": "allow apim service control plane access to keyvault to refresh secrets", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azurekeyvault", "access": "allow", "priority": 350, "direction": "outbound", "destinationportranges": ["443"]}}, {"name": "deny_all_internet_outbound", "properties": {"protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "internet", "access": "deny", "priority": 999, "direction": "outbound"}}]}} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/networksecuritygroups", "name": "[variables('apimnsgname')]", "apiversion": "2020-06-01", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "client_communication_to_api_management", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "80", "sourceaddressprefix": "internet", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 100, "direction": "inbound"}}, {"name": "secure_client_communication_to_api_management", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "internet", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 110, "direction": "inbound"}}, {"name": "management_endpoint_for_azure_portal_and_powershell", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "3443", "sourceaddressprefix": "apimanagement", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 120, "direction": "inbound"}}, {"name": "dependency_on_redis_cache", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "6381-6383", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 130, "direction": "inbound"}}, {"name": "dependency_to_sync_rate_limit_inbound", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "4290", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 135, "direction": "inbound"}}, {"name": "dependency_on_azure_sql", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "1433", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "sql", "access": "allow", "priority": 140, "direction": "outbound"}}, {"name": "dependency_for_log_to_event_hub_policy", "properties": {"protocol": "*", "sourceportrange": "*", "destinationportrange": "5671", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "eventhub", "access": "allow", "priority": 150, "direction": "outbound"}}, {"name": "dependency_on_redis_cache_outbound", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "6381-6383", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 160, "direction": "outbound"}}, {"name": "depenedency_to_sync_ratelimit_outbound", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "4290", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 165, "direction": "outbound"}}, {"name": "dependency_on_azure_file_share_for_git", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "445", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "storage", "access": "allow", "priority": 170, "direction": "outbound"}}, {"name": "azure_infrastructure_load_balancer", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "6390", "sourceaddressprefix": "azureloadbalancer", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 180, "direction": "inbound"}}, {"name": "publish_diagnosticlogs_and_metrics", "properties": {"description": "apim logs and metrics for consumption by admins and your it team are all part of the management plane", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azuremonitor", "access": "allow", "priority": 185, "direction": "outbound", "destinationportranges": ["443", "12000", "1886"]}}, {"name": "connect_to_smtp_relay_for_sendingemails", "properties": {"description": "apim features the ability to generate email traffic as part of the data plane and the management plane", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "internet", "access": "allow", "priority": 190, "direction": "outbound", "destinationportranges": ["25", "587", "25028"]}}, {"name": "authenticate_to_azure_active_directory", "properties": {"description": "connect to azure active directory for developer portal authentication or for oauth2 flow during any proxy authentication", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azureactivedirectory", "access": "allow", "priority": 200, "direction": "outbound", "destinationportranges": ["80", "443"]}}, {"name": "dependency_on_azure_storage", "properties": {"description": "apim service dependency on azure blob and azure table storage", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "storage", "access": "allow", "priority": 100, "direction": "outbound"}}, {"name": "publish_monitoring_logs", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azurecloud", "access": "allow", "priority": 300, "direction": "outbound"}}, {"name": "access_keyvault", "properties": {"description": "allow apim service control plane access to keyvault to refresh secrets", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azurekeyvault", "access": "allow", "priority": 350, "direction": "outbound", "destinationportranges": ["443"]}}, {"name": "deny_all_internet_outbound", "properties": {"protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "internet", "access": "deny", "priority": 999, "direction": "outbound"}}]}}{"apiversion": "2020-05-01", "type": "microsoft.network/publicipaddresses", "name": "[parameters('publicipname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('publicipsku')]"}, "properties": {"publicipallocationmethod": "[parameters('publicipallocationmethod')]", "publicipaddressversion": "ipv4", "dnssettings": {"domainnamelabel": "[parameters('dnslabelprefix')]"}}} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/networksecuritygroups", "name": "[variables('apimnsgname')]", "apiversion": "2020-06-01", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "client_communication_to_api_management", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "80", "sourceaddressprefix": "internet", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 100, "direction": "inbound"}}, {"name": "secure_client_communication_to_api_management", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "internet", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 110, "direction": "inbound"}}, {"name": "management_endpoint_for_azure_portal_and_powershell", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "3443", "sourceaddressprefix": "apimanagement", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 120, "direction": "inbound"}}, {"name": "dependency_on_redis_cache", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "6381-6383", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 130, "direction": "inbound"}}, {"name": "dependency_to_sync_rate_limit_inbound", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "4290", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 135, "direction": "inbound"}}, {"name": "dependency_on_azure_sql", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "1433", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "sql", "access": "allow", "priority": 140, "direction": "outbound"}}, {"name": "dependency_for_log_to_event_hub_policy", "properties": {"protocol": "*", "sourceportrange": "*", "destinationportrange": "5671", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "eventhub", "access": "allow", "priority": 150, "direction": "outbound"}}, {"name": "dependency_on_redis_cache_outbound", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "6381-6383", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 160, "direction": "outbound"}}, {"name": "depenedency_to_sync_ratelimit_outbound", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "4290", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 165, "direction": "outbound"}}, {"name": "dependency_on_azure_file_share_for_git", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "445", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "storage", "access": "allow", "priority": 170, "direction": "outbound"}}, {"name": "azure_infrastructure_load_balancer", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "6390", "sourceaddressprefix": "azureloadbalancer", "destinationaddressprefix": "virtualnetwork", "access": "allow", "priority": 180, "direction": "inbound"}}, {"name": "publish_diagnosticlogs_and_metrics", "properties": {"description": "apim logs and metrics for consumption by admins and your it team are all part of the management plane", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azuremonitor", "access": "allow", "priority": 185, "direction": "outbound", "destinationportranges": ["443", "12000", "1886"]}}, {"name": "connect_to_smtp_relay_for_sendingemails", "properties": {"description": "apim features the ability to generate email traffic as part of the data plane and the management plane", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "internet", "access": "allow", "priority": 190, "direction": "outbound", "destinationportranges": ["25", "587", "25028"]}}, {"name": "authenticate_to_azure_active_directory", "properties": {"description": "connect to azure active directory for developer portal authentication or for oauth2 flow during any proxy authentication", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azureactivedirectory", "access": "allow", "priority": 200, "direction": "outbound", "destinationportranges": ["80", "443"]}}, {"name": "dependency_on_azure_storage", "properties": {"description": "apim service dependency on azure blob and azure table storage", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "storage", "access": "allow", "priority": 100, "direction": "outbound"}}, {"name": "publish_monitoring_logs", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "443", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azurecloud", "access": "allow", "priority": 300, "direction": "outbound"}}, {"name": "access_keyvault", "properties": {"description": "allow apim service control plane access to keyvault to refresh secrets", "protocol": "tcp", "sourceportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "azurekeyvault", "access": "allow", "priority": 350, "direction": "outbound", "destinationportranges": ["443"]}}, {"name": "deny_all_internet_outbound", "properties": {"protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "virtualnetwork", "destinationaddressprefix": "internet", "access": "deny", "priority": 999, "direction": "outbound"}}]}}{"apiversion": "2020-05-01", "type": "microsoft.network/publicipaddresses", "name": "[parameters('publicipname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('publicipsku')]"}, "properties": {"publicipallocationmethod": "[parameters('publicipallocationmethod')]", "publicipaddressversion": "ipv4", "dnssettings": {"domainnamelabel": "[parameters('dnslabelprefix')]"}}}{"apiversion": "2020-06-01", "type": "microsoft.network/virtualnetworks", "name": "[parameters('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups", variables('apimnsgname'))]"], "properties": {"addressspace": {"addressprefixes": ["[parameters('virtualnetworkaddressprefix')]"]}, "subnets": [{"name": "[parameters('subnetname')]", "properties": {"addressprefix": "[parameters('subnetprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('apimnsgname'))]"}, "serviceendpoints": "[parameters('apimsubnetserviceendpoints')]"}}]}} |
This template creates a data collection rule defining the data source (Syslog) and the destination workspace. | {"scope": "[format('microsoft.apimanagement/service/{0}", variables('apim-name'))]", "type": "microsoft.insights/diagnosticsettings", "apiversion": "2017-05-01-preview", "name": "logtoanalytics", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.apimanagement/service", variables('apim-name'))]"], "properties": {"workspaceid": "[parameters('log-analytics-workspace-id')]", "logs": [{"category": "gatewaylogs", "enabled": true}], "metrics": [{"category": "allmetrics", "enabled": true}]}} |
This template creates a data collection rule defining the data source (Syslog) and the destination workspace. | {"scope": "[format('microsoft.apimanagement/service/{0}", variables('apim-name'))]", "type": "microsoft.insights/diagnosticsettings", "apiversion": "2017-05-01-preview", "name": "logtoanalytics", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.apimanagement/service", variables('apim-name'))]"], "properties": {"workspaceid": "[parameters('log-analytics-workspace-id')]", "logs": [{"category": "gatewaylogs", "enabled": true}], "metrics": [{"category": "allmetrics", "enabled": true}]}}{"scope": "[format('microsoft.network/applicationgateways/{0}", variables('app-gateway-name'))]", "type": "microsoft.insights/diagnosticsettings", "apiversion": "2017-05-01-preview", "name": "logtoanalytics", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/applicationgateways", variables('app-gateway-name'))]"], "properties": {"workspaceid": "[parameters('log-analytics-workspace-id')]", "logs": [{"category": "applicationgatewayaccesslog", "enabled": true}, {"category": "applicationgatewayperformancelog", "enabled": true}, {"category": "applicationgatewayfirewalllog", "enabled": true}], "metrics": [{"category": "allmetrics", "enabled": true}]}}{"type": "microsoft.insights/components", "apiversion": "2020-02-02-preview", "name": "[variables('app-insights-name')]", "location": "[parameters('location')]", "kind": "web", "properties": {"application_type": "web", "workspaceresourceid": "[parameters('log-analytics-workspace-id')]"}} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/applicationgateways", "apiversion": "2020-11-01", "name": "[variables('app-gateway-name')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.insights/components", variables('app-insights-name'))]", "[resourceid('microsoft.network/publicipaddresses", variables('public-ip-name'))]", "[resourceid('microsoft.network/virtualnetworks", variables('vnet-name'))]", "[resourceid('microsoft.network/privatednszones", "azure-api.net')]"], "properties": {"sku": {"name": "waf_v2", "tier": "waf_v2", "capacity": "[parameters('app-gateway-capacity')]"}, "gatewayipconfigurations": [{"name": "appgatewayipconfig", "properties": {"subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('vnet-name'), "appgatewaysubnet')]"}}}], "frontendipconfigurations": [{"name": "appgwpublicfrontendip", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", variables('public-ip-name'))]"}}}], "frontendports": [{"name": "port_80", "properties": {"port": 80}}], "backendaddresspools": [{"name": "gatewaybackend", "properties": {"backendaddresses": [{"fqdn": "[concat(variables('apim-name'), ".azure-api.net')]"}]}}], "backendhttpsettingscollection": [{"name": "apim-gateway-https-setting", "properties": {"port": 443, "protocol": "https", "cookiebasedaffinity": "disabled", "hostname": "[concat(variables('apim-name'), ".azure-api.net')]", "pickhostnamefrombackendaddress": false, "requesttimeout": 20, "probe": {"id": "[resourceid('microsoft.network/applicationgateways/probes", variables('app-gateway-name'), "apim-gateway-probe')]"}}}], "httplisteners": [{"name": "apim-listener", "properties": {"frontendipconfiguration": {"id": "[resourceid('microsoft.network/applicationgateways/frontendipconfigurations", variables('app-gateway-name'), "appgwpublicfrontendip')]"}, "frontendport": {"id": "[resourceid('microsoft.network/applicationgateways/frontendports", variables('app-gateway-name'), "port_80')]"}, "protocol": "http", "requireservernameindication": false}}], "requestroutingrules": [{"name": "apim-routing-rule", "properties": {"ruletype": "basic", "httplistener": {"id": "[resourceid('microsoft.network/applicationgateways/httplisteners", variables('app-gateway-name'), "apim-listener')]"}, "backendaddresspool": {"id": "[resourceid('microsoft.network/applicationgateways/backendaddresspools", variables('app-gateway-name'), "gatewaybackend')]"}, "backendhttpsettings": {"id": "[resourceid('microsoft.network/applicationgateways/backendhttpsettingscollection", variables('app-gateway-name'), "apim-gateway-https-setting')]"}}}], "probes": [{"name": "apim-gateway-probe", "properties": {"protocol": "https", "host": "[concat(variables('apim-name'), ".azure-api.net')]", "port": 443, "path": "/status-0123456789abcdef", "interval": 30, "timeout": 120, "unhealthythreshold": 8, "pickhostnamefrombackendhttpsettings": false, "minservers": 0}}], "webapplicationfirewallconfiguration": {"enabled": true, "firewallmode": "detection", "rulesettype": "owasp", "rulesetversion": "3.2", "requestbodycheck": true, "maxrequestbodysizeinkb": 128, "fileuploadlimitinmb": 100}}} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/applicationgateways", "apiversion": "2020-11-01", "name": "[variables('app-gateway-name')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.insights/components", variables('app-insights-name'))]", "[resourceid('microsoft.network/publicipaddresses", variables('public-ip-name'))]", "[resourceid('microsoft.network/virtualnetworks", variables('vnet-name'))]", "[resourceid('microsoft.network/privatednszones", "azure-api.net')]"], "properties": {"sku": {"name": "waf_v2", "tier": "waf_v2", "capacity": "[parameters('app-gateway-capacity')]"}, "gatewayipconfigurations": [{"name": "appgatewayipconfig", "properties": {"subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('vnet-name'), "appgatewaysubnet')]"}}}], "frontendipconfigurations": [{"name": "appgwpublicfrontendip", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", variables('public-ip-name'))]"}}}], "frontendports": [{"name": "port_80", "properties": {"port": 80}}], "backendaddresspools": [{"name": "gatewaybackend", "properties": {"backendaddresses": [{"fqdn": "[concat(variables('apim-name'), ".azure-api.net')]"}]}}], "backendhttpsettingscollection": [{"name": "apim-gateway-https-setting", "properties": {"port": 443, "protocol": "https", "cookiebasedaffinity": "disabled", "hostname": "[concat(variables('apim-name'), ".azure-api.net')]", "pickhostnamefrombackendaddress": false, "requesttimeout": 20, "probe": {"id": "[resourceid('microsoft.network/applicationgateways/probes", variables('app-gateway-name'), "apim-gateway-probe')]"}}}], "httplisteners": [{"name": "apim-listener", "properties": {"frontendipconfiguration": {"id": "[resourceid('microsoft.network/applicationgateways/frontendipconfigurations", variables('app-gateway-name'), "appgwpublicfrontendip')]"}, "frontendport": {"id": "[resourceid('microsoft.network/applicationgateways/frontendports", variables('app-gateway-name'), "port_80')]"}, "protocol": "http", "requireservernameindication": false}}], "requestroutingrules": [{"name": "apim-routing-rule", "properties": {"ruletype": "basic", "httplistener": {"id": "[resourceid('microsoft.network/applicationgateways/httplisteners", variables('app-gateway-name'), "apim-listener')]"}, "backendaddresspool": {"id": "[resourceid('microsoft.network/applicationgateways/backendaddresspools", variables('app-gateway-name'), "gatewaybackend')]"}, "backendhttpsettings": {"id": "[resourceid('microsoft.network/applicationgateways/backendhttpsettingscollection", variables('app-gateway-name'), "apim-gateway-https-setting')]"}}}], "probes": [{"name": "apim-gateway-probe", "properties": {"protocol": "https", "host": "[concat(variables('apim-name'), ".azure-api.net')]", "port": 443, "path": "/status-0123456789abcdef", "interval": 30, "timeout": 120, "unhealthythreshold": 8, "pickhostnamefrombackendhttpsettings": false, "minservers": 0}}], "webapplicationfirewallconfiguration": {"enabled": true, "firewallmode": "detection", "rulesettype": "owasp", "rulesetversion": "3.2", "requestbodycheck": true, "maxrequestbodysizeinkb": 128, "fileuploadlimitinmb": 100}}}{"type": "microsoft.network/publicipaddresses", "apiversion": "2020-11-01", "name": "[variables('public-ip-name')]", "location": "[parameters('location')]", "sku": {"name": "standard", "tier": "regional"}, "properties": {"publicipallocationmethod": "static", "dnssettings": {"domainnamelabel": "[parameters('base-name')]"}}} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/applicationgateways", "apiversion": "2020-11-01", "name": "[variables('app-gateway-name')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.insights/components", variables('app-insights-name'))]", "[resourceid('microsoft.network/publicipaddresses", variables('public-ip-name'))]", "[resourceid('microsoft.network/virtualnetworks", variables('vnet-name'))]", "[resourceid('microsoft.network/privatednszones", "azure-api.net')]"], "properties": {"sku": {"name": "waf_v2", "tier": "waf_v2", "capacity": "[parameters('app-gateway-capacity')]"}, "gatewayipconfigurations": [{"name": "appgatewayipconfig", "properties": {"subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('vnet-name'), "appgatewaysubnet')]"}}}], "frontendipconfigurations": [{"name": "appgwpublicfrontendip", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", variables('public-ip-name'))]"}}}], "frontendports": [{"name": "port_80", "properties": {"port": 80}}], "backendaddresspools": [{"name": "gatewaybackend", "properties": {"backendaddresses": [{"fqdn": "[concat(variables('apim-name'), ".azure-api.net')]"}]}}], "backendhttpsettingscollection": [{"name": "apim-gateway-https-setting", "properties": {"port": 443, "protocol": "https", "cookiebasedaffinity": "disabled", "hostname": "[concat(variables('apim-name'), ".azure-api.net')]", "pickhostnamefrombackendaddress": false, "requesttimeout": 20, "probe": {"id": "[resourceid('microsoft.network/applicationgateways/probes", variables('app-gateway-name'), "apim-gateway-probe')]"}}}], "httplisteners": [{"name": "apim-listener", "properties": {"frontendipconfiguration": {"id": "[resourceid('microsoft.network/applicationgateways/frontendipconfigurations", variables('app-gateway-name'), "appgwpublicfrontendip')]"}, "frontendport": {"id": "[resourceid('microsoft.network/applicationgateways/frontendports", variables('app-gateway-name'), "port_80')]"}, "protocol": "http", "requireservernameindication": false}}], "requestroutingrules": [{"name": "apim-routing-rule", "properties": {"ruletype": "basic", "httplistener": {"id": "[resourceid('microsoft.network/applicationgateways/httplisteners", variables('app-gateway-name'), "apim-listener')]"}, "backendaddresspool": {"id": "[resourceid('microsoft.network/applicationgateways/backendaddresspools", variables('app-gateway-name'), "gatewaybackend')]"}, "backendhttpsettings": {"id": "[resourceid('microsoft.network/applicationgateways/backendhttpsettingscollection", variables('app-gateway-name'), "apim-gateway-https-setting')]"}}}], "probes": [{"name": "apim-gateway-probe", "properties": {"protocol": "https", "host": "[concat(variables('apim-name'), ".azure-api.net')]", "port": 443, "path": "/status-0123456789abcdef", "interval": 30, "timeout": 120, "unhealthythreshold": 8, "pickhostnamefrombackendhttpsettings": false, "minservers": 0}}], "webapplicationfirewallconfiguration": {"enabled": true, "firewallmode": "detection", "rulesettype": "owasp", "rulesetversion": "3.2", "requestbodycheck": true, "maxrequestbodysizeinkb": 128, "fileuploadlimitinmb": 100}}}{"type": "microsoft.network/publicipaddresses", "apiversion": "2020-11-01", "name": "[variables('public-ip-name')]", "location": "[parameters('location')]", "sku": {"name": "standard", "tier": "regional"}, "properties": {"publicipallocationmethod": "static", "dnssettings": {"domainnamelabel": "[parameters('base-name')]"}}}{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-11-01", "name": "[variables('vnet-name')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('vnet-address-prefix')]"]}, "subnets": [{"type": "subnets", "name": "appgatewaysubnet", "properties": {"addressprefix": "[parameters('app-gateway-subnet-prefix')]", "serviceendpoints": [{"service": "microsoft.keyvault", "locations": ["*"]}], "privateendpointnetworkpolicies": "enabled", "privatelinkservicenetworkpolicies": "enabled"}}, {"type": "subnets", "name": "apimsubnet", "properties": {"addressprefix": "[parameters('apim-subnet-prefix')]", "serviceendpoints": [{"service": "microsoft.keyvault", "locations": ["*"]}], "privateendpointnetworkpolicies": "enabled", "privatelinkservicenetworkpolicies": "enabled"}}]}} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/applicationgateways", "apiversion": "2020-11-01", "name": "[variables('app-gateway-name')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.insights/components", variables('app-insights-name'))]", "[resourceid('microsoft.network/publicipaddresses", variables('public-ip-name'))]", "[resourceid('microsoft.network/virtualnetworks", variables('vnet-name'))]", "[resourceid('microsoft.network/privatednszones", "azure-api.net')]"], "properties": {"sku": {"name": "waf_v2", "tier": "waf_v2", "capacity": "[parameters('app-gateway-capacity')]"}, "gatewayipconfigurations": [{"name": "appgatewayipconfig", "properties": {"subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('vnet-name'), "appgatewaysubnet')]"}}}], "frontendipconfigurations": [{"name": "appgwpublicfrontendip", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", variables('public-ip-name'))]"}}}], "frontendports": [{"name": "port_80", "properties": {"port": 80}}], "backendaddresspools": [{"name": "gatewaybackend", "properties": {"backendaddresses": [{"fqdn": "[concat(variables('apim-name'), ".azure-api.net')]"}]}}], "backendhttpsettingscollection": [{"name": "apim-gateway-https-setting", "properties": {"port": 443, "protocol": "https", "cookiebasedaffinity": "disabled", "hostname": "[concat(variables('apim-name'), ".azure-api.net')]", "pickhostnamefrombackendaddress": false, "requesttimeout": 20, "probe": {"id": "[resourceid('microsoft.network/applicationgateways/probes", variables('app-gateway-name'), "apim-gateway-probe')]"}}}], "httplisteners": [{"name": "apim-listener", "properties": {"frontendipconfiguration": {"id": "[resourceid('microsoft.network/applicationgateways/frontendipconfigurations", variables('app-gateway-name'), "appgwpublicfrontendip')]"}, "frontendport": {"id": "[resourceid('microsoft.network/applicationgateways/frontendports", variables('app-gateway-name'), "port_80')]"}, "protocol": "http", "requireservernameindication": false}}], "requestroutingrules": [{"name": "apim-routing-rule", "properties": {"ruletype": "basic", "httplistener": {"id": "[resourceid('microsoft.network/applicationgateways/httplisteners", variables('app-gateway-name'), "apim-listener')]"}, "backendaddresspool": {"id": "[resourceid('microsoft.network/applicationgateways/backendaddresspools", variables('app-gateway-name'), "gatewaybackend')]"}, "backendhttpsettings": {"id": "[resourceid('microsoft.network/applicationgateways/backendhttpsettingscollection", variables('app-gateway-name'), "apim-gateway-https-setting')]"}}}], "probes": [{"name": "apim-gateway-probe", "properties": {"protocol": "https", "host": "[concat(variables('apim-name'), ".azure-api.net')]", "port": 443, "path": "/status-0123456789abcdef", "interval": 30, "timeout": 120, "unhealthythreshold": 8, "pickhostnamefrombackendhttpsettings": false, "minservers": 0}}], "webapplicationfirewallconfiguration": {"enabled": true, "firewallmode": "detection", "rulesettype": "owasp", "rulesetversion": "3.2", "requestbodycheck": true, "maxrequestbodysizeinkb": 128, "fileuploadlimitinmb": 100}}}{"type": "microsoft.network/publicipaddresses", "apiversion": "2020-11-01", "name": "[variables('public-ip-name')]", "location": "[parameters('location')]", "sku": {"name": "standard", "tier": "regional"}, "properties": {"publicipallocationmethod": "static", "dnssettings": {"domainnamelabel": "[parameters('base-name')]"}}}{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-11-01", "name": "[variables('vnet-name')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('vnet-address-prefix')]"]}, "subnets": [{"type": "subnets", "name": "appgatewaysubnet", "properties": {"addressprefix": "[parameters('app-gateway-subnet-prefix')]", "serviceendpoints": [{"service": "microsoft.keyvault", "locations": ["*"]}], "privateendpointnetworkpolicies": "enabled", "privatelinkservicenetworkpolicies": "enabled"}}, {"type": "subnets", "name": "apimsubnet", "properties": {"addressprefix": "[parameters('apim-subnet-prefix')]", "serviceendpoints": [{"service": "microsoft.keyvault", "locations": ["*"]}], "privateendpointnetworkpolicies": "enabled", "privatelinkservicenetworkpolicies": "enabled"}}]}}{"type": "microsoft.network/privatednszones", "apiversion": "2018-09-01", "name": "azure-api.net", "location": "global", "dependson": ["[resourceid('microsoft.apimanagement/service", variables('apim-name'))]", "[resourceid('microsoft.network/virtualnetworks", variables('vnet-name'))]"], "resources": [{"condition": true, "type": "a", "apiversion": "2018-09-01", "name": "[variables('apim-name')]", "location": "global", "dependson": ["[resourceid('microsoft.network/privatednszones", "azure-api.net')]", "[resourceid('microsoft.apimanagement/service", variables('apim-name'))]"], "properties": {"ttl": 36000, "arecords": [{"ipv4address": "[reference(resourceid('microsoft.apimanagement/service", variables('apim-name'))).privateipaddresses[0]]"}]}}, {"type": "virtualnetworklinks", "apiversion": "2020-06-01", "name": "[variables('vnet-dns-link-name')]", "location": "global", "dependson": ["[resourceid('microsoft.network/privatednszones", "azure-api.net')]"], "properties": {"registrationenabled": true, "virtualnetwork": {"id": "[resourceid('microsoft.network/virtualnetworks", variables('vnet-name'))]"}}}], "properties": {}} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/virtualnetworks", "apiversion": "2020-11-01", "name": "[parameters('vnetname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('vnetaddressprefix')]"]}}} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/virtualnetworks", "apiversion": "2020-11-01", "name": "[parameters('vnetname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('vnetaddressprefix')]"]}}}{"type": "microsoft.network/virtualnetworks/subnets", "apiversion": "2020-11-01", "name": "[format('{0}/{1}", parameters('vnetname'), parameters('subnetname'))]", "properties": {"addressprefix": "[parameters('subnetaddressprefix')]", "delegations": [{"name": "delegationservice", "properties": {"servicename": "microsoft.containerinstance/containergroups"}}]}, "dependson": ["[resourceid('microsoft.network/virtualnetworks", parameters('vnetname'))]"]} |
Establish connection to a VNET via an ExpressRoute circuit | {"type": "microsoft.network/virtualnetworks", "apiversion": "2020-11-01", "name": "[parameters('vnetname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[parameters('vnetaddressprefix')]"]}}}{"type": "microsoft.network/virtualnetworks/subnets", "apiversion": "2020-11-01", "name": "[format('{0}/{1}", parameters('vnetname'), parameters('subnetname'))]", "properties": {"addressprefix": "[parameters('subnetaddressprefix')]", "delegations": [{"name": "delegationservice", "properties": {"servicename": "microsoft.containerinstance/containergroups"}}]}, "dependson": ["[resourceid('microsoft.network/virtualnetworks", parameters('vnetname'))]"]}{"type": "microsoft.network/networkprofiles", "apiversion": "2020-11-01", "name": "[variables('networkprofilename')]", "location": "[parameters('location')]", "properties": {"containernetworkinterfaceconfigurations": [{"name": "[variables('interfaceconfigname')]", "properties": {"ipconfigurations": [{"name": "[variables('interfaceipconfig')]", "properties": {"subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", parameters('vnetname'), parameters('subnetname'))]"}}}]}}]}, "dependson": ["[resourceid('microsoft.network/virtualnetworks/subnets", parameters('vnetname'), parameters('subnetname'))]"]} |
This template uses Azure Managed Identity to assign access to Azure Maps. See more at https://aka.ms/amauth | {"type": "microsoft.authorization/roleassignments", "apiversion": "2020-04-01-preview", "scope": "[format('microsoft.storage/storageaccounts/{0}", variables('storageaccountname'))]", "name": "[variables('roleassignmentname')]", "properties": {"roledefinitionid": "[variables('roledefinitionid')]", "principalid": "[reference(resourceid('microsoft.managedidentity/userassignedidentities", variables('identityname'))).principalid]", "principaltype": "serviceprincipal"}, "dependson": ["[resourceid('microsoft.managedidentity/userassignedidentities", variables('identityname'))]", "[resourceid('microsoft.storage/storageaccounts", variables('storageaccountname'))]"]} |
This sample contains a script to easily migrate template gallery templates to templateSpec resources. | {"type": "microsoft.resources/deploymentscripts", "apiversion": "2020-10-01", "name": "[variables('scriptname')]", "location": "[parameters('location')]", "kind": "azurepowershell", "identity": {"type": "userassigned", "userassignedidentities": {"[resourceid('microsoft.managedidentity/userassignedidentities", variables('identityname'))]": {}}}, "properties": {"forceupdatetag": "1", "azpowershellversion": "3.0", "arguments": "[format(' -storageaccountname {0} -filesharename {1} -resourcegroupname {2}", variables('storageaccountname'), parameters('filesharename'), resourcegroup().name)]", "scriptcontent": "param([string] $storageaccountname, [string] $filesharename, [string] $resourcegroupname) get-azstorageaccount -storageaccountname $storageaccountname -resourcegroupname $resourcegroupname | new-azstorageshare -name $filesharename", "timeout": "pt5m", "cleanuppreference": "onsuccess", "retentioninterval": "p1d"}, "dependson": ["[resourceid('microsoft.managedidentity/userassignedidentities", variables('identityname'))]", "[resourceid('microsoft.storage/storageaccounts", variables('storageaccountname'))]"]} |