-
Notifications
You must be signed in to change notification settings - Fork 0
/
coreNetwork.tf
70 lines (58 loc) · 2.32 KB
/
coreNetwork.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
resource "azurerm_resource_group" "core" {
name = "core"
location = "${var.loc}"
tags = "${var.tags}"
}
resource "azurerm_public_ip" "vpnGatewayPublicIp" {
name = "vpnGatewayPublicIp"
location = "${azurerm_resource_group.core.location}"
resource_group_name = "${azurerm_resource_group.core.name}"
tags = "${azurerm_resource_group.core.tags}"
public_ip_address_allocation = "dynamic"
}
resource "azurerm_virtual_network" "core" {
name = "core"
location = "${azurerm_resource_group.core.location}"
resource_group_name = "${azurerm_resource_group.core.name}"
tags = "${azurerm_resource_group.core.tags}"
address_space = [ "10.0.0.0/16" ]
dns_servers = [ "1.1.1.1", "1.0.0.1" ]
}
resource "azurerm_subnet" "GatewaySubnet" {
name = "GatewaySubnet"
resource_group_name = "${azurerm_resource_group.core.name}"
virtual_network_name = "${azurerm_virtual_network.core.name}"
address_prefix = "10.0.0.0/24"
}
resource "azurerm_subnet" "training" {
name = "training"
resource_group_name = "${azurerm_resource_group.core.name}"
virtual_network_name = "${azurerm_virtual_network.core.name}"
address_prefix = "10.0.1.0/24"
}
resource "azurerm_subnet" "dev" {
name = "dev"
resource_group_name = "${azurerm_resource_group.core.name}"
virtual_network_name = "${azurerm_virtual_network.core.name}"
address_prefix = "10.0.2.0/24"
}
# resource "azurerm_virtual_network_gateway" "vpnGateway" {
# name = "vpnGateway"
# location = "${azurerm_resource_group.core.location}"
# resource_group_name = "${azurerm_resource_group.core.name}"
# tags = "${azurerm_resource_group.core.tags}"
#
# type = "Vpn"
# vpn_type = "RouteBased"
#
# sku = "Basic"
# enable_bgp = true
#
# ip_configuration {
# name = "vpnGwConfig"
# public_ip_address_id = "${azurerm_public_ip.vpnGatewayPublicIp.id}"
# private_ip_address_allocation = "Dynamic"
# subnet_id = "${azurerm_subnet.GatewaySubnet.id}"
# }
#
# }