-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtgw.tf
27 lines (27 loc) · 978 Bytes
/
tgw.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
resource "ibm_tg_gateway" "auto_tg_gw"{
name = "${var.basename}-tgw"
location=var.region
resource_group = data.ibm_resource_group.group.id
global=true
}
resource "ibm_tg_connection" "prod_vpc_tg_connection1" {
gateway = ibm_tg_gateway.auto_tg_gw.id
network_type = "vpc"
name = "spoke-prod-connection1"
network_id = ibm_is_vpc.spoke_prod_vpc.resource_crn
depends_on = [ibm_is_vpc.spoke_prod_vpc]
}
resource "ibm_tg_connection" "nonprod_vpc_tg_connection2" {
gateway = ibm_tg_gateway.auto_tg_gw.id
network_type = "vpc"
name = "spoke-nonprod-connection2"
network_id = ibm_is_vpc.spoke_nonprod_vpc.resource_crn
depends_on = [ibm_is_vpc.spoke_nonprod_vpc]
}
resource "ibm_tg_connection" "hub_vpc_tg_connectioan3" {
gateway = ibm_tg_gateway.auto_tg_gw.id
network_type = "vpc"
name = "hub-connection3"
network_id = ibm_is_vpc.hub_vpc.resource_crn
depends_on = [ibm_tg_gateway.auto_tg_gw]
}