Update secret path for Hydra

Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
Magic_RB 2023-07-10 21:12:36 +02:00
parent 1e5e4bc061
commit 8411477669
No known key found for this signature in database
GPG key ID: 08D5287CC5DDCA0E
2 changed files with 6 additions and 6 deletions

View file

@ -32,7 +32,7 @@ in
resource."vault_policy"."hydra-policy" = { resource."vault_policy"."hydra-policy" = {
name = "hydra-policy"; name = "hydra-policy";
policy = '' policy = ''
path "kv/data/hydra" { path "kv/data/cluster/hydra" {
capabilities = ["read"] capabilities = ["read"]
} }
''; '';

View file

@ -122,7 +122,7 @@ job "hydra" {
template { template {
data = <<EOF data = <<EOF
{{ with secret "kv/data/hydra" }}{{ .Data.data.nixbuild_key }}{{ end }} {{ with secret "kv/data/cluster/hydra" }}{{ .Data.data.nixbuild_key }}{{ end }}
EOF EOF
destination = "secrets/ssh-key" destination = "secrets/ssh-key"
perms = "400" perms = "400"
@ -137,7 +137,7 @@ EOF
template { template {
data = <<EOF data = <<EOF
127.0.0.1:*:*:hydra:{{ with secret "kv/data/hydra" }}{{ .Data.data.pgpass}}{{ end }} 127.0.0.1:*:*:hydra:{{ with secret "kv/data/cluster/hydra" }}{{ .Data.data.pgpass }}{{ end }}
EOF EOF
destination = "secrets/pgpass" destination = "secrets/pgpass"
perms = "400" perms = "400"
@ -145,7 +145,7 @@ EOF
template { template {
data = <<EOF data = <<EOF
127.0.0.1:*:*:hydra:{{ with secret "kv/data/hydra" }}{{ .Data.data.pgpass}}{{ end }} 127.0.0.1:*:*:hydra:{{ with secret "kv/data/cluster/hydra" }}{{ .Data.data.pgpass }}{{ end }}
EOF EOF
destination = "secrets/pgpass-www" destination = "secrets/pgpass-www"
perms = "400" perms = "400"
@ -153,7 +153,7 @@ EOF
template { template {
data = <<EOF data = <<EOF
127.0.0.1:*:*:hydra:{{ with secret "kv/data/hydra" }}{{ .Data.data.pgpass}}{{ end }} 127.0.0.1:*:*:hydra:{{ with secret "kv/data/cluster/hydra" }}{{ .Data.data.pgpass }}{{ end }}
EOF EOF
destination = "secrets/pgpass-queue-runner" destination = "secrets/pgpass-queue-runner"
perms = "400" perms = "400"
@ -184,7 +184,7 @@ EOF
template { template {
data = <<EOF data = <<EOF
alter user hydra with encrypted password '{{ with secret "kv/data/hydra" }}{{ .Data.data.pgpass}}{{ end }}'; alter user hydra with encrypted password '{{ with secret "kv/data/cluster/hydra" }}{{ .Data.data.pgpass }}{{ end }}';
EOF EOF
destination = "secrets/init.sql" destination = "secrets/init.sql"
} }