github.com/hashicorp/packer@v1.14.3/website/content/docs/commands/inspect.mdx (about)

     1  ---
     2  description: >
     3    The `packer inspect` command outputs the variables, builders, and provisioners a template uses so you can review the template without reading the HCL.
     4  page_title: packer inspect command reference
     5  ---
     6  
     7  # `packer inspect` command reference
     8  
     9  The `packer inspect` command takes a template and outputs the various
    10  components a template defines. This can help you quickly learn about a template
    11  without having to dive into the HCL itself. The command will tell you things
    12  like what variables a template accepts, the builders it defines, the
    13  provisioners it defines and the order they'll run, and more.
    14  
    15  This command is extra useful when used with [machine-readable
    16  output](/packer/docs/commands) enabled. The command outputs the components
    17  in a way that is parseable by machines.
    18  
    19  The command doesn't validate the actual configuration of the various components
    20  (that is what the `validate` command is for), but it will validate the syntax
    21  of your template by necessity.
    22  
    23  ## Example
    24  
    25  Given a basic template, here is an example of what the output might look like:
    26  
    27  ```shell-session
    28  $ packer inspect template.pkr.hcl
    29  > input-variables:
    30  
    31  var.aws_access_key: "<sensitive>"
    32  var.aws_secret_key: "<sensitive>"
    33  
    34  > local-variables:
    35  
    36  > builds:
    37  
    38    > <unnamed build 0>:
    39  
    40      sources:
    41  
    42        amazon-ebs.foo
    43        amazon-instance.bar
    44        virtualbox-iso.basic
    45  
    46      provisioners:
    47  
    48        shell
    49  
    50      post-processors:
    51  
    52        <no post-processor>
    53  ```