Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,9 @@ resource "juju_application" "machine_postgresql" {
units = var.units
constraints = var.constraints
config = var.config

dynamic "expose" {
for_each = var.enable_expose ? [1] : []
content {}
}
}
6 changes: 6 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,9 @@ variable "config" {
type = map(string)
default = {}
}

variable "enable_expose" {
type = bool
default = true
description = "Whether to expose the application"
}
Loading