Establish connection to a VNET via an ExpressRoute circuit
{"type": "microsoft.network/networksecuritygroups", "comments": "an nsg to prevent inbound traffic other than ssh, set sourceaddressprefix to restrict access further or block all together (or remove the public ip) and ssh in from another vm", "name": "[variables('nsgname')]", "apiversion": "2020-05-01", "location": "[variables('location')]", "properties": {"securityrules": [{"name": "allow_ssh_in", "properties": {"description": "the only thing allowed is ssh", "protocol": "tcp", "sourceportrange": "*", "destinationportrange": "22", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 100, "direction": "inbound"}}]}}{"type": "microsoft.network/virtualnetworks", "comments": "an example virtual network, for real scenarios add the dns forwarder to your own vnet", "name": "[variables('vnetname')]", "apiversion": "2020-05-01", "location": "[variables('location')]", "properties": {"addressspace": {"addressprefixes": ["[variables('vnetaddressprefix')]"]}, "subnets": [{"name": "[variables('subnet1name')]", "properties": {"addressprefix": "[variables('subnet1prefix')]"}}]}}{"type": "microsoft.network/publicipaddresses", "comments": "a public ip to allow us to ssh into the vm, not recommended for production dns servers", "name": "[variables('pipname')]", "apiversion": "2020-05-01", "location": "[variables('location')]", "properties": {"publicipallocationmethod": "dynamic"}}{"type": "microsoft.network/networkinterfaces", "comments": "a single network interface on each dns server", "name": "[variables('nicname')]", "apiversion": "2020-05-01", "location": "[variables('location')]", "dependson": ["[resourceid('microsoft.network/publicipaddresses/", variables('pipname'))]", "[resourceid('microsoft.network/virtualnetworks/", variables('vnetname'))]", "[resourceid('microsoft.network/networksecuritygroups/", variables('nsgname'))]"], "properties": {"networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('nsgname'))]"}, "ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses",variables('pipname'))]"}, "subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('vnetname'), variables('subnet1name'))]"}}}]}} 