-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhub_network.tf
48 lines (44 loc) · 2.18 KB
/
hub_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
##############################################################################
# Management subets
##############################################################################
resource "ibm_is_subnet" "hub_mgm_subnet" {
count = 3
name = "${var.hub_vpc_name}-hub-mgm-subnet-${count.index + 1}"
vpc = ibm_is_vpc.hub_vpc.id
zone = "${var.region}-${count.index + 1}"
resource_group = data.ibm_resource_group.group.id
total_ipv4_address_count = "256"
}
##############################################################################
# on-prem subets
##############################################################################
resource "ibm_is_subnet" "hub_onprem_subnet" {
count = 3
name = "${var.hub_vpc_name}-hub-onprem-subnet-${count.index + 1}"
vpc = ibm_is_vpc.hub_vpc.id
zone = "${var.region}-${count.index + 1}"
resource_group = data.ibm_resource_group.group.id
total_ipv4_address_count = "256"
}
##############################################################################
# Web application internal subets
##############################################################################
resource "ibm_is_subnet" "hub_web_subnet" {
count = 3
name = "${var.hub_vpc_name}-hub-web-subnet-${count.index + 1}"
vpc = ibm_is_vpc.hub_vpc.id
zone = "${var.region}-${count.index + 1}"
resource_group = data.ibm_resource_group.group.id
total_ipv4_address_count = "256"
}
##############################################################################
# VNF Public facing subets
##############################################################################
resource "ibm_is_subnet" "hub_vnf_subnet" {
count = 3
name = "${var.hub_vpc_name}-hub-vnf-subnet-${count.index + 1}"
vpc = ibm_is_vpc.hub_vpc.id
zone = "${var.region}-${count.index + 1}"
resource_group = data.ibm_resource_group.group.id
total_ipv4_address_count = "256"
}