This commit is contained in:
Greyscale 2025-02-14 21:49:08 +01:00
parent ad6838a0be
commit c3a6f4996b
Signed by: grey
GPG key ID: DDB392AE64B32D89

View file

@ -7,11 +7,19 @@ locals {
]), 0, 63)
is_bind = var.bind_path != null
driver_opts = coalesce(var.driver_opts, local.is_bind ? {
"type" = "none"
"device" = var.bind_path
"o" = "bind"
} : {})
driver_opts = (
var.driver_opts != {}
? var.driver_opts
: (
local.is_bind
? {
"type" = "none"
"device" = var.bind_path
"o" = "bind"
}
: {}
)
)
labels = merge(var.labels, {
"com.docker.stack.namespace" = var.stack_name