-
Notifications
You must be signed in to change notification settings - Fork 0
/
modernisation-network.tf
85 lines (76 loc) · 4.04 KB
/
modernisation-network.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# resource "azurerm_virtual_network" "modernisation" {
# count = local.is_test_environment ? 1 : 0
# name = "modernisation-vnet"
# address_space = concat(local.vnet_address_space, local.palo_address_space)
# location = azurerm_resource_group.darts_resource_group.location
# resource_group_name = azurerm_resource_group.darts_resource_group.name
# dns_servers = ["10.128.0.4", "10.128.0.5"]
# tags = var.common_tags
# }
# resource "azurerm_subnet" "modernisation" {
# count = local.is_test_environment ? 1 : 0
# name = "modernisation-subnet"
# resource_group_name = azurerm_resource_group.darts_resource_group.name
# virtual_network_name = azurerm_virtual_network.modernisation[0].name
# address_prefixes = [var.address_space]
# }
# resource "azurerm_network_security_group" "modernisation" {
# count = local.is_test_environment ? 1 : 0
# name = "darts-${var.env}-modernisaton-nsg"
# resource_group_name = azurerm_resource_group.darts_resource_group.name
# location = azurerm_resource_group.darts_resource_group.location
# tags = var.common_tags
# }
# resource "azurerm_subnet_network_security_group_association" "modernisation" {
# count = local.is_test_environment ? 1 : 0
# subnet_id = azurerm_subnet.modernisation[0].id
# network_security_group_id = azurerm_network_security_group.modernisation[0].id
# }
# data "azurerm_virtual_network" "hub-south-vnet-modern" {
# count = local.is_test_environment ? 1 : 0
# provider = azurerm.hub
# name = local.hub[var.hub].ukSouth.name
# resource_group_name = local.hub[var.hub].ukSouth.name
# }
# resource "azurerm_virtual_network_peering" "darts_modernisation_to_hub" {
# count = local.is_test_environment ? 1 : 0
# name = "darts-modernisation-to-hub-${var.env}"
# resource_group_name = azurerm_resource_group.darts_resource_group.name
# virtual_network_name = azurerm_virtual_network.modernisation[0].name
# remote_virtual_network_id = data.azurerm_virtual_network.hub-south-vnet-modern[0].id
# allow_virtual_network_access = true
# allow_forwarded_traffic = true
# allow_gateway_transit = false
# }
# resource "azurerm_virtual_network_peering" "hub_to_darts_modernisation" {
# count = local.is_test_environment ? 1 : 0
# provider = azurerm.hub
# name = "hub-to-darts-modernisation-${var.env}"
# resource_group_name = local.hub[var.hub].ukSouth.name
# virtual_network_name = local.hub[var.hub].ukSouth.name
# remote_virtual_network_id = azurerm_virtual_network.modernisation[0].id
# allow_virtual_network_access = true
# allow_forwarded_traffic = true
# allow_gateway_transit = false
# }
# resource "azurerm_route_table" "route_table_modern" {
# count = local.is_test_environment ? 1 : 0
# name = "darts-modernisation-rt-${var.env}"
# resource_group_name = azurerm_resource_group.darts_resource_group.name
# location = azurerm_resource_group.darts_resource_group.location
# tags = var.common_tags
# }
# resource "azurerm_route" "route_modern" {
# count = local.is_test_environment ? 1 : 0
# name = "DefaultRoute"
# resource_group_name = azurerm_resource_group.darts_resource_group.name
# route_table_name = azurerm_route_table.route_table_modern[0].name
# address_prefix = "0.0.0.0/0"
# next_hop_type = "VirtualAppliance"
# next_hop_in_ip_address = local.hub[var.hub].ukSouth.next_hop_ip
# }
# resource "azurerm_subnet_route_table_association" "modernisationRouteTable" {
# count = local.is_test_environment ? 1 : 0
# subnet_id = azurerm_subnet.modernisation[0].id
# route_table_id = azurerm_route_table.route_table_modern[0].id
# }