Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/networksecuritygroups", "name": "[concat(variables('nsgnamexscs'))]", "apiversion": "2020-07-01", "location": "[parameters('location')]", "condition": "[equals(length(parameters('subnetid')), 0)]", "properties": {"securityrules": "[variables('selectedsecurityrules')]"}}{"type": "microsoft.network/virtualnetworks", "name": "[variables('vnetname')]", "apiversion": "2018-04-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups/", variables('nsgnamexscs'))]"], "condition": "[equals(length(parameters('subnetid')), 0)]", "properties": {"addressspace": {"addressprefixes": ["10.0.0.0/16"]}, "subnets": [{"name": "[variables('subnetname')]", "properties": {"addressprefix": "10.0.0.0/24", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('nsgnamexscs'))]"}}}]}}{"type": "microsoft.network/publicipaddresses", "name": "[concat(variables('publicipnamexscs'), "-", copyindex())]", "apiversion": "2018-04-01", "condition": "[equals(length(parameters('subnetid')), 0)]", "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('vnetname'))]"], "location": "[parameters('location')]", "copy": {"name": "piploop", "count": "[variables('xscsvmcount')]"}, "properties": {"publicipallocationmethod": "dynamic"}}{"type": "microsoft.network/networkinterfaces", "name": "[concat(variables('nicnamexscs'), "-", copyindex())]", "apiversion": "2017-06-01", "copy": {"name": "nicxscsloop", "count": "[variables('xscsvmcount')]"}, "dependson": ["piploop", "[resourceid('microsoft.network/virtualnetworks/", variables('vnetname'))]", "[resourceid('microsoft.resources/deployments/", variables('nesteddeploymentnamelbxscs'))]"], "location": "[parameters('location')]", "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": "[if(equals(length(parameters(\"subnetid\')), 0), json(concat(\"{"id": "\", resourceid(\"microsoft.network/publicipaddresses\", concat(variables(\"publicipnamexscs\'), \"-\", copyindex())) ,\""}\')), json(\"null\'))]", "subnet": {"id": "[variables('selectedsubnetid')]"}, "loadbalancerbackendaddresspools": "[if(greater(variables('xscsvmcount'), 1), reference(variables('nesteddeploymentnamelbxscs'), "2021-01-01').outputs.nicbackaddresspools.value, json('null'))]"}}]}} 