Skip to content

Conditional deployment of Virtual Network Links does not work #9041

Answered by StefanIvemo
JLunda asked this question in General
Discussion options

You must be logged in to vote

The issue that you are bumping into here is that ARM is validating the name of the resource even though you're doing a conditional deployment.

When blobDnsNameIsNotEmpty returns false the name property for the virtualNetworkLinks resource is '' and this is what ARM is rejecting. You can provide a dummy name in your condition instead of '' as a workaround. But since you are deploying a child resource with segmented names and your condition is to check if a parameter with the DNS Zone name is empty you need to use a dummy name for the first segment as well or we would get an error that the number of segments are incorrect.

Here's an example that would work for you:

// Virtual network of the…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by brwilkinson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #9030 on November 15, 2022 20:55.