2022-11-11 21:34:08 +00:00
|
|
|
variable "name" {
|
|
|
|
type = string
|
|
|
|
description = "Name of the service"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "image" {
|
|
|
|
type = string
|
|
|
|
description = "Image that should be run"
|
|
|
|
}
|
|
|
|
|
2023-01-11 23:40:42 +00:00
|
|
|
variable "meta" {
|
|
|
|
type = map(string)
|
|
|
|
default = {}
|
|
|
|
description = "Meta attributes to attach to the task"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "group_meta" {
|
|
|
|
type = map(string)
|
|
|
|
default = {}
|
|
|
|
description = "Meta attributes to attach to the group"
|
|
|
|
}
|
|
|
|
|
2022-11-11 21:34:08 +00:00
|
|
|
variable "service_port" {
|
|
|
|
type = number
|
|
|
|
default = null
|
2022-11-15 17:00:37 +00:00
|
|
|
description = "Port number used by the service"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "metrics_port_name" {
|
|
|
|
type = string
|
|
|
|
default = null
|
|
|
|
description = "Name of port that /metrics can be scraped from"
|
2022-11-11 21:34:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "ingress" {
|
|
|
|
type = bool
|
|
|
|
default = false
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "sticky_disk" {
|
|
|
|
type = bool
|
|
|
|
default = false
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "args" {
|
|
|
|
type = list(string)
|
|
|
|
default = []
|
|
|
|
description = "Arguments passed to the Docker container"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "resources" {
|
|
|
|
type = object({
|
|
|
|
cpu = number
|
|
|
|
memory = number
|
|
|
|
memory_max = optional(number)
|
|
|
|
})
|
|
|
|
|
|
|
|
default = {
|
|
|
|
cpu = 50
|
|
|
|
memory = 100
|
|
|
|
memory_max = null
|
|
|
|
}
|
|
|
|
|
|
|
|
description = "Resources to be assigned to the main task"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "env" {
|
|
|
|
type = map(string)
|
|
|
|
default = {}
|
|
|
|
description = "Env variables for the main task"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "ingress_rule" {
|
|
|
|
type = string
|
|
|
|
default = null
|
|
|
|
description = "Routing rule for ingress"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "ingress_middlewares" {
|
|
|
|
type = list(string)
|
|
|
|
default = []
|
|
|
|
description = "Traefik middlewares that should be used"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "templates" {
|
|
|
|
type = list(object({
|
|
|
|
data = string
|
|
|
|
dest = string
|
|
|
|
dest_prefix = optional(string, "$${NOMAD_TASK_DIR}")
|
|
|
|
change_mode = optional(string)
|
|
|
|
change_signal = optional(string)
|
|
|
|
left_delimiter = optional(string)
|
|
|
|
right_delimiter = optional(string)
|
2022-11-15 17:00:37 +00:00
|
|
|
mount = optional(bool, true)
|
|
|
|
env = optional(bool, false)
|
2022-11-11 21:34:08 +00:00
|
|
|
}))
|
|
|
|
default = []
|
|
|
|
description = "Templates to be used"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "host_volumes" {
|
|
|
|
type = list(object({
|
|
|
|
name = string
|
|
|
|
dest = string
|
|
|
|
read_only = optional(bool)
|
|
|
|
}))
|
|
|
|
default = []
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "healthcheck_path" {
|
|
|
|
type = string
|
|
|
|
default = "/"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "upstreams" {
|
|
|
|
type = list(object({
|
|
|
|
destination_name = string
|
|
|
|
local_bind_port = number
|
|
|
|
}))
|
|
|
|
default = []
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "use_mysql" {
|
|
|
|
type = bool
|
|
|
|
default = false
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "use_redis" {
|
|
|
|
type = bool
|
|
|
|
default = false
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "use_vault" {
|
|
|
|
type = bool
|
|
|
|
default = false
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "use_ldap" {
|
|
|
|
type = bool
|
|
|
|
default = false
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "mysql_bootstrap" {
|
|
|
|
type = object({
|
|
|
|
vault_key = string
|
|
|
|
db_name_key = optional(string, "db_name")
|
|
|
|
db_user_key = optional(string, "db_user")
|
|
|
|
db_pass_key = optional(string, "db_pass")
|
|
|
|
})
|
|
|
|
default = null
|
|
|
|
}
|