Skip to content

Commit 411ca22

Browse files
committed
fix upstream cluster URL output when tunnels are not in use
1 parent 62bf368 commit 411ca22

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tofu/modules/generic/k3s/outputs.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ output "config" {
2525
http_port = 80
2626
https_port = 443
2727
}
28-
tunnel = { // resolvable from the host running OpenTofu when create_tunnels == true
28+
tunnel = var.create_tunnels ? { // resolvable from the host running OpenTofu when create_tunnels == true
2929
name = "${var.name}.local.gd"
3030
http_port = var.tunnel_app_http_port
3131
https_port = var.tunnel_app_https_port
32-
}
32+
} : {}
3333
}
3434

3535
node_access_commands = merge({

tofu/modules/generic/rke2/outputs.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ output "config" {
2525
http_port = 80
2626
https_port = 443
2727
}
28-
tunnel = { // resolvable from the host running OpenTofu when create_tunnels == true
28+
tunnel = var.create_tunnels ? { // resolvable from the host running OpenTofu when create_tunnels == true
2929
name = "${var.name}.local.gd"
3030
http_port = var.tunnel_app_http_port
3131
https_port = var.tunnel_app_https_port
32-
}
32+
} : {}
3333
}
3434

3535
node_access_commands = merge({

0 commit comments

Comments
 (0)