Skip to content
Draft
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
6 changes: 2 additions & 4 deletions terraform/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
resource "juju_application" "k8s_postgresql" {
name = var.app_name
model = var.juju_model_name
trust = true

charm {
Expand All @@ -10,12 +9,11 @@ resource "juju_application" "k8s_postgresql" {
base = var.base
}

storage_directives = {
pgdata = var.storage_size
}
storage_directives = var.storage_directives

units = var.units
constraints = var.constraints
config = var.config
resources = var.resources
model_uuid = var.juju_model
}
14 changes: 8 additions & 6 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variable "juju_model_name" {
description = "Juju model name"
variable "juju_model" {
description = "Juju model uuid"
type = string
}

Expand Down Expand Up @@ -39,10 +39,12 @@ variable "constraints" {
default = "arch=amd64"
}

variable "storage_size" {
description = "Storage size"
type = string
default = "10G"
variable "storage_directives" {
description = "Storage directives to apply for this application"
type = map(string)
default = {
data = "10G"
}
}

variable "config" {
Expand Down
2 changes: 1 addition & 1 deletion terraform/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ terraform {
required_providers {
juju = {
source = "juju/juju"
version = ">= 0.14.0"
version = "~> 1.0.0"
}
}
}
Loading