-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvnet-prod-euw.tf
61 lines (52 loc) · 2.54 KB
/
vnet-prod-euw.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
#================ VNET ================
resource "azurerm_virtual_network" "vnet-prod-euw" {
name = "vnet-prod-euw-10.1.5.0_25"
resource_group_name = azurerm_resource_group.rg-network.name
location = "westeurope"
address_space = ["10.1.5.0/25"]
dns_servers = concat(local.settings.adds.euw-adds-ip_address, local.settings.adds.ussc-adds-ip_address)
# ddos_protection_plan {
# id = azurerm_network_ddos_protection_plan.ddos-plan.id
# enable = true
# }
tags = merge(local.settings.common_tags, local.settings.prod_tags)
}
resource "azurerm_subnet" "subnet-euw-prod-fe" {
name = "subnet-euw-prod-vnet1-fe-10.1.5.0_27"
virtual_network_name = azurerm_virtual_network.vnet-prod-euw.name
address_prefixes = ["10.1.5.0/27"]
resource_group_name = azurerm_resource_group.rg-network.name
service_endpoints = ["Microsoft.KeyVault", "Microsoft.Storage"]
}
resource "azurerm_subnet" "subnet-euw-prod-be" {
name = "subnet-euw-prod-vnet1-be-10.1.5.32_27"
virtual_network_name = azurerm_virtual_network.vnet-prod-euw.name
address_prefixes = ["10.1.5.32/27"]
resource_group_name = azurerm_resource_group.rg-network.name
service_endpoints = ["Microsoft.KeyVault", "Microsoft.Storage"]
}
#================ NSGs ================
resource "azurerm_network_security_group" "nsg-euw-prod-fe" {
name = "subnet-euw-prod-vnet1-fe-nsg"
resource_group_name = azurerm_resource_group.rg-network.name
location = "westeurope"
}
resource "azurerm_subnet_network_security_group_association" "nsg-euw-prod-fe" {
subnet_id = azurerm_subnet.subnet-euw-prod-fe.id
network_security_group_id = azurerm_network_security_group.nsg-euw-prod-fe.id
}
resource "azurerm_network_security_group" "nsg-euw-prod-be" {
name = "subnet-euw-prod-vnet1-be-nsg"
resource_group_name = azurerm_resource_group.rg-network.name
location = "westeurope"
}
resource "azurerm_subnet_network_security_group_association" "nsg-euw-prod-be" {
subnet_id = azurerm_subnet.subnet-euw-prod-be.id
network_security_group_id = azurerm_network_security_group.nsg-euw-prod-be.id
}
#================ VWAN Connection ================
resource "azurerm_virtual_hub_connection" "vnet-prod-euw-hub2-connection" {
name = "vnet-prod-euw-hub2-connection"
virtual_hub_id = azurerm_virtual_hub.vwan-euw-hub1.id
remote_virtual_network_id = azurerm_virtual_network.vnet-prod-euw.id
}