diff --git a/charms/worker/k8s/terraform/main.tf b/charms/worker/k8s/terraform/main.tf index fccc1f15..188b365d 100644 --- a/charms/worker/k8s/terraform/main.tf +++ b/charms/worker/k8s/terraform/main.tf @@ -12,6 +12,12 @@ resource "juju_application" "k8s" { base = var.base } + expose { + cidrs = var.expose.cidrs + endpoints = var.expose.endpoints + spaces = var.expose.spaces + } + config = var.config constraints = var.constraints units = var.units diff --git a/charms/worker/k8s/terraform/variables.tf b/charms/worker/k8s/terraform/variables.tf index 74652458..ccb72ad5 100644 --- a/charms/worker/k8s/terraform/variables.tf +++ b/charms/worker/k8s/terraform/variables.tf @@ -57,3 +57,13 @@ variable "units" { type = number default = 1 } + +variable "expose" { + description = "How to expose the Kubernetes API endpoint" + type = map(string) + default = { + cidrs = "0.0.0.0/32" + endpoints = null + spaces = null + } +} \ No newline at end of file