2022-03-03 17:37:49 +00:00
|
|
|
variable "base_hostname" {
|
|
|
|
type = string
|
|
|
|
description = "Base hostname to serve content from"
|
|
|
|
default = "dev.homelab"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "consul_address" {
|
|
|
|
type = string
|
|
|
|
description = "address of consul server for dynamic scraping"
|
|
|
|
}
|
|
|
|
|
2022-03-12 18:07:52 +00:00
|
|
|
# resource "nomad_job" "exporters" {
|
|
|
|
# hcl2 {
|
|
|
|
# enabled = true
|
|
|
|
# }
|
|
|
|
#
|
|
|
|
# jobspec = file("${path.module}/exporters.nomad")
|
|
|
|
# }
|
2022-03-03 17:37:49 +00:00
|
|
|
|
|
|
|
resource "nomad_job" "prometheus" {
|
|
|
|
hcl2 {
|
|
|
|
enabled = true
|
|
|
|
vars = {
|
|
|
|
"consul_address" = "${var.consul_address}",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
jobspec = file("${path.module}/prometheus.nomad")
|
|
|
|
}
|
2022-03-12 18:07:52 +00:00
|
|
|
|
|
|
|
resource "nomad_job" "grafana" {
|
|
|
|
hcl2 {
|
|
|
|
enabled = true
|
|
|
|
}
|
|
|
|
|
|
|
|
jobspec = file("${path.module}/grafana.nomad")
|
|
|
|
}
|