Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure ARM template issue

Tags:

azure

I am deploying my infrastructure using an ARM template. I have done this more than once. This time I am getting an error I just cannot figure out.

Unable to evaluate template language function 'resourceId': the type 'Microsoft.Network/virtualNetworks/subnets' requires '2' resource name argument(s). 

So I need the subnet id and I have a well-formed resource id string (I thought)

[resourceId('Microsoft.Network/virtualNetworks/subnets/', 
parameters('virtualNetworks_CloudEngine_RG_vnet_name'), 
parameters('subnets_default_name'))]

Can anyone shed some light on what I have incorrect.

Thanks, Paul

like image 356
Paul Hacker Avatar asked Sep 09 '26 20:09

Paul Hacker


1 Answers

Error is on line 171

"[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('subnets_default_name'))]",

you forgot to input vnet name.

like image 62
4c74356b41 Avatar answered Sep 12 '26 11:09

4c74356b41



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!