Skip to content

Instantly share code, notes, and snippets.

@mmastoras
Created September 12, 2019 18:27
Show Gist options
  • Save mmastoras/d68071b2583b9a395c6a1ffc110d8ca8 to your computer and use it in GitHub Desktop.
Save mmastoras/d68071b2583b9a395c6a1ffc110d8ca8 to your computer and use it in GitHub Desktop.
# the "-" are important as the prevent go for placing LF, which will mess up the binary files
template {
destination = "local/conf/ssl/keystore_decoded.jks"
change_mode = "noop"
data =<<EOF
{{ $mtls_path := env "NOMAD_META_mtls_path" -}}
{{ with secret (printf "%s" $mtls_path) }}{{.Data.keystore | base64Decode }}{{ end -}}
EOF
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment