Allow overriding environment variables

This commit is contained in:
Greyscale 2025-03-03 15:46:12 +01:00
parent 136094da5b
commit d6b3bd485e
2 changed files with 7 additions and 2 deletions
products/minio

View file

@ -54,4 +54,9 @@ variable "ports" {
protocol = optional(string, "tcp")
}))
default = []
}
variable "environment_variables" {
type = map(string)
default = {}
description = "A map of environment variables to set in the container."
}

View file

@ -8,7 +8,7 @@ module "minio" {
healthcheck_start_period = "20s"
converge_enable = true
converge_timeout = "2m"
environment_variables = {
environment_variables = merge({
MINIO_ADDRESS = "0.0.0.0:9000"
MINIO_CONSOLE_ADDRESS = "0.0.0.0:9001"
MINIO_ROOT_USER = random_pet.minio_admin_user.id
@ -17,7 +17,7 @@ module "minio" {
MINIO_BROWSER_REDIRECT_URL = "https://${var.domain}/ui/"
#MINIO_BROWSER_REDIRECT = true
MINIO_API_ROOT_ACCESS = "on"
}
}, var.environment_variables)
ports = var.ports
mounts = var.mounts
remote_volumes = var.remote_volumes