open-nomad/website/content/docs/commands/var/init.mdx
2022-09-12 16:44:31 -04:00

35 lines
705 B
Plaintext

---
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
```