From 52acfcd86708a956b7fae6fa88d13281ecbfe53e Mon Sep 17 00:00:00 2001 From: James Rasell Date: Fri, 8 Apr 2022 17:29:19 +0200 Subject: [PATCH] docs: add nomad services template jobspec example. (#12514) --- .../docs/job-specification/template.mdx | 52 ++++++++++++++----- 1 file changed, 40 insertions(+), 12 deletions(-) diff --git a/website/content/docs/job-specification/template.mdx b/website/content/docs/job-specification/template.mdx index 7176a4786..99b2228d0 100644 --- a/website/content/docs/job-specification/template.mdx +++ b/website/content/docs/job-specification/template.mdx @@ -278,6 +278,38 @@ task "task" { } ``` +## Nomad Integration + +### Nomad Services + +Nomad service registrations can be queried using the `nomadService` and +`nomadServices` functions. The requests are tied to the same namespace as the +job which contains the template stanza. + +```hcl + template { + data = <