mirror of
https://github.com/kemko/nomad.git
synced 2026-01-07 19:05:42 +03:00
Add hcl style to template block; fix interpolation
Also sneak in a schmichael -> hashicorp fix in a url
This commit is contained in:
@@ -221,13 +221,13 @@ The parser will read the JSON string, so the `$CERT_PEM` environment variable
|
||||
will be identical to the contents of the file.
|
||||
|
||||
For more details see [go-envparser's
|
||||
README](https://github.com/schmichael/go-envparse#readme).
|
||||
README](https://github.com/hashicorp/go-envparse#readme).
|
||||
|
||||
## Vault Integration
|
||||
|
||||
This example acquires a PKI certificate from Vault in PEM format and stores it into your application's secret directory.
|
||||
|
||||
```
|
||||
```hcl
|
||||
template {
|
||||
data = <<EOH
|
||||
{{ with secret "pki/issue/foo" "common_name=foo.service.consul" "ip_sans=127.0.0.1" "format=pem" }}
|
||||
@@ -235,7 +235,7 @@ template {
|
||||
{{ .Data.issuing_ca }}
|
||||
{{ .Data.private_key }}{{ end }}
|
||||
EOH
|
||||
destination = "$${NOMAD_SECRETS_DIR}/bundle.pem"
|
||||
destination = "${NOMAD_SECRETS_DIR}/bundle.pem"
|
||||
change_mode = "restart"
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user