tf/modules/swarm/traefik/config.tf

17 lines
522 B
HCL

resource "docker_config" "traefik" {
name = "traefik-cfg-traefik-${replace(timestamp(), ":", ".")}"
data = base64encode(file("${path.module}/cfg/traefik.yaml"))
lifecycle {
ignore_changes = [name]
create_before_destroy = true
}
}
resource "docker_config" "traefik_dynamic" {
name = "traefik-cfg-dynamic-${replace(timestamp(), ":", ".")}"
data = base64encode(file("${path.module}/cfg/dynamic/dynamic.yaml"))
lifecycle {
ignore_changes = [name]
create_before_destroy = true
}
}