Establish connection to a VNET via an ExpressRoute circuit

{"type": "microsoft.network/virtualnetworks", "apiversion": "2020-05-01", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('networksettings').virtualnetworkaddressprefix]"]}, "subnets": [{"name": "default", "properties": {"addressprefix": "[variables('networksettings').subnetaddressprefix]"}}]}}{"type": "microsoft.network/networkinterfaces", "name": "[concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ni')]", "apiversion": "2020-05-01", "location": "[parameters('location')]", "copy": {"name": "nicopy", "count": "[add(add(length(variables('vminfo')),length(variables('siteinfo'))),length(variables('clientrole')))]"}, "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]", "[resourceid('microsoft.network/publicipaddresses/", concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ip'))]", "[resourceid('microsoft.network/networksecuritygroups/", concat(tolower(tolower(parameters('prefix'))), "-nsg'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"subnet": {"id": "[variables('networksettings').subnetref]"}, "privateipallocationmethod": "[variables('networksettings').privateipallocationmethod]", "privateipaddress": "[concat(variables('networksettings').virtualmachinesipaddress,add(copyindex(),int('4')))]", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ip'))]"}}}], "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", concat(tolower(parameters('prefix')), "-nsg'))]"}}}{"type": "microsoft.network/publicipaddresses", "apiversion": "2020-05-01", "name": "[concat(tolower(parameters('prefix')),tolower(if(less(copyindex(),length(variables('vminfo'))),variables('vminfo')[variables('vmrole')[copyindex()]].name,if(greaterorequals(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo')))),variables('clientinfo')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))][variables('clientrole')[sub(copyindex(),add(length(variables('vminfo')),length(variables('siteinfo'))))]].name,variables('siteinfo')[variables('siterole')[sub(copyindex(),length(variables('vminfo')))]].name))), "-ip')]", "location": "[parameters('location')]", "copy": {"name": "ipcopy", "count": "[add(add(length(variables('vminfo')),length(variables('siteinfo'))),length(variables('clientrole')))]"}, "properties": {"publicipallocationmethod": "[variables('networksettings').publicipallocationmethod]"}}{"type": "microsoft.network/networksecuritygroups", "apiversion": "2020-05-01", "name": "[concat(tolower(parameters('prefix')), "-nsg')]", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "[variables('securitygrouprulename')]", "properties": "[variables('securitygrouprule')]"}]}}