-
Notifications
You must be signed in to change notification settings - Fork 3
/
azure_global_vnet_peering.tf
23 lines (22 loc) · 1.14 KB
/
azure_global_vnet_peering.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# enable global peering between the two virtual network
resource "azurerm_virtual_network_peering" "peering_a" {
name = "peering-connection_a"
resource_group_name = "${azurerm_resource_group.dcos.name}"
virtual_network_name = "${azurerm_virtual_network.vnet.name}"
remote_virtual_network_id = "${azurerm_virtual_network.vnet_remote.id}"
allow_virtual_network_access = true
allow_forwarded_traffic = true
# `allow_gateway_transit` must be set to false for vnet Global Peering
allow_gateway_transit = false
}
# enable global peering between the two virtual network
resource "azurerm_virtual_network_peering" "peering_b" {
name = "peering-connection_b"
resource_group_name = "${azurerm_resource_group.dcos_remote.name}"
virtual_network_name = "${azurerm_virtual_network.vnet_remote.name}"
remote_virtual_network_id = "${azurerm_virtual_network.vnet.id}"
allow_virtual_network_access = true
allow_forwarded_traffic = true
# `allow_gateway_transit` must be set to false for vnet Global Peering
allow_gateway_transit = false
}