open-nomad/website/content/docs/commands/var/init.mdx

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

35 lines
705 B
Plaintext
Raw Normal View History

2022-09-12 20:44:31 +00:00
---
layout: docs
page_title: 'Commands: var init'
description: |
Generate an example variable specification.
---
# Command: var init
The `var init` creates an example variable specification file that can be used
as a starting point to customize further.
## Usage
```plaintext
nomad var init <filename>
```
When no filename is supplied, a default filename of "spec.nv.hcl" or
"spec.nv.json" will be used depending on the output format.
## Init Options
- `-out` `(enum: hcl | json)`: Format of generated variable
specification. Defaults to `hcl`.
## Examples
Create an example variable specification:
```shell-session
$ nomad var init
Example variable specification written to spec.nv.hcl
```