When deploying a F5 Big IQ Virtual Machine (VM) in the Azure Marketplace, it requires you to create two Network Interface Cards (NICs). In this blog, I want to simply go over some lessons learned when adding two NICs to your existing ARM Template. For this use case, the NICs were put into two different existing subnets.

Make sure that you define both existing subnets in the variables part of your template. In my template, I created two different variables. The first variable is “subnetId1” and the other is “subnetId2”. The only difference between these two variables is the existing subnet each one will use. SubnetId1 is using “existingSubnetName1” and subnetId2 is using “existingSubnetName2”.

“subnetId1”: “[resourceId(parameters(‘existingVNETRG’), ‘Microsoft.Network/virtualNetworks/subnets’, parameters(‘existingVNETName’), parameters(‘existingSubnetName1’))]”,

“subnetId2”: “[resourceId(parameters(‘existingVNETRG’), ‘Microsoft.Network/virtualNetworks/subnets’, parameters(‘existingVNETName’), parameters(‘existingSubnetName2’))]”

This brings me to the next lesson learned. Make sure that you include both “SubnetName1” and “SubnetName2” in your template and parameters files. Also, make sure that you define which subnet each NIC will land in, once created.

So my original plan was to make the ‘nicCount’ = 2 and it should create two NICs, right? Yes, however, it will create two NICs, but it will not put the NICs into separate subnets. So, to achieve the goal of putting the NICs into two separate subnets, I created two separate NICs in the Network Interface configuration part of the template. By doing this, I was able to associate each NIC to a different subnet by changing the “id” in the properties for the subnet. Note, the first NIC is created using the variables for ‘subnetId1’ and the second NIC is created using the variables for ‘subnetId2’.

When adding multiple NICs to an existing template, make sure that you add both Network Interfaces to the Network Profile for the NICs. Ensure that  (nic-01) is “primary”: true, and nic-02 is “primary”: false.

Hope this helps!

Lessons Learned: Adding Additional NICs to Existing ARM Template
Tagged on:     

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.