github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/website/content/docs/commands/var/init.mdx (about)

     1  ---
     2  layout: docs
     3  page_title: 'Commands: var init'
     4  description: |
     5    Generate an example variable specification.
     6  ---
     7  
     8  # Command: var init
     9  
    10  The `var init` creates an example variable specification file that can be used
    11  as a starting point to customize further.
    12  
    13  ## Usage
    14  
    15  ```plaintext
    16  nomad var init <filename>
    17  ```
    18  
    19  When no filename is supplied, a default filename of "spec.nv.hcl" or
    20  "spec.nv.json" will be used depending on the output format.
    21  
    22  ## Init Options
    23  
    24  - `-out` `(enum: hcl | json)`: Format of generated variable
    25    specification. Defaults to `hcl`.
    26  
    27  ## Examples
    28  
    29  Create an example variable specification:
    30  
    31  ```shell-session
    32  $ nomad var init
    33  Example variable specification written to spec.nv.hcl
    34  ```