• HashiCorp Developer

  • HashiCorp Cloud Platform
  • Terraform
  • Packer
  • Consul
  • Vault
  • Boundary
  • Nomad
  • Waypoint
  • Vagrant
Nomad
  • Install
  • Intro
  • Tutorials
  • Documentation
  • API
  • Tools
  • Plugins
  • Sign up
Nomad Home

Documentation

Skip to main contentOverview

    • Overview
    • agent
    • agent-info
    • fmt
    • monitor
    • status
    • ui
      • Overview
      • get
      • init
      • list
      • put
      • purge
    • version

  • Schedulers

  • Nomad Ecosystem
  • Nomad Partnerships
  • Who Uses Nomad
  • FAQ

  • Resources

  • Tutorial Library
  • Community Forum
    (opens in new tab)
  • Support
    (opens in new tab)
  • GitHub
    (opens in new tab)
  1. Developer
  2. Nomad
  3. Documentation
  4. Commands (CLI)
  5. var
  6. init
  • Nomad
  • v1.3.x
  • v1.2.x
  • v1.1.x
  • v1.0.x
  • v0.12.x
  • v0.11.x

»Command: var init

The var init creates an example variable specification file that can be used as a starting point to customize further.

Usage

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:

$ nomad var init
Example variable specification written to spec.nv.hcl
Edit this page on GitHub

On this page

  1. Command: var init
  2. Usage
  3. Init Options
  4. Examples
Give Feedback(opens in new tab)
  • Certifications
  • System Status
  • Terms of Use
  • Security
  • Privacy
  • Trademark Policy
  • Trade Controls
  • Give Feedback(opens in new tab)