-
-
Save johnlokerse/05bf029f5c419bd1e80c09142f4ca1e3 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 name string | |
param location string = resourceGroup().location | |
param addressPrefixes array | |
param subnets array | |
var dnsServers = [ | |
'1.2.3.4' | |
] | |
resource virtualNetwork 'Microsoft.Network/virtualNetworks@2019-11-01' = { | |
name: name | |
location: location | |
properties: { | |
dhcpOptions: { | |
dnsServers: dnsServers | |
} | |
addressSpace: { | |
addressPrefixes: addressPrefixes | |
} | |
subnets: [for subnet in subnets: { | |
name: subnet.name | |
properties: { | |
addressPrefix: subnet.addressPrefix | |
} | |
}] | |
} | |
} | |
output virtualNetworkId string = virtualNetwork.id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment