Add variable to decide wether the ssh-port of the k8s-server is exposed
This commit is contained in:
4
main.tf
4
main.tf
@@ -45,8 +45,8 @@ module "k8s" {
|
|||||||
location = "fsn1"
|
location = "fsn1"
|
||||||
count = 1
|
count = 1
|
||||||
}]
|
}]
|
||||||
kubernetes_exposed_ips = values(data.external.my_ip.result)
|
kubernetes_exposed_ips = var.expose_kubernetes_and_ssh_ports ? values(data.external.my_ip.result) : []
|
||||||
ssh_exposed_ips = values(data.external.my_ip.result)
|
ssh_exposed_ips = var.expose_kubernetes_and_ssh_ports ? values(data.external.my_ip.result) : []
|
||||||
public_tcp_services = {
|
public_tcp_services = {
|
||||||
http = ["80", "443"]
|
http = ["80", "443"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
variable "expose_kubernetes_and_ssh_ports" {
|
||||||
|
type = bool
|
||||||
|
default = false
|
||||||
|
}
|
||||||
|
|
||||||
variable "hetzner_dns_apitoken" {
|
variable "hetzner_dns_apitoken" {
|
||||||
type = string
|
type = string
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user