Enable flags
This commit is contained in:
parent
93f0f03cd7
commit
fb3a77f526
9 changed files with 25 additions and 5 deletions
products
frigate
mysql
openhaystack
pgadmin
pgbackweb
|
@ -1,3 +1,8 @@
|
||||||
|
variable "enable" {
|
||||||
|
type = bool
|
||||||
|
description = "Whether to enable the service or merely provision it."
|
||||||
|
default = true
|
||||||
|
}
|
||||||
variable "stack_name" {
|
variable "stack_name" {
|
||||||
type = string
|
type = string
|
||||||
description = "The name of the stack to deploy the service to."
|
description = "The name of the stack to deploy the service to."
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
variable "enable" {
|
||||||
|
type = bool
|
||||||
|
description = "Whether to enable the service or merely provision it."
|
||||||
|
default = true
|
||||||
|
}
|
||||||
variable "mysql_image" {
|
variable "mysql_image" {
|
||||||
default = "mariadb"
|
default = "mariadb"
|
||||||
type = string
|
type = string
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
module "service" {
|
module "service" {
|
||||||
source = "../../docker/service"
|
source = "../../docker/service"
|
||||||
|
enable = var.enable
|
||||||
image = "${var.mysql_image}:${var.mysql_version}"
|
image = "${var.mysql_image}:${var.mysql_version}"
|
||||||
stack_name = var.stack_name
|
stack_name = var.stack_name
|
||||||
service_name = var.service_name
|
service_name = var.service_name
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
variable "enable" {
|
||||||
|
type = bool
|
||||||
|
description = "Whether to enable the service or merely provision it."
|
||||||
|
default = true
|
||||||
|
}
|
||||||
# Pass-thru variables
|
# Pass-thru variables
|
||||||
variable "stack_name" {
|
variable "stack_name" {
|
||||||
type = string
|
type = string
|
||||||
|
|
|
@ -5,6 +5,7 @@ module "network" {
|
||||||
module "anisette" {
|
module "anisette" {
|
||||||
source = "../../docker/service"
|
source = "../../docker/service"
|
||||||
image = "dadoum/anisette-v3-server"
|
image = "dadoum/anisette-v3-server"
|
||||||
|
enable = var.enable
|
||||||
stack_name = var.stack_name
|
stack_name = var.stack_name
|
||||||
service_name = "anisette"
|
service_name = "anisette"
|
||||||
networks = concat(var.networks, [module.network])
|
networks = concat(var.networks, [module.network])
|
||||||
|
@ -17,6 +18,7 @@ module "anisette" {
|
||||||
}
|
}
|
||||||
module "macless-haystack" {
|
module "macless-haystack" {
|
||||||
source = "../../docker/service"
|
source = "../../docker/service"
|
||||||
|
enable = var.enable
|
||||||
stack_name = var.stack_name
|
stack_name = var.stack_name
|
||||||
service_name = "macless-haystack"
|
service_name = "macless-haystack"
|
||||||
image = "christld/macless-haystack"
|
image = "christld/macless-haystack"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
variable "enabled" {
|
variable "enable" {
|
||||||
type = bool
|
type = bool
|
||||||
description = "Whether to enable the service or merely provision it."
|
description = "Whether to enable the service or merely provision it."
|
||||||
default = true
|
default = true
|
||||||
|
|
|
@ -21,7 +21,7 @@ variable "servers" {
|
||||||
}
|
}
|
||||||
module "pgadmin" {
|
module "pgadmin" {
|
||||||
source = "../../docker/service"
|
source = "../../docker/service"
|
||||||
enable = var.enabled
|
enable = var.enable
|
||||||
image = "dpage/pgadmin4:8"
|
image = "dpage/pgadmin4:8"
|
||||||
service_name = "pgadmin"
|
service_name = "pgadmin"
|
||||||
stack_name = "pgadmin"
|
stack_name = "pgadmin"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
variable "enabled" {
|
variable "enable" {
|
||||||
type = bool
|
type = bool
|
||||||
description = "Whether to enable the service or merely provision it."
|
description = "Whether to enable the service or merely provision it."
|
||||||
default = true
|
default = true
|
||||||
|
|
|
@ -8,7 +8,7 @@ resource "random_password" "encryption_key" {
|
||||||
}
|
}
|
||||||
module "pgbackweb" {
|
module "pgbackweb" {
|
||||||
source = "../../docker/service"
|
source = "../../docker/service"
|
||||||
enable = var.enabled
|
enable = var.enable
|
||||||
image = "${var.pgbackweb_image}:${var.pgbackweb_version}"
|
image = "${var.pgbackweb_image}:${var.pgbackweb_version}"
|
||||||
environment_variables = {
|
environment_variables = {
|
||||||
PBW_ENCRYPTION_KEY = nonsensitive(random_password.encryption_key.result)
|
PBW_ENCRYPTION_KEY = nonsensitive(random_password.encryption_key.result)
|
||||||
|
@ -22,7 +22,9 @@ module "pgbackweb" {
|
||||||
}
|
}
|
||||||
module "postgres" {
|
module "postgres" {
|
||||||
source = "../postgres"
|
source = "../postgres"
|
||||||
postgres_version = "16"
|
enable = var.enable
|
||||||
|
postgres_version = "17"
|
||||||
|
service_name = "pgbackweb-postgres"
|
||||||
stack_name = var.stack_name
|
stack_name = var.stack_name
|
||||||
networks = [module.network]
|
networks = [module.network]
|
||||||
placement_constraints = var.placement_constraints
|
placement_constraints = var.placement_constraints
|
||||||
|
|
Loading…
Reference in a new issue