Packer Configuration
Configure how Atmos executes Packer commands for building machine images, including AMIs, VM images, and container images.
Configuration
Configuration Reference
commandSpecifies the executable to run for Packer commands. Defaults to
packer.For one invocation, use
--command /path/to/executable(or--packer-command). The flag overrides both this default and the stack component'scommand.Examples:
packer- Use Packer from PATH/usr/local/bin/packer- Use specific binary/usr/local/bin/packer-1.9- Use specific version
base_pathDirectory containing Packer component directories. Supports absolute and relative paths.
Each subdirectory should contain Packer templates (
.pkr.hclfiles) for building images.
Component Directory Structure
Packer components follow the same directory structure as other component types:
components/
└── packer/
├── ami-builder/
│ ├── main.pkr.hcl
│ └── variables.pkr.hcl
└── docker-image/
├── main.pkr.hcl
└── variables.pkr.hcl
Example Configuration
With this configuration, you can run Packer commands through Atmos:
# Build an AMI
atmos packer build ami-builder -s prod
# Validate a Packer template
atmos packer validate docker-image -s dev
Related Commands
Execute Packer commands
Build machine images
Validate Packer templates
Initialize Packer plugins
Inspect Packer templates