-
-
Save johnlokerse/8d6d2d33f52c8afc3e1aaf891f32d2fb to your computer and use it in GitHub Desktop.
Azure Bicep Tips and Tricks Blog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param parName string | |
param parLocation string = resourceGroup().location | |
param parAddressPrefixes array | |
param parSubnets array | |
var varDnsServers = [ | |
'1.2.3.4' | |
] | |
resource resVirtualNetwork 'Microsoft.Network/virtualNetworks@2019-11-01' = { | |
name: parName | |
location: parLocation | |
properties: { | |
dhcpOptions: { | |
dnsServers: varDnsServers | |
} | |
addressSpace: { | |
addressPrefixes: parAddressPrefixes | |
} | |
subnets: [for subnet in parSubnets: { | |
name: subnet.name | |
properties: { | |
addressPrefix: subnet.addressPrefix | |
} | |
}] | |
} | |
} | |
output outVirtualNetworkId string = resVirtualNetwork.id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment