Skip to content

Unable to add multiple addressPrefixes to VNET? #2153

Answered by alex-frankel
niskemp asked this question in Q&A
Discussion options

You must be logged in to vote

Does this work? I think you are currently technically passing the vnet.properties.addressSpaces property an array of arrays, not a single array.

resource vNet1 'Microsoft.Network/virtualNetworks@2020-06-01' = [for vnt in vNet: {
  ...
  properties: {
    addressSpace: {
      addressPrefixes: vnt.addressspace // address space is an array, so can be provided directly, not inside another array
    }
    ...
  }
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by niskemp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants