Skip to content

Commit

Permalink
Expose k8s application config via terraform
Browse files Browse the repository at this point in the history
  • Loading branch information
addyess committed Jan 29, 2025
1 parent d019173 commit 312d2e0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions charms/worker/k8s/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions charms/worker/k8s/terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

0 comments on commit 312d2e0

Please sign in to comment.