Skip to content
This repository was archived by the owner on Jun 11, 2026. It is now read-only.

Latest commit

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Nested Teamplates

The Nested Templates are built to be generic in nature with the ability to pass in the values needed to build your specific architecture. Below you will find details on how to utilize each of the nested templates in this folder:

Table of Contents

Network Templates

VNet Template

This template will deploy a Virtual Network in Azure. It accepts a dynamic list of Subnets with their IP Ranges.

Typical Nested Template used before

NA

Typical Nested Template used after

NSG-Empty-ExistingSubnet
NSG-ExistingSubnet

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
vNETNameName of the Virtual NetworkpocVNET
addressRangeAddress Range the the entire subnet10.0.0.0/16
subnetsArray of subnets with their IP Range. The subnet range should be seperated from the IP Range with the | deliminator["subnetA|10.0.1.0/24","subnetB|10.0.2.0/24","subnetC|10.0.3.0/24"]

Output

"vnetId": The resource id of the VNet created

Sample Deployment

{
"name": "deployVNET",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2017-05-10",
"dependsOn": [
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('deployVNETTemplateURL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"vNETName": {
"value": "pocVNET"
},
"addressRange": {
"value": "10.0.0.0/16"
},
"subnets": {
"value": [
"subnetA\|10.0.1.0/24",
"subnetB\|10.0.2.0/24",
"subnetC\|10.0.3.0/24"
]
}
}
}
} 

NSG-EMPTY-ExistingSubnet Template

This template will deploy an empty NSG and attach it to an exising Subnet

Typical Nested Template used before

VNet

Typical Nested Template used after

WindowsVirtualMachine
LinuxVirtualMachine
APIM
AppGW
AzureRedisCache
PrivateAKSMICluster
PrivateEndpoint

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
virtualNetworkNameName of the existing Virtual NetworkpocVNET
subnetNameName of the subnet in the existing VNet to attach the NSG tosubnetA
addressPrefixThe IP range of the subnet attaching the NSG to10.0.1.0/24
nsgNameName of the NSGsubnetA-NSG
privateEndpointNetworkPoliciesBoolean on if private endpoint network policies are enabledfalse

Output

na

Sample Deployment

 {
"name": "deployAKSNSG",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2018-05-01",
"resourceGroup": "[parameters('resourceGroup')]",
"dependsOn": [
"getAKSAddressPrefix"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('deployNSGEmptySETemplateURL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"virtualNetworkName": {
"value": "[variables('vnetName')]"
},
"subnetName": {
"value": "AKS-SN"
},
"addressPrefix": {
"value": "[reference('getAKSAddressPrefix').outputs.addressPrefix.value]"
},
"nsgName": {
"value": "AKS-NSG"
},
"privateEndpointNetworkPolicies": {
"value": false
}
}
}

NSG-EMPTY-ExistingSubnet with Service EndpointTemplate

This template will deploy an empty NSG and attach it to an exising Subnet

Typical Nested Template used before

VNet

Typical Nested Template used after

WindowsVirtualMachine
LinuxVirtualMachine
APIM
AppGW
AzureRedisCache
PrivateAKSMICluster
PrivateEndpoint

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
virtualNetworkNameName of the existing Virtual NetworkpocVNET
subnetNameName of the subnet in the existing VNet to attach the NSG tosubnetA
addressPrefixThe IP range of the subnet attaching the NSG to10.0.1.0/24
nsgNameName of the NSGsubnetA-NSG
privateEndpointNetworkPoliciesBoolean on if private endpoint network policies are enabledfalse
serviceEndpointsArray of the service endpoints to enable["Microsoft.Sql"]

Output

na

Sample Deployment

 {
"name": "deployAKSNSG",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2018-05-01",
"resourceGroup": "[parameters('resourceGroup')]",
"dependsOn": [
"getAKSAddressPrefix"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('deployNSGEmptySETemplateURL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"virtualNetworkName": {
"value": "[variables('vnetName')]"
},
"subnetName": {
"value": "AKS-SN"
},
"addressPrefix": {
"value": "[reference('getAKSAddressPrefix').outputs.addressPrefix.value]"
},
"nsgName": {
"value": "AKS-NSG"
},
"privateEndpointNetworkPolicies": {
"value": false
},
"serviceEndpoints": {
"value": [
"Microsoft.Sql"
]
}
}
}

NSG-ExistingSubnet Template

This template will deploy an NSG and attach it to an exising Subnet. You pass in the NSG rules for the NSG using an array.

Typical Nested Template used before

VNet

Typical Nested Template used after

WindowsVirtualMachine
LinuxVirtualMachine
APIM
AppGW
AzureRedisCache
PrivateAKSMICluster
PrivateEndpoint

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
virtualNetworkNameName of the existing Virtual NetworkpocVNET
subnetNameName of the subnet in the existing VNet to attach the NSG tosubnetA
addressPrefixThe IP range of the subnet attaching the NSG to10.0.1.0/24
nsgNameName of the NSGsubnetA-NSG
securityRulesArray of security rules with a | deleminatorRuleName|Description|Protocol|Source Port Range|Destination Port Range|Source Address Prefix|Destination Address Prefix|Access|Priority|Direction
privateEndpointNetworkPoliciesBoolean on if private endpoint network policies are enabledfalse

Output

na

Sample Deployment

{
"name": "deployAKSNSG",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2017-05-10",
"dependsOn": [
"deployVNET"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('deployNSGTemplateURL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"virtualNetworkName": {
"value": "pocVNET"
},
"subnetName": {
"value": "subnetB"
},
"addressPrefix": {
"value": "[reference(resourceId(resourceGroup().name, 'Microsoft.Network/virtualNetworks/subnets', 'pocVNEt', 'subnetB'), '2018-03-01').addressPrefix]"
},
"nsgName": {
"value": "subnetB-NSG"
},
"securityRules": {
"value": [
"deny-all|Deny-All-Traffic|Tcp|*|*|*|*|Deny|500|Inbound",
"allow-443|Allow-SSL|Tcp|*|443|*|*|Allow|100|Inbound",
"allow-8080|Allow-SSL|Tcp|*|8080|*|*|Allow|110|Inbound",
"allow-HealthProbe|Allow-AppGWHealth|Tcp|*|65200-65535|*|*|Allow|120|Inbound"
]
},
"privateEndpointNetworkPolicies": {
"value": false
}
}
}
}

NSG-ExistingSubnet with Service Endpoints Template

This template will deploy an NSG and attach it to an exising Subnet. You pass in the NSG rules for the NSG using an array.

Typical Nested Template used before

VNet

Typical Nested Template used after

WindowsVirtualMachine
LinuxVirtualMachine
APIM
AppGW
AzureRedisCache
PrivateAKSMICluster
PrivateEndpoint

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
virtualNetworkNameName of the existing Virtual NetworkpocVNET
subnetNameName of the subnet in the existing VNet to attach the NSG tosubnetA
addressPrefixThe IP range of the subnet attaching the NSG to10.0.1.0/24
nsgNameName of the NSGsubnetA-NSG
securityRulesArray of security rules with a | deleminatorRuleName|Description|Protocol|Source Port Range|Destination Port Range|Source Address Prefix|Destination Address Prefix|Access|Priority|Direction
privateEndpointNetworkPoliciesBoolean on if private endpoint network policies are enabledfalse
serviceEndpointsArray of the service endpoints to enable["Microsoft.Sql"]

Output

na

Sample Deployment

{
"name": "deployAKSNSG",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2017-05-10",
"dependsOn": [
"deployVNET"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('deployNSGTemplateURL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"virtualNetworkName": {
"value": "pocVNET"
},
"subnetName": {
"value": "subnetB"
},
"addressPrefix": {
"value": "[reference(resourceId(resourceGroup().name, 'Microsoft.Network/virtualNetworks/subnets', 'pocVNEt', 'subnetB'), '2018-03-01').addressPrefix]"
},
"nsgName": {
"value": "subnetB-NSG"
},
"securityRules": {
"value": [
"deny-all|Deny-All-Traffic|Tcp|*|*|*|*|Deny|500|Inbound",
"allow-443|Allow-SSL|Tcp|*|443|*|*|Allow|100|Inbound",
"allow-8080|Allow-SSL|Tcp|*|8080|*|*|Allow|110|Inbound",
"allow-HealthProbe|Allow-AppGWHealth|Tcp|*|65200-65535|*|*|Allow|120|Inbound"
]
},
"privateEndpointNetworkPolicies": {
"value": false
},
"serviceEndpoints": {
"value": [
"Microsoft.Sql"
]
}
}
}
}

Public IP Address Template

This template will deploy standard sku Public IP Address

Typical Nested Template used before

NA

Typical Nested Template used after

WindowsVirtualMachine
LinuxVirtualMachine
AppGW

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
publicIpAddressNameName of the public IPpoc-pip
skuSKU for the Public IP. Either basic or standardStandard
allocationMethodStatic or Dynamic allocation of IPStatic

Output

"publicIPID": The resource id of the public ip created

Sample Deployment

{
"name": "deployPublicIP1",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2017-05-10",
"dependsOn": [],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('deployPublicIPTemplateURL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"publicIpAddressName": {
"value": "pocpip"
},
"sku": {
"value": "Standard"
},
"allocationMethod": {
"value": "Static"
}
}
}
}

Get Network Interface IP Template

This template will return the first IP address assigned to a Azure Network Interface. This can be used to get an IP so you can add it to a Private DNS Zone

Typical Neted Template used before

PrivateEndpoint
WindowsVirtualMachine
LinuxVirtualMachine

Typical Nested Template used after

PrivateDNSARecord

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
nicIDResourceId for the network interface[reference('deploySqlServerPE').outputs.nicID.value]

Output

"nicIP": IP Address of the NIC

Sample Deployment

{
"name": "getSqlServerNICIP",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2017-05-10",
"dependsOn": [
"deploySqlServerPE"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('getNICIPUrL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"nicID": {
"value": "[reference('deploySqlServerPE').outputs.nicID.value]"
}
}
}
}

Private Endpoint

This template will create a Private Endpoint for any PaaS Service that has this functionality

Typical Neted Template used before

Any PaaS Service that can utilize a Private Endpoint

Typical Nested Template used after

PrivateDNSZone

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
peNamePrivate Endpoint resource namepoc-sql-ep
resourceIDResourceId for the network interface[reference('deploySqlDb').outputs.sqlServerId.value]
vnetIDResourceId for the Virtual Network the Private Endpoint wil sit on[reference('deployVNET').outputs.vnetId.value]
subnetNameName of the subnet to palce the private endpoint onPrivateEP-SN
groupIDThe ID(s) of the group(s) obtained from the remote resource that this private endpoint should connect to. - stringSqlServer

Output

"nicID": Resource ID of the virtual nic created by the Private Endpoint

Sample Deployment

{
"name": "deploySqlServerPE",
"comments":"",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2017-05-10",
"dependsOn": [
"deploySqlDb",
"deployVNET"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('deployPrivateEndpointURL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"peName": {
"value": "[concat(parameters('sqlServerName'),'_pe')]"
},
"resourceID": {
"value": "[reference('deploySqlDb').outputs.sqlServerId.value]"
},
"vnetID": {
"value": "[reference('deployVNET').outputs.vnetId.value]"
},
"subnetName": {
"value": "PrivateEP-SN"
},
"groupID": {
"value": "SqlServer"
}
}
}
} 

Private DNS Zone

This template will create a Private DNS Zone and attach it to a VNet. This is often used to resolve Private Endpoints within Azure.

Typical Neted Template used before

PrivateEndpoint

Typical Nested Template used after

PrivateDNSARecord

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
zoneNameThe DNS zone nameprivatelink.database.windows.net
vnetIDResourceId for the Virtual Network Private DNS Zone will attach to[reference('deployVNET').outputs.vnetId.value]

Output

na

Sample Deployment

{
"name": "deploySqlDbDNSZone",
"comments":"",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2017-05-10",
"dependsOn": [
"getSqlServerNICIP"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('deployDNSZoneTemplateURL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"zone_name": {
"value": "privatelink.database.windows.net"
},
"vnet_id": {
"value": "[reference('deployVNET').outputs.vnetID.value]"
}
}
}
}

Private DNS A Record

This template will create an A Record in an Azure Private DNS Zone

Typical Neted Template used before

PrivateDNSZone GetNicIP

Typical Nested Template used after

NA

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
zoneNameThe DNS zone nameprivatelink.database.windows.net
recordNameName of the record to be created[parameters('sqlServerName')]
recordValueIP Address to be associated with the A record[reference('getSqlServerNICIP').outputs.nicIP.value]

Output

na

Sample Deployment

{
"name": "createSqlDbARecord",
"comments":"",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2017-05-10",
"dependsOn": [
"getSqlServerNICIP"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('deployDNSARecordTemplateURL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"zoneName": {
"value": "privatelink.database.windows.net"
},
"recordName": {
"value": "[parameters('sqlServerName')]"
},
"recordValue": {
"value": "[reference('getSqlServerNICIP').outputs.nicIP.value]"
}
}
}
}

This template will retrieve the address prefix for a subnet.

Typical Neted Template used before

NSG-Empty-ExistingSubnet
NSG-Empty-ExistingSubnetSE
NSG-ExistingSubnet
NSG-ExistingSubnetSE

Typical Nested Template used after

VNet

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
vnetNameName of the virtual networkpoc-vnet
subnetNameName of the subnet within the virtual networkpoc-subnet

Output

na

Sample Deployment

 {
"name": "getAKSAddressPrefix",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2018-05-01",
"resourceGroup": "[parameters('resourceGroup')]",
"dependsOn": [
"deployAppGWNSG"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('getSubnetAddressPrefixTemplateURL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"vnetName": {
"value": "[variables('vnetName')]"
},
"subnetName": {
"value": "AKS-SN"
}
}
}
}

Storage Templates

Storage Account

This template will create a storage account.

Typical Neted Template used before

NA

Typical Nested Template used after

NA

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
saNameThe name of the storage accountpocsa
skuNameName of the record to be created. Allowed values: Standard_LRS,Standard_GRS,Standard_RAGRS,Standard_ZRS,Premium_LRS,Premium_ZRS,Standard_GZRS,Standard_RAGZRSStandard_LRS
skuTierStandard or PremiumStandard

Output

saId: Resource ID of the storage account saConnectionString: Connection string for the storage account

Sample Deployment

{
"name": "createSqlDbARecord",
"comments":"",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2017-05-10",
"dependsOn": [
"getSqlServerNICIP"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('deployDNSARecordTemplateURL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"zoneName": {
"value": "privatelink.database.windows.net"
},
"recordName": {
"value": "[parameters('sqlServerName')]"
},
"recordValue": {
"value": "[reference('getSqlServerNICIP').outputs.nicIP.value]"
}
}
}
}

Managed Identity Template

User Assigned Managed Identity Template

This template will create a User Assigned Managed Identity.

Typical Nested Template used before

NA

Typical Nested Template used after

AppGWHTTPSListenerKV
WindowsVirtualMachine
LinuxVirtualMachine

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
identityNameName of the identity to be createdpocGW-Identity

Output

"principalId": The principal ID of the Managed Identity that was created
"resourceId": The resource id of the Managed Identity that was created

Sample Deployment

{
"name": "createManagedIdentity",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2017-05-10",
"resourceGroup": "[parameters('resourceGroup')]",
"dependsOn": [
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('createManagedIdentityTemplateURL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"identityName": {
"value": "[concat(parameters('applicationGatewayName'),'-identity')]"
}
}
}
} 

Monitoring Template

Application Insights Template

This template will create an Application Insights.

Typical Nested Template used before

NA

Typical Nested Template used after

APIM

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
nameApplication Insights instance namepoc-appinsights

Output

"appInsightsID": The resource id of the Application Insights instance that was created

Sample Deployment

{
"name": "deployAppInsights",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2017-05-10",
"dependsOn": [
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('deployAppInsightsTemplateURL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"name": {
"value": "[parameters('appInsightsName')]"
}
}
}
} 

Log Analytics Workspace Template

This template will create a Log Analytics Workspace.

Typical Nested Template used before

NA

Typical Nested Template used after

VMInsights
DiagnosticSettings

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
workspaceNameLog Analytics workspace namepoc-laworkspace

Output

"workspaceId": The resource id of the Log Analytics Workspace that was created
"workspaceKey": The primary key for the workspace "customerId": The customer id for the workspace

Sample Deployment

{
"name": "deployLAWorkspace",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2017-05-10",
"dependsOn": [
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('deployLogAnalyticsURL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"workspaceName": {
"value": "[parameters('workspaceName')]"
}
}
}
}

Enabled VM Insights on an Existing VM Template

This template will enable VM Insights (Azure Monitor for VMs) to an existing VM

Typical Neted Template used before

Log_Analytics_Workspace
WindowsVirtualMachine
LinuxVirtualMachine

Typical Nested Template used after

NA

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
vmResourceIdResourceId for the VM to be monitored[reference('deployJumpBox').outputs.vmID.value]
osTypeLinux or WindowsWindows
workspaceResourceIdResource ID of the log analytics workspace to use[reference('deployLAWorkspace').outputs.workspaceId.value]

Output

NA

Sample Deployment

{
"name": "addJumpBoxInsights",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2017-05-10",
"dependsOn": [
"deployJumpBox"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('addVMInsightsURL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"VmResourceId": {
"value": "[reference('deployJumpBox').outputs.vmID.value]"
},
"osType": {
"value": "Windows"
},
"WorkspaceResourceId": {
"value": "[reference('deployLAWorkspace').outputs.workspaceId.value]"
}
}
}
}

Enabled APIM Diagnostic Template

This template will enable all diagnostic settings on a APIM resource to be sent to Log Aanalytic

Typical Neted Template used before

Log_Analytics_Workspace
APIM

Typical Nested Template used after

NA

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
workspaceIdResourceId for thelog analytics workspace to use[reference('deployLAWorkspace').outputs.workspaceId.value]
logsArray of logs to collect from diagnostic settings["GatewayLogs"]
metricsArra of metrics to collect from diagnostic settings["Capacity"]
apimNameName of the APIM resourcepoc-apim

Output

NA

Sample Deployment

NA

Enabled AppGW Diagnostic Template

This template will enable all diagnostic settings on a APIM resource to be sent to Log Aanalytic

Typical Neted Template used before

Log_Analytics_Workspace
AppGWHTTPListener
AppGWHTTPSListener

Typical Nested Template used after

NA

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
workspaceIdResourceId for thelog analytics workspace to use[reference('deployLAWorkspace').outputs.workspaceId.value]
logsArray of logs to collect from diagnostic settings["ApplicationGatewayAccessLog","ApplicationGatewayPerformanceLog","ApplicationGatewayFirewallLog"]
metricsArra of metrics to collect from diagnostic settings["AllMetrics"]
appgwNameName of the APIM resourcepoc-apim

Output

NA

Sample Deployment

 {
"name": "deployAppGWDiagnostics",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2018-05-01",
"resourceGroup": "[parameters('resourceGroup')]",
"dependsOn": [
"deployAppGW",
"deployLogAnalytics"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('deployAppGWDiagnosticsTemplateURL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"workspaceId": {
"value": "[reference('deployLogAnalytics').outputs.workspaceId.value]"
},
"logs": {
"value": [
"ApplicationGatewayAccessLog",
"ApplicationGatewayPerformanceLog",
"ApplicationGatewayFirewallLog"
]
},
"metrics": {
"value": [
"AllMetrics"
]
},
"appgwName": {
"value": "[variables('applicationGatewayName')]"
}
}
} }

Enabled Azure SQL DB Diagnostic Template

This template will enable diagnostic settings on a Bastion resource to be sent to Log Aanalytic

Typical Neted Template used before

Log_Analytics_Workspace
AzureBastion

Typical Nested Template used after

NA

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
workspaceIdResourceId for thelog analytics workspace to use[reference('deployLAWorkspace').outputs.workspaceId.value]
logsArray of logs to collect from diagnostic settings["BastionAuditLogs"]
bastionNameName of the Bastion resourcepoc-bastion

Output

NA

Sample Deployment

 {
"name": "deployAzureBastionDiagnostics",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2018-05-01",
"resourceGroup": "[parameters('resourceGroup')]",
"dependsOn": [
"deployAzureBastion",
"deployLogAnalytics"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('deployAzureBastionDiagnosticsTemplateURL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"workspaceId": {
"value": "[reference('deployLogAnalytics').outputs.workspaceId.value]"
},
"logs": {
"value": [
"BastionAuditLogs"
]
},
"bastionName": {
"value": "[variables('bastionHostName')]"
}
}
} }

Enabled AppGW Diagnostic Template

This template will enable diagnostic settings on an Azure SQL DB resource to be sent to Log Aanalytic

Typical Neted Template used before

NA

Typical Nested Template used after

Log_Analytics_Workspace
SQLDB

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
workspaceIdResourceId for thelog analytics workspace to use[reference('deployLAWorkspace').outputs.workspaceId.value]
logsArray of logs to collect from diagnostic settings["AutomaticTuning","Errors","Timeouts","Deadlocks"]
metricsArray of metrics to collect from diagnostic settings["Basic","InstanceAndAppAdvanced","WorkloadManagement"]
sqldbNameName of the Azure SQL DB resourcepoc-database

Output

NA

Sample Deployment

 {
"name": "deploySQLDBDiagnostics",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2018-05-01",
"resourceGroup": "[parameters('resourceGroup')]",
"dependsOn": [
"deploySqlDb",
"deployLogAnalytics"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('deploySQLDBDiagnosticsTemplateURL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"workspaceId": {
"value": "[reference('deployLogAnalytics').outputs.workspaceId.value]"
},
"logs": {
"value": [
"AutomaticTuning",
"QueryStoreRuntimeStatistics",
"QueryStoreWaitStatistics",
"Errors",
"DatabaseWaitStatistics",
"Timeouts",
"Blocks",
"Deadlocks"
]
},
"metrics": {
"value": [
"Basic",
"InstanceAndAppAdvanced",
"WorkloadManagement"
]
},
"sqldbName": {
"value": "[concat(variables('sqlServerName'),'/',variables('sqlDatabaseName'))]"
}
}
} }

Security Template

Key Vault Template

This template will deploy an Azure Key Vault

Typical Nested Template used before

NA

Typical Nested Template used after

KeyVaultAccessPolicy
KeyVaultSecrets

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
vaultNameKey Vault namepoc-keyvault

Output

"vaultId": The resource id of the Key Vault that was created

Sample Deployment

{
"name": "deployKeyVault",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2017-05-10",
"dependsOn": [
"deployLAWorkspace"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('deployKeyVaultURL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"vaultName": {
"value": "[parameters('vaultName')]"
},
"workspaceID": {
"value": "[reference('deployLAWorkspace').outputs.workspaceId.value]"
}
}
}
}

Key Vault Secret Template

This template will add a secret to an Azure Key Vault

Typical Nested Template used before

KeyVault

Typical Nested Template used after

NA

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
vaultNameKey Vault namepoc-keyvault
secretNameSecret name to add to Key Vaultsupersecret
contentTypeType of data being added to secrettext/plain
valueValue of the secret being addedsupersecretvalue

Output

NA

Sample Deployment

{
"name": "addKeyVaultSecret",
"type": "Microsoft.Resources/deployments",
"resourceGroup": "[parameters('keyVaultResourceGroup')]",
"apiVersion": "2017-05-10",
"dependsOn": [
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('addKeyVaultSecretTemplate')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"keyVaultName": {
"value": "[parameters('keyVaultName')]"
},
"secretName": {
"value": "[parameters('keyVaultSecretName')]"
},
"contentType": {
"value": "[parameters('keyVaultContentType')]"
},
"value": {
"value": "[parameters('keyVaultSecretValue')]"
}
}
}
}

Key Vault Access Policy Template

This template will create an acces policy to secrets in an existing Key Vault. It is currently limited to grating rights to secrets.

RBAC Role Assignment

This template will assign a RBAC Role to a principal id

Typical Neted Template used before

NA

Typical Nested Template used after

NA

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
roleAssignmentNameName of the role assignmentAKS Custom Admin
roleDefinitionIdRole ID that you are assigning"4d97b98b-1d4f-4787-a291-c67834d212e7"
principalIdPrincipal ID that will be assigned the role"[reference('deployAKSCluster').outputs.aksPrincipalId.value"
scopeScope of the role assignment"[concat(subscription().id,'/resourceGroups/',parameters('resourceGroup'))]"

Output

na

Sample Deployment

 {
"name": "grantAKSMINetworkRole",
"comments":"",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2018-05-01",
"resourceGroup": "[parameters('resourceGroup')]",
"dependsOn": [
"deployAKSCluster"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('grantRBACTemplateURL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"roleAssignmentName": {
"value": "[parameters('aksNetworkGuid')]"
},
"roleDefinitionId": {
"value": "4d97b98b-1d4f-4787-a291-c67834d212e7"
},
"principalId": {
"value": "[reference('deployAKSCluster').outputs.aksPrincipalId.value]"
},
"scope": {
"value": "[concat(subscription().id,'/resourceGroups/',parameters('resourceGroup'))]"
}
}
}
}

<a name=IaaSTemplates">IaaS Templates

Ubuntu Virtual Machine

This template will create a Ubuntu Virtual Machine.

Typical Neted Template used before

VNet

Typical Nested Template used after

EnableVMInsights

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
subnetNameSubnet name where the nic will be placedshared-SN
virtualNetworkIdVNet ID where the nic will be placed[reference('deployVNet').outputs.vnetID.value]
virtualMachineNameName of the Virtual MachinepocVM
ubuntuOSVersionAllowd values: 18.04-LTS, 16.04-LTS, 14.04.4-LTS18.04-LTS
adminUsernameAdministrator usernameLinuxAdmin
adminPasswordAdministrator passwordABCabc1234
zoneAvailability zone to place the VM1

Output

"vmID": Resource id of the virtual machine created
"nicID": Resource id of the nic created

Sample Deployment

{
"name": "deployUbuntuBox",
"comments":"NOTE: OS and Datadisks cannot be tagged when provisioned within VM. Would need to provision DISK with tags first, then reference",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2017-05-10",
"dependsOn": [
"deployVNET"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('deployUbuntuServerTemplateURL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"subnetID": {
"value": "[reference('deployVNET').outputs.sharedSubnetID.value]"
},
"virtualMachineName": {
"value": "[parameters('ubuntuName')]"
},
"virtualMachineSize": {
"value": "[parameters('ubuntuSize')]"
},
"adminUsername": {
"value": "[parameters('adminUserName')]"
},
"adminPassword": {
"value": "[parameters('adminPassword')]"
},
"ubuntuOSVersion": {
"value": "18.04-LTS"
},
"zone": {
"value": "1"
}
}
}
} 

Windows Virtual Machine

This template will create a Windows Virtual Machine.

Typical Neted Template used before

VNet

Typical Nested Template used after

EnableVMInsights

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
subnetIDSubnet ID where the nic will be placed[concat(reference('deployVNET').outputs.vnetId.value,'/subnets/Shared-SN')]
virtualMachineNameName of the Virtual MachinepocVM
virtualMachineSizeAzure VM Size for the VMStandard_DS1_v2
adminUsernameAdministrator usernameWindowsAdmin
adminPasswordAdministrator passwordABCabc1234
skuSku for the virtual machine being deployed2019-Datacenter

Output

"vmID": Resource id of the virtual machine created
"nicID": Resource id of the nic created

Sample Deployment

 {
"name": "deployJumpBox",
"comments":"NOTE: OS and Datadisks cannot be tagged when provisioned within VM. Would need to provision DISK with tags first, then reference",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2018-05-01",
"resourceGroup": "[parameters('resourceGroup')]",
"dependsOn": [
"deployVNET"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('deployWindowsServerTemplateURL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"subnetID": {
"value": "[concat(reference('deployVNET').outputs.vnetId.value,'/subnets/Shared-SN')]"
},
"virtualMachineName": {
"value": "[variables('jumpName')]"
},
"virtualMachineSize": {
"value": "[variables('jumpSize')]"
},
"adminUsername": {
"value": "[parameters('adminUserName')]"
},
"adminPassword": {
"value": "[parameters('adminPassword')]"
},
"sku": {
"value": "[variables('jumpSKU')]"
}
}
}
} 

Azure Bastion Template

This template will deploy an Azure Bastion to an existing VNET

Typical Neted Template used before

Vnet
PublicIPAddress

Typical Nested Template used after

WindowsVirtualMachine
LinuxVirtualMachine

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
bastionHostNameName for the bastion hostpoc-bastionhost
subnetIdSubnetID of the subnet dedicated to Azure Bastion[concat(reference('deployVNET').outputs.vnetId.value,'/subnets/AzureBastionSubnet')]
publicIpIdResource ID of the public ip for the bastion host[reference('deployPublicIPBastion').outputs.publicIPID.value]

Output

NA

Sample Deployment

{
"name": "deployPublicIPBastion",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2017-05-10",
"resourceGroup": "[parameters('resourceGroup')]",
"dependsOn": [],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('deployPublicIPTemplateURL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"publicIpAddressName": {
"value": "[concat(parameters('bastionHostName'),'pip1')]"
},
"sku": {
"value": "Standard"
},
"allocationMethod": {
"value": "Static"
}
}
}
},
{
"name": "deployAzureBastion",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2017-05-10",
"dependsOn": [
"deployVNET"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('deployAzureBastionTemplateURL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"bastionHostName": {
"value": "[parameters('bastionHostName')]"
},
"subnetId": {
"value": "[concat(reference('deployVNET').outputs.vnetId.value,'/subnets/AzureBastionSubnet')]"
},
"publicIpId": {
"value": "[reference('deployPublicIPBastion').outputs.publicIPID.value]"
}
}
}
}

Load Balancer Templates

AppGW with HTTP Listener Template

This template will deploy an Application Gateway with a HTTP Listeners and Basic routing rules. Note this does not deploy path based routing or a private IP listener

Typical Nested Template used before

PublicIPAddress

Typical Nested Template used after

NA

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
applicationGatewayNameName of the Application GatewaypocAppGW
tierStandard, WAF, Standard_v2, WAF_v2WAF_v2
skuSizeName of an application gateway SKU. - Standard_Small, Standard_Medium, Standard_Large, WAF_Medium, WAF_Large, Standard_v2, WAF_v2WAF_v2
minCapacityMin number of AppGW Capacity2
maxCapacityMin number of AppGW Capacity4
zonesThe Availability Zones the AppGW can be scaled to["1","2","3"]
subnetIDResource ID of the subnet the AppGW will sit on"[concat(reference('deployVNET').outputs.vnetId.value,'/subnets/AppGW-SN')]"
publicIpAddressesIdPublic IP for the Frontend. Format: name|publicIP Resource ID[
"[concat('PIP1|',reference('deployPublicIP1').outputs.publicIPID.value )]"
]
frontendPortsPorts that the AppGW will listen on. Format: name|portHTTP80|80
backendAddressesThe backend pools for the AppGW. Format: name|backend IP or URL[
"Example1|example.com",
"Example2|example2.com"
]
backendHttpSettingsThe HTTP Setting for the backend pool. Format: name|port|protocol|cookieBasedAffinity|RequestTimeout|path[
"Example-App-HTTPSetting|80|Http|Disabled|30|/
]
httpListenersThe HTTP Listener Settings for the frontend ip: Format: name|fronte ip config name|frontend port name[
"Example1-App-Listener/
requestRoutingRulesRouting rules for the AppGW. Format: name|httpListener name|backend pool name|backend http setting name[
"Example1-App-RoutingRule|Example1-App-Listener|Example1-BEPool|Example-App-HTTPSetting",
"Example2-App-RoutingRule|Example2-App-Listener|Example2-BEPool|Example-App-HTTPSetting"
]

Output

na

Sample Deployment

{
"name": "deployAppGW",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2017-05-10",
"dependsOn": [
"deployVNET",
"deployPublicIP1"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('deployAppGWHTTPListenerTemplateURL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"applicationGatewayName": {
"value": "[parameters('applicationGatewayName')]"
},
"tier": {
"value": "[parameters('appgwtier')]"
},
"skuSize": {
"value": "[parameters('appgwskuSize')]"
},
"minCapacity": {
"value": "[parameters('appgwMinCapacity')]",
},
"maxCapacity": {
"value": "[parameters('appgwMaxCapacity')]",
},
"zones": {
"value": "[parameters('appgwzones')]"
},
"subnetID": {
"value": "[concat(reference('deployVNET').outputs.vnetId.value,'/subnets/AppGW-SN')]"
},
"publicIpAddressesIds": {
"value": [
"[concat('PIP1|',reference('deployPublicIP1').outputs.publicIPID.value )]"
]
},
"frontendPorts": {
"value": [
"HTTP-80|80",
"HTTP-8080|8080"
]
},
"backendAddresses": {
"value": [
"Example1-BEPool|bing.com",
"Example2-BEPool|microsoft.com"
]
},
"backendHttpSettings": {
"value": [
"Example-App-HTTPSetting|80|Http|Disabled|30|/"
]
},
"httpListeners": {
"value": [
"Example1-App-Listener|PIP1|HTTP-80",
"Example2-App-Listener|PIP1|HTTP-8080"
]
},
"requestRoutingRules": {
"value": [
"Example1-App-RoutingRule|Example1-App-Listener|Example1-BEPool|Example-App-HTTPSetting",
"Example2-App-RoutingRule|Example2-App-Listener|Example2-BEPool|Example-App-HTTPSetting"
]
}
}
}
}

AppGW with HTTPS Listener Template and Key Vault Integration

This template will deploy an Application Gateway with a HTTPS Listeners and Basic routing rules. This will pull the template from an existing key vault with the certificate uploaded. The template make the following assumptions:

  1. There will be a different certificate for each HTTP Listener
  2. There will be only a single certificate for each HTTP Listener
  3. The order of the certificate parameter will match the order you want them applied ot the HTTP Listeners

Typical Nested Template used before

PublicIPAddress
ManagedIdentity

Typical Nested Template used after

NA

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
applicationGatewayNameName of the Application GatewaypocAppGW
tierStandard, WAF, Standard_v2, WAF_v2WAF_v2
skuSizeName of an application gateway SKU. - Standard_Small, Standard_Medium, Standard_Large, WAF_Medium, WAF_Large, Standard_v2, WAF_v2WAF_v2
minCapacityMin number of AppGW Capacity2
maxCapacityMin number of AppGW Capacity4
zonesThe Availability Zones the AppGW can be scaled to["1","2","3"]
subnetIDResource ID of the subnet the AppGW will sit on"[concat(reference('deployVNET').outputs.vnetId.value,'/subnets/AppGW-SN')]"
keyVaultNameThe name of the Key Vault that contains the SSL certificatespocKeyVault
identityIDThe user Assigned Managed Identity resource ID that will be attahed to the GW and used to pull the certificatespoc-identity
certificatesReference to the certificates in the Key Vault. Format: Cert Name in AppGW|Path in KeyVault[
"ARMCert|ARM/df47f485ecb1455d98eae9a950af6f47",
"ARM2Cert|ARM2/b5e5e9c31a034bffa8387ef38754333f"
]
publicIpAddressesIdPublic IP for the Frontend. Format: name|publicIP Resource ID[
"[concat('PIP1|',reference('deployPublicIP1').outputs.publicIPID.value )]"
]
frontendPortsPorts that the AppGW will listen on. Format: name|portHTTP80|80
backendAddressesThe backend pools for the AppGW. Format: name|backend IP or URL[
"Example1|example.com",
"Example2|example2.com"
]
backendHttpSettingsThe HTTP Setting for the backend pool. Format: name|port|protocol|cookieBasedAffinity|RequestTimeout|path[
"Example-App-HTTPSetting|80|Http|Disabled|30|/
]
httpListenersThe HTTP Listener Settings for the frontend ip: Format: name|fronte ip config name|frontend port name[
"Example1-App-Listener/
requestRoutingRulesRouting rules for the AppGW. Format: name|httpListener name|backend pool name|backend http setting name[
"Example1-App-RoutingRule|Example1-App-Listener|Example1-BEPool|Example-App-HTTPSetting",
"Example2-App-RoutingRule|Example2-App-Listener|Example2-BEPool|Example-App-HTTPSetting"
]

Output

na

Sample Deployment

{
"name": "deployAppGW",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2017-05-10",
"resourceGroup": "[parameters('resourceGroup')]",
"dependsOn": [
"deployVNET",
"deployPublicIP1"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('deployAppGWHTTPSListenerKVTemplateURL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"applicationGatewayName": {
"value": "[parameters('applicationGatewayName')]"
},
"tier": {
"value": "[parameters('appgwtier')]"
},
"skuSize": {
"value": "[parameters('appgwskuSize')]"
},
"minCapacity": {
"value": "[parameters('appgwMinCapacity')]",
},
"maxCapacity": {
"value": "[parameters('appgwMaxCapacity')]",
},
"zones": {
"value": "[parameters('appgwzones')]"
},
"subnetID": {
"value": "[concat(reference('deployVNET').outputs.vnetId.value,'/subnets/AppGW-SN')]"
},
"publicIpAddressesIds": {
"value": [
"[concat('PIP1|',reference('deployPublicIP1').outputs.publicIPID.value )]"
]
},
"keyVaultName": {
"value": "[parameters('keyVaultName')]"
},
"identityID": {
"value": "[reference('createManagedIdentity').outputs.resourceId.value]"
},
"certificates": {
"value": "[parameters('certificates')]"
},
"frontendPorts": {
"value": [
"HTTPS-443|443",
"HTTPS-8080|8080"
]
},
"backendAddresses": {
"value": [
"Example1-BEPool|bing.com",
"Example2-BEPool|microsoft.com"
]
},
"backendHttpSettings": {
"value": [
"Example-App-HTTPSetting|80|Http|Disabled|30|/"
]
},
"httpListeners": {
"value": [
"Example1-App-Listener|PIP1|HTTPS-443",
"Example2-App-Listener|PIP1|HTTPS-8080"
]
},
"requestRoutingRules": {
"value": [
"Example1-App-RoutingRule|Example1-App-Listener|Example1-BEPool|Example-App-HTTPSetting",
"Example2-App-RoutingRule|Example2-App-Listener|Example2-BEPool|Example-App-HTTPSetting"
]
}
}
}
}

Typical Nested Template used before

KeyVault
UserAssignedManagedIdentity

Typical Nested Template used after

AppGWHTTPSListenerKV

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
keyVaultNameName of the Key Vault to add the access politypoc-keyvault
secretsThis is an array of the rights given to access secrets[ "get", "list", "set" ]
objectIdThis object id you want the rights granted to"[reference('createManagedIdentity').outputs.principalId.value]"

Output

NA

Sample Deployment

{
"name": "deployKeyVaultAccess",
"type": "Microsoft.Resources/deployments",
"resourceGroup": "[parameters('keyVaultResourceGroup')]",
"apiVersion": "2017-05-10",
"dependsOn": [
"createManagedIdentity"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('deployKeyVaultAccessTemplate')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"keyVaultName": {
"value": "[parameters('keyVaultName')]"
},
"secrets": {
"value": [
"Get",
"List",
"Set",
"Delete",
"Recover",
"Backup",
"Restore"
]
},
"objectId": {
"value": "[reference('createManagedIdentity').outputs.principalId.value]"
}
}
}
}

<a name"ContainerTemplates">Container Templates

Private AKS Cluster

This template will AKS cluster with Linux nodes.

Typical Neted Template used before

VNet

Typical Nested Template used after

NA

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
aksResourceNameThe name of the Managed Cluster resource.pocAKSCluster
nodeResourceGroupThe name of AKS node resource group.pocNodeRG
vnetNameName of the vnet the AKS Nodes will livepocVnet
subnetNameNameof the subnet the AKS Nodes will liveAKS-SN
dnsPrefixOptional DNS prefix to use with hosted Kubernetes API server FQDN.
vmSizeSize of the nodes to be deployedStandard_DS2_v2
osDiskSizeGBSize of the OS disk. Allowed values between 0-10231023
kubernetesVersionThe version of Kubernetes.1.7.7
networkPluginNetwork plugin used for building Kubernetes network. Allowed values: azure or kubenetazure
numNodesNumber of nodes to run in the cluster3
enableRBACBoolean flag to turn on and off of RBAC.true
enablePrivateClusterEnable private network access to the Kubernetes cluster.true
enableHttpApplicationRoutingBoolean flag to turn on and off http application routing.false
networkPolicyNetwork policy used for building Kubernetes network.calico
vnetSubnetIDResource ID of the subnet where the nodes will exists[reference('deployVNET').outputs.aksSubnetID.value]
serviceCidrA CIDR notation IP range from which to assign service cluster IPs.10.0.0.0/24
dnsServiceIPContainers DNS server IP address.10.0.0.10
dockerBridgeCidrA CIDR notation IP for Docker bridge.172.17.0.1/24

Output

"controlPlaneFQDN": The FQDN for the AKS Control Plane
"aksID": The resource id for the AKS Cluster

Sample Deployment

{
"name": "deployPrivateAKSCluster",
"comments":"apiVersion is flagged, but haven't changed as not sure if this is needed for some features.",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2019-10-01",
"dependsOn": [
"deployVNET"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('deployAzureAKSTemplateURL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"aksResourceName": {
"value": "[parameters('aksResourceName')]"
},
"nodeResourceGroup":{
"value": "[parameters('nodeResourceGroup')]"
},
"vnetName" : {
"value": "[parameters('vnetName')]"
},
"subnetName" : {
"value": "AKS-SN"
}, "dnsPrefix": {
"value": "[parameters('dnsPrefix')]"
},
"kubernetesVersion": {
"value": "[parameters('kubernetesVersion')]"
},
"networkPlugin": {
"value": "[parameters('networkPlugin')]"
},
"enableRBAC": {
"value": "[parameters('enableRBAC')]"
},
"vmssNodePool": {
"value": "[parameters('vmssNodePool')]"
},
"enablePrivateCluster": {
"value": "[parameters('enablePrivateCluster')]"
},
"enableHttpApplicationRouting": {
"value": "[parameters('enableHttpApplicationRouting')]"
},
"networkPolicy": {
"value": "[parameters('networkPolicy')]"
},
"vnetSubnetID": {
"value": "[reference('deployVNET').outputs.aksSubnetID.value]"
},
"serviceCidr": {
"value": "[parameters('serviceCidr')]"
},
"dnsServiceIP": {
"value": "[parameters('dnsServiceIP')]"
},
"dockerBridgeCidr": {
"value": "[parameters('dockerBridgeCidr')]"
}
}
}
} 

Azure Container Registry Template

This template will deploy an Azure Container Registry

Typical Nested Template used before

NA

Typical Nested Template used after

PrivateEndpoint
PrivateDNSZone
PrivateDNSARecord
PrivateAKSMICluster

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
acrNameAzure Container Registry namepoc-acr

Output

"acrId": The resource id of the Azure Container Registry created

Sample Deployment

{
"name": "deployACR",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2017-05-10",
"dependsOn": [
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('deployACRURL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"acrName": {
"value": "[parameters('acrName')]"
}
}
}
} 

Web Management

APIM Template

This template will deploy an Azure API Management Instance

Typical Nested Template used before

NA

Typical Nested Template used after

NA

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
apimNameName for the APIM instancepoc-apim
skuAllowed Values: Basic, Consumption, Developer, Standard, PremiumStandard
capacityCapacity of the SKU (number of deployed units of the SKU).2
apimEmailPublisher emailexample@microsoft.com
subnetIDResource ID of the subnet that APIM will sit on[concat(reference('deployVNET').outputs.vnetId.value,'/subnets/APIM-SN')]
publisherNamePublisher NameMicrosoft
virtualNetworkTypeAllowed Values: Internal, ExternalInternal
disableGatewayBoolean allowing you to diable gatewayfalse

Output

"APIMIP": The resource id of the APIM Instance created

Sample Deployment

{
"name": "deployAPIM",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2017-05-10",
"dependsOn": [
"deployVNET",
"deployAppInsights",
"deployLAWorkspace"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('deployAPIMTemplateURL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"apimname": {
"value": "[parameters('apimName')]"
},
"sku": {
"value": "[parameters('apimsku')]"
},
"capacity": {
"value": "[parameters('apimcapacity')]"
},
"apimEmail": {
"value": "[parameters('apimEmail')]"
},
"subnetID": {
"value": "[concat(reference('deployVNET').outputs.vnetId.value,'/subnets/APIM-SN')]"
},
"publisherName": {
"value": "[parameters('apimPublisherName')]"
},
"virtualNetworkType": {
"value": "[parameters('apimVirtualNetworkType')]"
},
"disableGateway": {
"value": "[parameters('apimDisableGateway')]"
}
}
}
}

Azure Redis Cache VNet Integrated Template

This template will deploy a premium version of Azure Redis Cache injected on a VNet

Typical Nested Templates used before

Vnet

Typical Nested Templates used after

NA

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
cahceNameName for the Azure Redis Cachepoc-azurecache
capacityThe size of the Redis cache to deploy2
subnetIdResource ID of the subnet it will reside on[concat(reference('deployVNET').outputs.vnetId.value,'/subnets/AzureBastionSubnet')]
saConnectionStringStorage Account Connection String[reference('deployStorage').outputs.saConnectionString.value]
ipAddressIP Address to be assigned to cache10.10.10.10
backupEnabledBoolean either enabling or disabling backuptrue
backupFrequencyHow often to run a backup90
maxSnapshotsMaximum number of snaphots allowed10

Output

NA

Sample Deployment

{
"name": "deployAzureCacheVault",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2017-05-10",
"dependsOn": [
"deployLAWorkspace",
"deployVNET"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('deployAzureCacheBusURL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"cacheName": {
"value": "[parameters('cacheName')]"
},
"subnetId": {
"value": "[concat(reference('deployVNET').outputs.vnetId.value,'/subnets/privateep-SN')]"
},
"saConnectionString": {
"value": "[reference('deployPrivateStorage').outputs.saConnectionString.value]"
},
"ipAddress": {
"value": "192.168.1.180"
},
"bakcupEnabled": {
"value": true
},
"backupFrequency": {
"value": 90
},
"maxSnaphots": {
"value": 10
}
}
}
} 

Data Templates

Azure SQL Database

This template will deploy an Azure SQL Database

Typical Nested Templates used before

NA

Typical Nested Templates used after

PrivateEndpoint

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
administratorLoginAdmin Login for the SQL Serversqladmin
administratorLoginPasswordAdmin password for the SQL ServerSecretPassword01
serverNameSQL Server Name to host the Azure SQL DBpocSQLServer
publicNetworkAccessBoolean value on if public network access is allowed to the SQL Serverfalse
useVAManagedIdentityBoolean value on weather to create a System Managed Identitytrue
allowAzureIpsBoolean value on if Azure IPs are allowed through firewalltrue
collationThe collation of the database.SQL_Latin1_General_CP1_CI_AS
databaseNameName of the Azure DB to be createdpocDB
tierThe tier or edition of the particular SKU, e.g. Basic, Premium.GeneralPurpose
skuNameThe name of the SKU, typically, a letter + Number code, e.g. P3.GP_S_Gen5_24
maxSizeBytesThe max size of the database expressed in bytes.1024
sampleNameThe name of the sample schema to apply when creating this database. - AdventureWorksLT, WideWorldImportersStd, WideWorldImportersFullWideWorldImportersFull
zoneRedundantWhether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zonestrue
licenseTypeThe license type to apply for this database. - LicenseIncluded or BasePriceLicenseIncluded
readScaleOutf enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica. This property is only settable for Premium and Business Critical databases. - Enabled or DisabledDisabled
numberOfReplicasThe number of readonly secondary replicas associated with the database to which readonly application intent connections may be routed. This property is only settable for Hyperscale edition databases.0
minCapacityMinimal capacity that database will always have allocated, if not paused2
autoPauseDelayTime in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled-1

Output

sqlServerId: Resource ID of the SQL Server created

Sample Deployment

 {
"name": "deploySqlDb",
"comments":"",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2018-05-01",
"resourceGroup": "[parameters('resourceGroup')]",
"dependsOn": [
"[parameters('resourceGroup')]"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('deployAzureSqlDbURL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"collation": {
"value": "SQL_Latin1_General_CP1_CI_AS"
},
"databaseName": {
"value": "[variables('sqlDatabaseName')]"
},
"tier": {
"value": "GeneralPurpose"
},
"skuName": {
"value": "GP_S_Gen5_24"
},
"maxSizeBytes": {
"value": 1099511627776
},
"sampleName": {
"value": ""
},
"serverName": {
"value": "[variables('sqlServerName')]"
},
"zoneRedundant": {
"value": false
},
"licenseType": {
"value": ""
},
"readScaleOut": {
"value": "Disabled"
},
"numberOfReplicas": {
"value": 0
},
"minCapacity": {
"value": "3"
},
"autoPauseDelay": {
"value": "180"
},
"useVAManagedIdentity": {
"value": true
},
"administratorLogin": {
"value": "[parameters('adminUsername')]"
},
"administratorLoginPassword": {
"value": "[parameters('adminPassword')]"
},
"publicNetworkAccess": {
"value": "Disabled"
}
}
}
}

Azure SQL Database Allow VNet

This template will allow an Azure Virtual Network access to an Azure SQL DB.

Typical Nested Templates used before

NA

Typical Nested Templates used after

SQLDB

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
serverNameSQL Server namepoc-sqlserver
subnetIDSubnet ID that will be allowed to access the database[concat(reference('deployVNET').outputs.vnetId.value,'/subnets/AKS-SN')]

Output

sqlServerId: Resource ID of the SQL Server created

Sample Deployment

 {
"name": "allowAKSVNet",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2018-05-01",
"resourceGroup": "[parameters('resourceGroup')]",
"dependsOn": [
"deploySqlDb"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('allowSQLVNetTemplateURL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"serverName": {
"value": "[variables('sqlServerName')]"
},
"subnetID": {
"value": "[concat(reference('deployVNET').outputs.vnetId.value,'/subnets/AKS-SN')]"
}
}
} }

Configuration Scripts

DSC AKS-SQL Configuration

This template is an example of deploying a DSC script to a virtual machine. This script configures AKS with a SQL backend.

Typical Nested Templates used before

WindowsVirtualMachine

Typical Nested Templates used after

NA

Utilizing Template

This template requires you to pass in the following parameters:

ParameterDescriptionExample
vmNameVM name were the dsc script will runpoc-jump
configModuleURLURL for the dsc script[variables('jumpConfigModuleURL')]
configFunctionFunction in the script to be executed[variables('jumpConfigFunction')]
lbIPIP address to use in the load balancer in AKS10.10.10.10
acrNameName of the Azure Container registry to store the docker imagespoc-acr
aksNameName of the AKS resource in Azurepoc-aks
gwNameName of the AppGW resource to use as a front end.poc-appgw
rgNameResource group that contains your resourcespocrg
saNameName of a storage account to utilize.poc-sa
aiKeyApplication Insights Instrumentation Key.[reference('deployAppInsights').outputs.aiKey.value]
sqlNameSQL Server name.poc-sql
dbNameDatabase name that is on the sql server.exampledb
sqlAdminAcccount that has SQL admin rightspocAdmin
sqlPwdPassword for the SQL admin accountSecurePassword123
saKeyStorage Account Key for the storage account saName[reference('deploySAAccount').outputs.saKey.value]

Output

NA

Sample Deployment

 {
"name": "configJumpBox",
"comments":"",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2018-05-01",
"resourceGroup": "[parameters('resourceGroup')]",
"dependsOn": [
"deployJumpBox",
"grantMIRole",
"deployAKSCluster"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('addDSCExtension')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"vmName": {
"value": "[variables('jumpName')]"
},
"configModuleURL": {
"value": "[variables('jumpConfigModuleURL')]"
},
"configFunction": {
"value": "[variables('jumpConfigFunction')]"
},
"lbIP": {
"value": "[variables('lbIP')]"
},
"acrName": {
"value": "[variables('acrName')]"
},
"aksName": {
"value": "[variables('AksresourceName')]"
},
"gwName": {
"value": "[variables('applicationGatewayName')]"
},
"rgName": {
"value": "[parameters('resourceGroup')]"
},
"saName": {
"value": "[variables('saName')]"
},
"aiKey": {
"value": "[reference('deployAppInsights').outputs.aiKey.value]"
},
"sqlName": {
"value": "[variables('sqlServerName')]"
},
"dbName": {
"value": "[variables('sqlDatabaseName')]"
},
"sqlAdmin": {
"value": "[parameters('adminUserName')]"
},
"sqlPwd": {
"value": "[parameters('adminPassword')]"
},
"saKey": {
"value": "[reference('deploySAAccount').outputs.saKey.value]"
}
}
}
}

About

No description, website, or topics provided.

Resources

Code of conduct

Security policy

Stars

3 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages