parent
ad6838a0be
commit
c3a6f4996b
1 changed files with 13 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue