2022-11-11 21:34:08 +00:00
|
|
|
variable "name" {
|
|
|
|
type = string
|
|
|
|
description = "Name of the service"
|
|
|
|
}
|
|
|
|
|
2023-09-28 04:30:22 +00:00
|
|
|
variable "detach" {
|
|
|
|
type = bool
|
|
|
|
default = true
|
|
|
|
description = "Detach from Nomad and not wait for job to start"
|
|
|
|
}
|
|
|
|
|
2023-07-07 22:51:19 +00:00
|
|
|
variable "instance_count" {
|
|
|
|
type = number
|
|
|
|
default = 1
|
|
|
|
description = "Number of desired group instances"
|
|
|
|
}
|
|
|
|
|
2023-07-07 00:23:20 +00:00
|
|
|
variable "priority" {
|
|
|
|
type = number
|
|
|
|
default = 50
|
|
|
|
description = "Scheduler priority of the service"
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-11-11 21:34:08 +00:00
|
|
|
variable "image" {
|
|
|
|
type = string
|
|
|
|
description = "Image that should be run"
|
|
|
|
}
|
|
|
|
|
2023-02-27 19:48:24 +00:00
|
|
|
variable "image_pull_timeout" {
|
|
|
|
type = string
|
|
|
|
default = null
|
|
|
|
description = "A time duration that controls how long Nomad will wait before cancelling an in-progress pull of the Docker image"
|
|
|
|
}
|
|
|
|
|
2023-08-24 22:41:18 +00:00
|
|
|
variable "task_meta" {
|
2023-01-11 23:40:42 +00:00
|
|
|
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"
|
|
|
|
}
|
|
|
|
|
2023-08-24 22:41:18 +00:00
|
|
|
variable "job_meta" {
|
|
|
|
type = map(string)
|
|
|
|
default = {}
|
|
|
|
description = "Meta attributes to attach to the task"
|
|
|
|
}
|
|
|
|
|
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"
|
|
|
|
}
|
|
|
|
|
2023-07-07 23:33:36 +00:00
|
|
|
variable "service_port_static" {
|
|
|
|
type = bool
|
|
|
|
default = false
|
|
|
|
description = "Should the port assigned be static"
|
|
|
|
}
|
|
|
|
|
2023-03-25 05:58:44 +00:00
|
|
|
variable "prometheus" {
|
|
|
|
type = bool
|
|
|
|
default = false
|
|
|
|
description = "Should metrics be scraped by prometheus"
|
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"
|
|
|
|
}
|
|
|
|
|
2023-08-07 18:31:35 +00:00
|
|
|
variable "stunnel_resources" {
|
|
|
|
type = object({
|
|
|
|
cpu = number
|
|
|
|
memory = number
|
|
|
|
memory_max = optional(number)
|
|
|
|
})
|
|
|
|
|
|
|
|
default = {
|
|
|
|
cpu = 50
|
|
|
|
memory = 50
|
|
|
|
memory_max = null
|
|
|
|
}
|
|
|
|
|
|
|
|
description = "Resources to be assigned to the stunnel sidecar task"
|
|
|
|
}
|
|
|
|
|
2022-11-11 21:34:08 +00:00
|
|
|
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"
|
|
|
|
}
|
|
|
|
|
2022-11-15 19:43:05 +00:00
|
|
|
variable "service_tags" {
|
|
|
|
type = list(string)
|
|
|
|
default = []
|
|
|
|
description = "Additional tags to be added to the service."
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "ports" {
|
|
|
|
type = list(object({
|
|
|
|
name = string
|
|
|
|
host_network = optional(string)
|
2023-07-24 22:21:41 +00:00
|
|
|
from = optional(number)
|
2022-11-15 19:43:05 +00:00
|
|
|
to = optional(number)
|
|
|
|
static = optional(number)
|
|
|
|
}))
|
|
|
|
default = []
|
|
|
|
description = "Additional ports (not service_port) to be bound."
|
|
|
|
}
|
|
|
|
|
2022-11-11 21:34:08 +00:00
|
|
|
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 "use_mysql" {
|
|
|
|
type = bool
|
|
|
|
default = false
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "use_redis" {
|
|
|
|
type = bool
|
|
|
|
default = false
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "use_ldap" {
|
|
|
|
type = bool
|
|
|
|
default = false
|
|
|
|
}
|
|
|
|
|
2023-07-25 17:59:33 +00:00
|
|
|
variable "use_postgres" {
|
|
|
|
type = bool
|
|
|
|
default = false
|
|
|
|
}
|
|
|
|
|
2023-08-29 22:11:40 +00:00
|
|
|
variable "use_smtp" {
|
|
|
|
type = bool
|
|
|
|
default = false
|
|
|
|
}
|
|
|
|
|
2022-11-11 21:34:08 +00:00
|
|
|
variable "mysql_bootstrap" {
|
|
|
|
type = object({
|
2023-07-07 00:23:56 +00:00
|
|
|
enabled = optional(bool, true)
|
2022-11-11 21:34:08 +00:00
|
|
|
db_name_key = optional(string, "db_name")
|
|
|
|
db_user_key = optional(string, "db_user")
|
|
|
|
db_pass_key = optional(string, "db_pass")
|
2023-03-25 05:58:44 +00:00
|
|
|
add_ro = optional(bool, false)
|
2022-11-11 21:34:08 +00:00
|
|
|
})
|
2023-07-24 22:21:20 +00:00
|
|
|
|
2022-11-11 21:34:08 +00:00
|
|
|
default = null
|
|
|
|
}
|
2023-04-20 23:47:07 +00:00
|
|
|
|
2023-07-25 17:59:33 +00:00
|
|
|
variable "postgres_bootstrap" {
|
|
|
|
type = object({
|
|
|
|
enabled = optional(bool, true)
|
|
|
|
db_name_key = optional(string, "db_name")
|
|
|
|
db_user_key = optional(string, "db_user")
|
|
|
|
db_pass_key = optional(string, "db_pass")
|
2023-07-25 23:40:35 +00:00
|
|
|
databases = optional(list(string), [])
|
2023-07-25 17:59:33 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
default = null
|
|
|
|
}
|
|
|
|
|
2023-04-20 23:47:07 +00:00
|
|
|
variable "constraints" {
|
|
|
|
type = list(object({
|
|
|
|
attribute = optional(string, "")
|
|
|
|
operator = optional(string, "=")
|
|
|
|
value = optional(string, "")
|
|
|
|
}))
|
2023-07-24 22:21:20 +00:00
|
|
|
|
2023-04-20 23:47:07 +00:00
|
|
|
default = []
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "docker_devices" {
|
|
|
|
type = list(object({
|
|
|
|
host_path = string
|
|
|
|
container_path = string
|
|
|
|
}))
|
|
|
|
|
|
|
|
default = []
|
|
|
|
}
|
2023-07-24 22:21:20 +00:00
|
|
|
|
|
|
|
variable "custom_services" {
|
|
|
|
description = "Service definitions for any additional requested services."
|
|
|
|
type = list(object({
|
|
|
|
name = string
|
|
|
|
port = string
|
|
|
|
tags = list(string)
|
|
|
|
}))
|
|
|
|
|
|
|
|
default = []
|
|
|
|
}
|
2023-08-24 19:36:47 +00:00
|
|
|
|
|
|
|
variable "use_wesher" {
|
|
|
|
type = bool
|
|
|
|
description = "Indicates whether or not services should expose themselves on the wesher network"
|
|
|
|
default = true
|
|
|
|
}
|
2023-09-28 04:35:16 +00:00
|
|
|
|
|
|
|
variable "workload_acl_policy" {
|
|
|
|
type = object({
|
|
|
|
name = string
|
|
|
|
description = string
|
|
|
|
rules_hcl = string
|
|
|
|
})
|
|
|
|
|
|
|
|
default = null
|
|
|
|
}
|