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" = {
name = "hydra-policy";
policy = ''
path "kv/data/hydra" {
path "kv/data/cluster/hydra" {
capabilities = ["read"]
}
'';

View file

@ -122,7 +122,7 @@ job "hydra" {
template {
data = <<EOF
{{ with secret "kv/data/hydra" }}{{ .Data.data.nixbuild_key }}{{ end }}
{{ with secret "kv/data/cluster/hydra" }}{{ .Data.data.nixbuild_key }}{{ end }}
EOF
destination = "secrets/ssh-key"
perms = "400"
@ -137,7 +137,7 @@ EOF
template {
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
destination = "secrets/pgpass"
perms = "400"
@ -145,7 +145,7 @@ EOF
template {
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
destination = "secrets/pgpass-www"
perms = "400"
@ -153,7 +153,7 @@ EOF
template {
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
destination = "secrets/pgpass-queue-runner"
perms = "400"
@ -184,7 +184,7 @@ EOF
template {
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
destination = "secrets/init.sql"
}