Skip to content

Commit 459d6c8

Browse files
authored
feat: exposed new boolean variable transit_gateway_global which allows you to enable connecting to the networks outside the associated region (only applicable if transit gateway is enabled) (#570)
1 parent e20853c commit 459d6c8

29 files changed

+108
-23
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -981,6 +981,7 @@ statement instead the previous block.
981981
| <a name="input_teleport_config_data"></a> [teleport\_config\_data](#input\_teleport\_config\_data) | Teleport config data. This is used to create a single template for all teleport instances to use. Creating a single template allows for values to remain sensitive | <pre>object({<br> teleport_license = optional(string)<br> https_cert = optional(string)<br> https_key = optional(string)<br> domain = optional(string)<br> cos_bucket_name = optional(string)<br> cos_key_name = optional(string)<br> teleport_version = optional(string)<br> message_of_the_day = optional(string)<br> hostname = optional(string)<br> app_id_key_name = optional(string)<br> claims_to_roles = optional(<br> list(<br> object({<br> email = string<br> roles = list(string)<br> })<br> )<br> )<br> })</pre> | `null` | no |
982982
| <a name="input_teleport_vsi"></a> [teleport\_vsi](#input\_teleport\_vsi) | A list of teleport vsi deployments | <pre>list(<br> object(<br> {<br> name = string<br> vpc_name = string<br> resource_group = optional(string)<br> subnet_name = string<br> ssh_keys = list(string)<br> boot_volume_encryption_key_name = string<br> image_name = string<br> machine_type = string<br> access_tags = optional(list(string), [])<br> security_groups = optional(list(string))<br> security_group = optional(<br> object({<br> name = string<br> rules = list(<br> object({<br> name = string<br> direction = string<br> source = string<br> tcp = optional(<br> object({<br> port_max = number<br> port_min = number<br> })<br> )<br> udp = optional(<br> object({<br> port_max = number<br> port_min = number<br> })<br> )<br> icmp = optional(<br> object({<br> type = number<br> code = number<br> })<br> )<br> })<br> )<br> })<br> )<br><br><br> }<br> )<br> )</pre> | `[]` | no |
983983
| <a name="input_transit_gateway_connections"></a> [transit\_gateway\_connections](#input\_transit\_gateway\_connections) | Transit gateway vpc connections. Will only be used if transit gateway is enabled. | `list(string)` | n/a | yes |
984+
| <a name="input_transit_gateway_global"></a> [transit\_gateway\_global](#input\_transit\_gateway\_global) | Connect to the networks outside the associated region. Will only be used if transit gateway is enabled. | `bool` | `false` | no |
984985
| <a name="input_transit_gateway_resource_group"></a> [transit\_gateway\_resource\_group](#input\_transit\_gateway\_resource\_group) | Name of resource group to use for transit gateway. Must be included in `var.resource_group` | `string` | n/a | yes |
985986
| <a name="input_virtual_private_endpoints"></a> [virtual\_private\_endpoints](#input\_virtual\_private\_endpoints) | Object describing VPE to be created | <pre>list(<br> object({<br> service_name = string<br> service_type = string<br> resource_group = optional(string)<br> access_tags = optional(list(string), [])<br> vpcs = list(<br> object({<br> name = string<br> subnets = list(string)<br> security_group_name = optional(string)<br> })<br> )<br> })<br> )</pre> | n/a | yes |
986987
| <a name="input_vpc_placement_groups"></a> [vpc\_placement\_groups](#input\_vpc\_placement\_groups) | List of VPC placement groups to create | <pre>list(<br> object({<br> access_tags = optional(list(string), [])<br> name = string<br> resource_group = optional(string)<br> strategy = string<br> })<br> )</pre> | `[]` | no |

examples/one-vpc-one-vsi/override.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"enable_transit_gateway": false,
3+
"transit_gateway_global": false,
34
"virtual_private_endpoints": [],
45
"service_endpoints": "private",
56
"security_groups": [],

examples/override-example/override.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
},
1212
"clusters": [],
1313
"enable_transit_gateway": true,
14+
"transit_gateway_global": false,
1415
"transit_gateway_connections": [
1516
"management",
1617
"workload",

module-metadata.json

Lines changed: 36 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
],
1212
"pos": {
1313
"filename": "variables.tf",
14-
"line": 1117
14+
"line": 1123
1515
}
1616
},
1717
"add_kms_block_storage_s2s": {
@@ -25,7 +25,7 @@
2525
],
2626
"pos": {
2727
"filename": "variables.tf",
28-
"line": 1482
28+
"line": 1488
2929
}
3030
},
3131
"appid": {
@@ -42,7 +42,7 @@
4242
],
4343
"pos": {
4444
"filename": "variables.tf",
45-
"line": 873
45+
"line": 879
4646
}
4747
},
4848
"atracker": {
@@ -56,7 +56,7 @@
5656
],
5757
"pos": {
5858
"filename": "variables.tf",
59-
"line": 752
59+
"line": 758
6060
}
6161
},
6262
"clusters": {
@@ -69,7 +69,7 @@
6969
],
7070
"pos": {
7171
"filename": "variables.tf",
72-
"line": 768
72+
"line": 774
7373
}
7474
},
7575
"cos": {
@@ -82,7 +82,7 @@
8282
],
8383
"pos": {
8484
"filename": "variables.tf",
85-
"line": 481
85+
"line": 487
8686
}
8787
},
8888
"enable_transit_gateway": {
@@ -112,7 +112,7 @@
112112
],
113113
"pos": {
114114
"filename": "variables.tf",
115-
"line": 1386
115+
"line": 1392
116116
}
117117
},
118118
"f5_vsi": {
@@ -125,7 +125,7 @@
125125
],
126126
"pos": {
127127
"filename": "variables.tf",
128-
"line": 1249
128+
"line": 1255
129129
}
130130
},
131131
"iam_account_settings": {
@@ -149,7 +149,7 @@
149149
],
150150
"pos": {
151151
"filename": "variables.tf",
152-
"line": 1011
152+
"line": 1017
153153
}
154154
},
155155
"ibmcloud_api_key": {
@@ -177,7 +177,7 @@
177177
],
178178
"pos": {
179179
"filename": "variables.tf",
180-
"line": 706
180+
"line": 712
181181
}
182182
},
183183
"network_cidr": {
@@ -309,7 +309,7 @@
309309
],
310310
"pos": {
311311
"filename": "variables.tf",
312-
"line": 1432
312+
"line": 1438
313313
}
314314
},
315315
"security_groups": {
@@ -322,7 +322,7 @@
322322
],
323323
"pos": {
324324
"filename": "variables.tf",
325-
"line": 383
325+
"line": 389
326326
}
327327
},
328328
"service_endpoints": {
@@ -332,7 +332,7 @@
332332
"default": "private",
333333
"pos": {
334334
"filename": "variables.tf",
335-
"line": 695
335+
"line": 701
336336
}
337337
},
338338
"ssh_keys": {
@@ -345,7 +345,7 @@
345345
],
346346
"pos": {
347347
"filename": "variables.tf",
348-
"line": 237
348+
"line": 243
349349
}
350350
},
351351
"tags": {
@@ -409,7 +409,7 @@
409409
],
410410
"pos": {
411411
"filename": "variables.tf",
412-
"line": 917
412+
"line": 923
413413
}
414414
},
415415
"teleport_vsi": {
@@ -422,7 +422,7 @@
422422
],
423423
"pos": {
424424
"filename": "variables.tf",
425-
"line": 943
425+
"line": 949
426426
}
427427
},
428428
"transit_gateway_connections": {
@@ -432,7 +432,20 @@
432432
"required": true,
433433
"pos": {
434434
"filename": "variables.tf",
435-
"line": 226
435+
"line": 232
436+
}
437+
},
438+
"transit_gateway_global": {
439+
"name": "transit_gateway_global",
440+
"type": "bool",
441+
"description": "Connect to the networks outside the associated region. Will only be used if transit gateway is enabled.",
442+
"default": false,
443+
"source": [
444+
"ibm_tg_gateway.transit_gateway.global"
445+
],
446+
"pos": {
447+
"filename": "variables.tf",
448+
"line": 221
436449
}
437450
},
438451
"transit_gateway_resource_group": {
@@ -442,7 +455,7 @@
442455
"required": true,
443456
"pos": {
444457
"filename": "variables.tf",
445-
"line": 221
458+
"line": 227
446459
}
447460
},
448461
"virtual_private_endpoints": {
@@ -455,7 +468,7 @@
455468
],
456469
"pos": {
457470
"filename": "variables.tf",
458-
"line": 455
471+
"line": 461
459472
}
460473
},
461474
"vpc_placement_groups": {
@@ -468,7 +481,7 @@
468481
],
469482
"pos": {
470483
"filename": "variables.tf",
471-
"line": 1450
484+
"line": 1456
472485
}
473486
},
474487
"vpcs": {
@@ -507,7 +520,7 @@
507520
],
508521
"pos": {
509522
"filename": "variables.tf",
510-
"line": 270
523+
"line": 276
511524
}
512525
},
513526
"wait_till": {
@@ -520,7 +533,7 @@
520533
],
521534
"pos": {
522535
"filename": "variables.tf",
523-
"line": 852
536+
"line": 858
524537
}
525538
}
526539
},
@@ -1307,6 +1320,7 @@
13071320
"name": "transit_gateway",
13081321
"attributes": {
13091322
"count": "enable_transit_gateway",
1323+
"global": "transit_gateway_global",
13101324
"location": "region",
13111325
"name": "prefix"
13121326
},

patterns/mixed/config.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ locals {
177177
resource_groups = module.dynamic_values.resource_groups
178178
vpcs = module.dynamic_values.vpcs
179179
enable_transit_gateway = var.enable_transit_gateway
180+
transit_gateway_global = var.transit_gateway_global
180181
transit_gateway_resource_group = "${var.prefix}-service-rg"
181182
transit_gateway_connections = module.dynamic_values.vpc_list
182183
object_storage = module.dynamic_values.object_storage
@@ -287,6 +288,7 @@ locals {
287288
vpcs = lookup(local.override[local.override_type], "vpcs", local.config.vpcs)
288289
vpn_gateways = lookup(local.override[local.override_type], "vpn_gateways", local.config.vpn_gateways)
289290
enable_transit_gateway = lookup(local.override[local.override_type], "enable_transit_gateway", local.config.enable_transit_gateway)
291+
transit_gateway_global = lookup(local.override[local.override_type], "transit_gateway_global", local.config.transit_gateway_global)
290292
transit_gateway_resource_group = lookup(local.override[local.override_type], "transit_gateway_resource_group", local.config.transit_gateway_resource_group)
291293
transit_gateway_connections = lookup(local.override[local.override_type], "transit_gateway_connections", local.config.transit_gateway_connections)
292294
ssh_keys = lookup(local.override[local.override_type], "ssh_keys", local.ssh_keys)

patterns/mixed/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ module "landing_zone" {
2525
vpcs = local.env.vpcs
2626
vpn_gateways = local.env.vpn_gateways
2727
enable_transit_gateway = local.env.enable_transit_gateway
28+
transit_gateway_global = local.env.transit_gateway_global
2829
transit_gateway_resource_group = local.env.transit_gateway_resource_group
2930
transit_gateway_connections = local.env.transit_gateway_connections
3031
ssh_keys = local.env.ssh_keys

patterns/mixed/override.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
}
9191
],
9292
"enable_transit_gateway": true,
93+
"transit_gateway_global": false,
9394
"key_management": {
9495
"keys": [
9596
{

patterns/mixed/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ variable "enable_transit_gateway" {
7878
default = true
7979
}
8080

81+
variable "transit_gateway_global" {
82+
description = "Connect to the networks outside the associated region. Will only be used if transit gateway is enabled."
83+
type = bool
84+
default = false
85+
}
86+
8187
variable "add_atracker_route" {
8288
description = "Atracker can only have one route per zone. use this value to disable or enable the creation of atracker route"
8389
type = bool

patterns/roks/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ module "roks_landing_zone" {
2929
network_cidr = var.network_cidr
3030
vpcs = var.vpcs
3131
enable_transit_gateway = var.enable_transit_gateway
32+
transit_gateway_global = var.transit_gateway_global
3233
ssh_public_key = var.ssh_public_key
3334
update_all_workers = var.update_all_workers
3435
existing_ssh_key_name = var.existing_ssh_key_name

patterns/roks/module/config.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ locals {
156156
resource_groups = module.dynamic_values.resource_groups
157157
vpcs = module.dynamic_values.vpcs
158158
enable_transit_gateway = var.enable_transit_gateway
159+
transit_gateway_global = var.transit_gateway_global
159160
transit_gateway_resource_group = "${var.prefix}-service-rg"
160161
transit_gateway_connections = module.dynamic_values.vpc_list
161162
object_storage = module.dynamic_values.object_storage
@@ -267,6 +268,7 @@ locals {
267268
vpcs = lookup(local.override[local.override_type], "vpcs", local.config.vpcs)
268269
vpn_gateways = lookup(local.override[local.override_type], "vpn_gateways", local.config.vpn_gateways)
269270
enable_transit_gateway = lookup(local.override[local.override_type], "enable_transit_gateway", local.config.enable_transit_gateway)
271+
transit_gateway_global = lookup(local.override[local.override_type], "transit_gateway_global", local.config.transit_gateway_global)
270272
transit_gateway_resource_group = lookup(local.override[local.override_type], "transit_gateway_resource_group", local.config.transit_gateway_resource_group)
271273
transit_gateway_connections = lookup(local.override[local.override_type], "transit_gateway_connections", local.config.transit_gateway_connections)
272274
ssh_keys = lookup(local.override[local.override_type], "ssh_keys", local.config.ssh_keys)

0 commit comments

Comments
 (0)