2022-02-28 20:07:34 +00:00
|
|
|
variable "base_hostname" {
|
2022-04-13 21:01:14 +00:00
|
|
|
type = string
|
2022-02-28 20:07:34 +00:00
|
|
|
description = "Base hostname to serve content from"
|
2022-04-13 21:01:14 +00:00
|
|
|
default = "dev.homelab"
|
2022-02-28 20:07:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
locals {
|
2022-03-13 17:13:19 +00:00
|
|
|
config_data = templatefile(
|
|
|
|
"${path.module}/config.yml",
|
|
|
|
{
|
|
|
|
"base_hostname" = "${var.base_hostname}",
|
|
|
|
}
|
|
|
|
)
|
2022-02-28 20:07:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
resource "nomad_job" "blocky" {
|
|
|
|
hcl2 {
|
|
|
|
enabled = true
|
|
|
|
vars = {
|
|
|
|
"config_data" = "${local.config_data}",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
jobspec = file("${path.module}/blocky.nomad")
|
|
|
|
}
|