parent
ad6838a0be
commit
c3a6f4996b
1 changed files with 13 additions and 5 deletions
|
@ -7,11 +7,19 @@ locals {
|
||||||
]), 0, 63)
|
]), 0, 63)
|
||||||
|
|
||||||
is_bind = var.bind_path != null
|
is_bind = var.bind_path != null
|
||||||
driver_opts = coalesce(var.driver_opts, local.is_bind ? {
|
driver_opts = (
|
||||||
"type" = "none"
|
var.driver_opts != {}
|
||||||
"device" = var.bind_path
|
? var.driver_opts
|
||||||
"o" = "bind"
|
: (
|
||||||
} : {})
|
local.is_bind
|
||||||
|
? {
|
||||||
|
"type" = "none"
|
||||||
|
"device" = var.bind_path
|
||||||
|
"o" = "bind"
|
||||||
|
}
|
||||||
|
: {}
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
labels = merge(var.labels, {
|
labels = merge(var.labels, {
|
||||||
"com.docker.stack.namespace" = var.stack_name
|
"com.docker.stack.namespace" = var.stack_name
|
||||||
|
|
Loading…
Reference in a new issue