# atmos packer validate

Use this command to validate the syntax and configuration of a Packer template configured for an Atmos component in a stack.

## Usage

Execute the `packer validate` command like this:

```shell
atmos packer validate <component> --stack <stack> [flags] -- [packer-options]
```

:::tip
For more details on the `packer validate` command and options, refer to [Packer validate command reference](https://developer.hashicorp.com/packer/docs/commands/validate).
:::

## Arguments

- **`component` (required)**

  Atmos Packer component.

## Flags

- **`--stack` (alias `-s`)(required)**

  Atmos stack.
- **`--template` (alias `-t`)(optional)**

  Packer template.
  It can be specified in the `settings.packer.template` section in the Atmos component manifest,
  or on the command line via the flag `--template <template>` (shorthand `-t`).
  The command line flag takes precedence over `settings.packer.template`.

## Examples

```shell
atmos packer validate aws/bastion --stack prod
atmos packer validate aws/bastion -s prod --template main.pkr.hcl
atmos packer validate aws/bastion -s nonprod -t main.nonprod.pkr.hcl
```
