Template docs, add vault PKI integration example.
Update the template documentation, and add a vault PKI integration example.
This commit is contained in:
parent
2228e1fd0c
commit
88ed5ad112
|
@ -223,6 +223,24 @@ will be identical to the contents of the file.
|
|||
For more details see [go-envparser's
|
||||
README](https://github.com/schmichael/go-envparse#readme).
|
||||
|
||||
## Vault Integration
|
||||
|
||||
This example will grab a PKI certificate from Vault and put it out on local disk for your application in PEM format
|
||||
including the CA, public and private key in 1 file.
|
||||
|
||||
```
|
||||
template {
|
||||
data = <<EOH
|
||||
{{ with secret "pki/issue/foo" "common_name=foo.service.consul" "ip_sans=127.0.0.1" "format=pem" }}
|
||||
{{ .Data.certificate }}
|
||||
{{ .Data.issuing_ca }}
|
||||
{{ .Data.private_key }}{{ end }}
|
||||
EOH
|
||||
destination = "$${NOMAD_SECRETS_DIR}/bundle.pem"
|
||||
change_mode = "restart"
|
||||
}
|
||||
```
|
||||
|
||||
## Client Configuration
|
||||
|
||||
The `template` block has the following [client configuration
|
||||
|
|
Loading…
Reference in New Issue