Establish connection to a VNET via an ExpressRoute circuit
{"apiversion": "2020-07-01", "type": "microsoft.network/networksecuritygroups", "name": "[variables('fensgname')]", "location": "[parameters('location')]", "tags": {"displayname": "frontendnsg"}, "properties": {"securityrules": [{"name": "rdp_rule", "properties": {"description": "allow rdp", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "3389", "sourceaddressprefix": "internet", "destinationaddressprefix": "*", "access": "allow", "priority": 100, "direction": "inbound"}}, {"name": "web_rule", "properties": {"description": "allow web", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "80", "sourceaddressprefix": "internet", "destinationaddressprefix": "*", "access": "allow", "priority": 101, "direction": "inbound"}}]}}{"type": "microsoft.network/networksecuritygroups", "apiversion": "2020-07-01", "name": "[variables('dbnsgname')]", "location": "[parameters('location')]", "tags": {"displayname": "backendnsg"}, "properties": {"securityrules": [{"name": "allow_fe", "properties": {"description": "allow fe subnet", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "1433", "sourceaddressprefix": "10.0.0.0/24", "destinationaddressprefix": "*", "access": "allow", "priority": 100, "direction": "inbound"}}, {"name": "rdp_rule", "properties": {"description": "allow rdp", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "3389", "sourceaddressprefix": "internet", "destinationaddressprefix": "*", "access": "allow", "priority": 110, "direction": "inbound"}}, {"name": "block_fe", "properties": {"description": "block app subnet", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "10.0.0.0/24", "destinationaddressprefix": "*", "access": "deny", "priority": 121, "direction": "inbound"}}, {"name": "block_internet", "properties": {"description": "block internet", "protocol": "*", "sourceportrange": "*", "destinationportrange": "*", "sourceaddressprefix": "*", "destinationaddressprefix": "internet", "access": "deny", "priority": 200, "direction": "outbound"}}]}}{"apiversion": "2020-07-01", "type": "microsoft.network/virtualnetworks", "name": "[variables('virtualnetworkname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networksecuritygroups/", variables('fensgname'))]", "[resourceid('microsoft.network/networksecuritygroups/", variables('dbnsgname'))]"], "tags": {"displayname": "virtualnetwork"}, "properties": {"addressspace": {"addressprefixes": ["[variables('addressprefix')]"]}, "subnets": [{"name": "fesubnetname", "properties": {"addressprefix": "[variables('fesubnetprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('fensgname'))]"}}}, {"name": "dbsubnetname", "properties": {"addressprefix": "[variables('dbsubnetprefix')]", "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('dbnsgname'))]"}}}]}}{"name": "[variables('sqlpublicip')]", "type": "microsoft.network/publicipaddresses", "location": "[parameters('location')]", "apiversion": "2020-07-01", "tags": {"displayname": "sqlpip"}, "properties": {"publicipallocationmethod": "dynamic", "idletimeoutinminutes": 4}}{"name": "[variables('sqlsrvdbnicname')]", "type": "microsoft.network/networkinterfaces", "location": "[parameters('location')]", "apiversion": "2020-07-01", "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]"], "tags": {"displayname": "sqlsrvdbnic"}, "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets",variables('virtualnetworkname'),"dbsubnetname')]"}, "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",concat(parameters('envprefixname'),"sqlpip'))]"}}}]}}{"name": "[variables('websrvpublicip')]", "type": "microsoft.network/publicipaddresses", "location": "[parameters('location')]", "apiversion": "2020-07-01", "tags": {"displayname": "websrvpip for lb"}, "properties": {"publicipallocationmethod": "dynamic", "idletimeoutinminutes": 4, "dnssettings": {"domainnamelabel": "[variables('websrvdnsnameforlbip')]"}}}{"apiversion": "2020-07-01", "name": "[variables('weblbname')]", "type": "microsoft.network/loadbalancers", "location": "[parameters('location')]", "tags": {"displayname": "web lb"}, "dependson": ["[resourceid('microsoft.network/publicipaddresses/", variables('websrvpublicip'))]"], "properties": {"frontendipconfigurations": [{"name": "loadbalancerfrontend", "properties": {"publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", concat(parameters('envprefixname'),"websrvpip'))]"}}}], "backendaddresspools": [{"name": "backendpool1"}], "inboundnatrules": [{"name": "rdp-vm0", "properties": {"frontendipconfiguration": {"id": "[resourceid('microsoft.network/loadbalancers/frontendipconfigurations",variables('weblbname'),"loadbalancerfrontend')]"}, "protocol": "tcp", "frontendport": 50001, "backendport": 3389, "enablefloatingip": false}}, {"name": "rdp-vm1", "properties": {"frontendipconfiguration": {"id": "[resourceid('microsoft.network/loadbalancers/frontendipconfigurations",variables('weblbname'),"loadbalancerfrontend')]"}, "protocol": "tcp", "frontendport": 50002, "backendport": 3389, "enablefloatingip": false}}], "loadbalancingrules": [{"name": "lbrule", "properties": {"frontendipconfiguration": {"id": "[resourceid('microsoft.network/loadbalancers/frontendipconfigurations",variables('weblbname'),"loadbalancerfrontend')]"}, "backendaddresspool": {"id": "[resourceid('microsoft.network/loadbalancers/backendaddresspools",variables('weblbname'),"backendpool1')]"}, "protocol": "tcp", "frontendport": 80, "backendport": 80, "enablefloatingip": false, "idletimeoutinminutes": 5, "probe": {"id": "[resourceid('microsoft.network/loadbalancers/probes",variables('weblbname'),"tcpprobe')]"}}}], "probes": [{"name": "tcpprobe", "properties": {"protocol": "tcp", "port": 80, "intervalinseconds": 5, "numberofprobes": 2}}]}}{"name": "[concat(variables('websrvnicname'), copyindex())]", "type": "microsoft.network/networkinterfaces", "location": "[parameters('location')]", "apiversion": "2020-07-01", "copy": {"name": "nicloop", "count": "[variables('websrvnumbofinstances')]"}, "dependson": ["[resourceid('microsoft.network/virtualnetworks/", variables('virtualnetworkname'))]", "[resourceid('microsoft.network/loadbalancers/", variables('weblbname'))]"], "tags": {"displayname": "websrvnic"}, "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('virtualnetworkname'), "fesubnetname')]"}, "loadbalancerbackendaddresspools": [{"id": "[resourceid('microsoft.network/loadbalancers/backendaddresspools",variables('weblbname'),"backendpool1')]"}], "loadbalancerinboundnatrules": [{"id": "[resourceid('microsoft.network/loadbalancers/inboundnatrules",variables('weblbname'),concat('rdp-vm",copyindex()))]"}]}}]}} 