Skip to content

Commit

Permalink
docs on how to use pkiCert w/ CA chain
Browse files Browse the repository at this point in the history
Thanks Iulian Mandache for the idea!
  • Loading branch information
eikenb committed Jul 22, 2022
1 parent a23d3ac commit d18b2f4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/templating-language.md
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,21 @@ Cert Authority: {{ .CA }}
{{ end }}
```

If you need the complete CA+Chain in the same file as your Cert and Key use the
standard `secret` to include it, but note the CA in the pkiCert return should
be ignored as it would be redundant and upon reload might grab one of the chain
certs. Something like this.

```golang
{{ with pkiCert "pki/issue/my-domain-dot-com" "common_name=foo.example.com" }}
Private Key: {{ .Key }}
Cert Authority: {{ .CA }}
{{ end }}
{{ with secret "pki/cert/ca_chain" }}
CA+Chain: {{ .Data.ca_chain }}
{{ end }}
`
### `service`
Query [Consul][consul] for services based on their health.
Expand Down

0 comments on commit d18b2f4

Please sign in to comment.