Add enable flags for pgadmin and pgbackweb
This commit is contained in:
parent
4ff88bb5c9
commit
bce7e3f29c
4 changed files with 12 additions and 1 deletions
products
|
@ -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)
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue