Skip to content
devops4 active rulesVerified 2026-09-30

Packer .gitignore Template

Standard Packer gitignore template from upstream github/gitignore collection. Generated and merged deterministically with upstream GitHub repository patterns to keep your repository clean of package directories, temporary build artifacts, and local environment files.

Interactive Stack Generator

Preconfigured with Packer
Search for templates
Quick add:
Selected1
Packer
Selected Templates (1)
.gitignore
4 rules
### Packer ###
# Cache objects
packer_cache/
# Crash log
crash.log
# https://www.packer.io/guides/hcl/variables
# Exclude all .pkrvars.hcl files, which are likely to contain sensitive data,
# such as password, private keys, and other secrets. These should not be part of
# version control as they are data points which are potentially sensitive and
# subject to change depending on the environment.
#
*.pkrvars.hcl
# For built boxes
*.box
18 lines•UTF-8
Deterministic

Raw Packer .gitignore

Crawlable upstream source template
packer.gitignore•17 lines•UTF-8
# Cache objects
packer_cache/
# Crash log
crash.log
# https://www.packer.io/guides/hcl/variables
# Exclude all .pkrvars.hcl files, which are likely to contain sensitive data,
# such as password, private keys, and other secrets. These should not be part of
# version control as they are data points which are potentially sensitive and
# subject to change depending on the environment.
#
*.pkrvars.hcl
# For built boxes
*.box

Key Pattern Breakdown

Execution Caches & Runtime Logs

Diagnostic logs, runtime metadata, test coverage reports, and incremental compiler caches that cause noisy repository diffs.

packer_cache/crash.log

Source & Verification

License: CC0-1.0

Place this file in the root directory of your project as .gitignore. Changes take effect on newly added or untracked files.