Skip to content

Instantly share code, notes, and snippets.

@StefanIvemo
Created March 29, 2022 20:31
Show Gist options
  • Save StefanIvemo/582a147399e776c4d2a7ce84221820e8 to your computer and use it in GitHub Desktop.
Save StefanIvemo/582a147399e776c4d2a7ce84221820e8 to your computer and use it in GitHub Desktop.
bicep-loops-modules
var vnets = [
{
name: 'landingzone-1-vnet'
addressPrefix: '10.1.0.0/24'
}
{
name: 'landingzone-2-vnet'
addressPrefix: '10.2.0.0/24'
}
]
module virtualNetwork 'modules/virtualNetwork.bicep' = [for vnet in vnets: {
name: '${vnet.name}-deploy'
params: {
vnetName: vnet.name
addressPrefix: vnet.addressPrefix
}
}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment