2022-02-27 23:22:09 +00:00
|
|
|
resource "nomad_job" "traefik" {
|
|
|
|
jobspec = file("${path.module}/traefik.nomad")
|
|
|
|
}
|
2024-01-03 21:56:43 +00:00
|
|
|
|
|
|
|
resource "nomad_acl_policy" "treafik_secrets_certs_read" {
|
|
|
|
name = "traefik-secrets-certs-read"
|
|
|
|
description = "Read certs to secrets store"
|
|
|
|
rules_hcl = <<EOH
|
|
|
|
namespace "default" {
|
|
|
|
variables {
|
|
|
|
path "secrets/certs/*" {
|
|
|
|
capabilities = ["read"]
|
|
|
|
}
|
|
|
|
path "secrets/certs" {
|
|
|
|
capabilities = ["read"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
EOH
|
|
|
|
job_acl {
|
|
|
|
job_id = resource.nomad_job.traefik.id
|
|
|
|
}
|
|
|
|
}
|