Skip to content

parent not working when using module #4119

Answered by brwilkinson
davidjhole asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @davidjhole

This is one of the items that is being worked on, in order to make this scenario easier #2246

To explain the current state... via your example:

Parent is not equivalent to Dependson. There is a separate dependsOn property.

When you use parent it expects a resource type reference. The reference to the Module (which can potentially do/contain anything and multiples of them) does not satisfy that reference (or a VNET).

Some the options are:

  1. Use this '/' notation to pass in the values for the vnet name and the subnet name via the name property. i.e. don't use the parent property since it's not needed here...
resource subnet2 'Microsoft.Network/virtualNetworks/subnets@2021-02-01'

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@davidjhole
Comment options

Answer selected by brwilkinson
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