Skip to content

Commit

Permalink
Fixup nomad consul default token injection for connect
Browse files Browse the repository at this point in the history
  • Loading branch information
johnalotoski authored and manveru committed Sep 16, 2021
1 parent 1bcf127 commit 22ea496
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions modules/vault-agent-client.nix
Expand Up @@ -107,6 +107,14 @@ in {
command = "${pkgs.systemd}/bin/systemctl try-restart consul.service";
};

"/run/keys/nomad-consul-token" = mkIf config.services.nomad.enable {
contents = ''
{{- with secret "consul/creds/consul-default" }}{{ .Data.token }}{{ end -}}
'';

command = "${pkgs.systemd}/bin/systemctl restart nomad.service";
};

"/etc/vault.d/consul-token.json" = mkIf config.services.vault.enable {
contents = ''
{{ with secret "consul/creds/vault-client" }}
Expand Down

0 comments on commit 22ea496

Please sign in to comment.