-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspoke_nonprod_network.tf
30 lines (27 loc) · 1.24 KB
/
spoke_nonprod_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
##############################################################################
# IKS application internal subets
##############################################################################
resource "ibm_is_subnet" "nonprod_iks_subnet" {
depends_on = [ibm_is_vpc.spoke_nonprod_vpc]
count = 3
name = "${var.spoke_nonprod_vpc_name}-iks-subnet-${count.index + 1}"
vpc = ibm_is_vpc.spoke_nonprod_vpc.id
zone = "${var.region}-${count.index + 1}"
resource_group = data.ibm_resource_group.group.id
ipv4_cidr_block = local.subnets_cidr[count.index]
# ipv4_cidr_block = "10.240.0.0/24"
# ipv4_cidr_block = "ibm_is_vpc_address_prefix.prefix${count.index +1}.cidr/24"
# total_ipv4_address_count = "256"
public_gateway = element(ibm_is_public_gateway.spoke_nonprod_pgw.*.id, count.index)
}
resource "ibm_is_public_gateway" "spoke_nonprod_pgw" {
depends_on = [ibm_is_vpc.spoke_nonprod_vpc]
count = 3
name = "${ibm_is_vpc.spoke_nonprod_vpc.name}-pwg--${count.index + 1}"
vpc = ibm_is_vpc.spoke_nonprod_vpc.id
zone = "${var.region}-${count.index + 1}"
//User can configure timeouts
timeouts {
create = "90m"
}
}