Add enable flags for pgadmin and pgbackweb

This commit is contained in:
Greyscale 2025-02-02 03:33:17 +01:00
parent 4ff88bb5c9
commit bce7e3f29c
Signed by: grey
GPG key ID: DDB392AE64B32D89
4 changed files with 12 additions and 1 deletions

View file

@ -1,3 +1,8 @@
variable "enabled" {
type = bool
description = "Whether to enable the service or merely provision it."
default = true
}
variable "placement_constraints" {
default = []
type = list(string)

View file

@ -2,7 +2,6 @@ resource "random_password" "default" {
length = 32
special = false
}
variable "servers" {
type = list(object({
Name = string
@ -22,6 +21,7 @@ variable "servers" {
}
module "pgadmin" {
source = "../../docker/service"
enable = var.enabled
image = "dpage/pgadmin4:8"
service_name = "pgadmin"
stack_name = "pgadmin"

View file

@ -1,3 +1,8 @@
variable "enabled" {
type = bool
description = "Whether to enable the service or merely provision it."
default = true
}
variable "pgbackweb_image" {
default = "eduardolat/pgbackweb"
type = string

View file

@ -8,6 +8,7 @@ resource "random_password" "encryption_key" {
}
module "pgbackweb" {
source = "../../docker/service"
enable = var.enabled
image = "${var.pgbackweb_image}:${var.pgbackweb_version}"
environment_variables = {
PBW_ENCRYPTION_KEY = nonsensitive(random_password.encryption_key.result)