Skip to content

Commit

Permalink
Merge branch 'vnet-peering-cross-sub'
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudlh committed May 5, 2022
2 parents d8fa284 + ae240bb commit c642501
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 27 deletions.
1 change: 1 addition & 0 deletions .github/workflows/standalone-scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@
"networking/virtual_network/100-simple-vnet-subnets-nsgs",
"networking/virtual_network/100-subnet-delegation",
"networking/virtual_network/101-vnet-peering-nsg",
"networking/virtual_network/103-vnet-peering-v1",
"networking/virtual_network/200-nsg-flow-logs",
"networking/virtual_network/201-nsg-flow-logs-v1",
"networking/virtual_subnets/100-simple-subnet-rbac",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,32 +450,62 @@ vnet_peerings_v1 = {

# to peer with a vnet in a different subscription you can reference the id in from or to
# or use vnet_key and lz_key
test_TO_hub_re1 = {
name = "test_TO_hub_re1"
from = {
id = "/subscriptions/xxxxxxxxxxxx/resourceGroups/vnet/providers/Microsoft.Network/virtualNetworks/vnet1"
}
to = {
vnet_key = "hub_re1"
}
allow_virtual_network_access = true
allow_forwarded_traffic = false
allow_gateway_transit = false
use_remote_gateways = false
}
#
# uncomment and adjust the following example for cross subscripiton vnet peering
#
# test_TO_hub_re1 = {
# name = "test_TO_hub_re1"
# from = {
# id = "/subscriptions/xxxxxxxxxxxx/resourceGroups/vnet/providers/Microsoft.Network/virtualNetworks/vnet1"
# }
# to = {
# vnet_key = "hub_re1"
# }
# allow_virtual_network_access = true
# allow_forwarded_traffic = false
# allow_gateway_transit = false
# use_remote_gateways = false
# }

hub_re1_TO_test = {
name = "hub_re1_TO_test"
from = {
vnet_key = "hub_re1"
}
to = {
id = "/subscriptions/xxxxxxxxxxxxx/resourceGroups/vnet/providers/Microsoft.Network/virtualNetworks/vnet1"
}
allow_virtual_network_access = true
allow_forwarded_traffic = false
allow_gateway_transit = false
use_remote_gateways = false
}
# hub_re1_TO_test = {
# name = "hub_re1_TO_test"
# from = {
# vnet_key = "hub_re1"
# }
# to = {
# id = "/subscriptions/xxxxxxxxxxxxx/resourceGroups/vnet/providers/Microsoft.Network/virtualNetworks/vnet1"
# }
# allow_virtual_network_access = true
# allow_forwarded_traffic = false
# allow_gateway_transit = false
# use_remote_gateways = false
# }
# test_TO_hub_re1 = {
# name = "test_TO_hub_re1"
# from = {
# id = "/subscriptions/xxxxxxxxxxxx/resourceGroups/vnet/providers/Microsoft.Network/virtualNetworks/vnet1"
# }
# to = {
# vnet_key = "hub_re1"
# }
# allow_virtual_network_access = true
# allow_forwarded_traffic = false
# allow_gateway_transit = false
# use_remote_gateways = false
# }

# hub_re1_TO_test = {
# name = "hub_re1_TO_test"
# from = {
# vnet_key = "hub_re1"
# }
# to = {
# id = "/subscriptions/xxxxxxxxxxxxx/resourceGroups/vnet/providers/Microsoft.Network/virtualNetworks/vnet1"
# }
# allow_virtual_network_access = true
# allow_forwarded_traffic = false
# allow_gateway_transit = false
# use_remote_gateways = false
# }

}
1 change: 0 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ provider "azurerm" {
}
}


data "azurerm_subscription" "primary" {}
data "azurerm_client_config" "current" {}

Expand Down

0 comments on commit c642501

Please sign in to comment.