Packer manifest post-processor write error in CI
The manifest post-processor records built artifacts (such as AMI ids) to a JSON file that later steps read. If the output path is missing or not writable, the post-processor fails after a successful build.
What this error means
packer build completes the image, then the manifest post-processor fails writing the output file, often with a "no such file or directory" or permission error on the path.
==> Running post-processor: manifest
Build errored: open output/manifest.json: no such file or directoryCommon causes
The output directory does not exist
The manifest output points at a directory the runner never created, so the write fails.
The path is not writable
A permission issue on the target directory blocks the write on the runner.
How to fix it
Create the output directory and write there
- Create the output directory before build, or write to the working directory.
- Point the manifest
outputat that writable path. - Read the manifest in a later step for the artifact ids.
post-processor "manifest" {
output = "manifest.json"
strip_path = true
}Ensure the directory exists in CI
If you use a subdirectory, create it before packer build so the write path is present.
- run: mkdir -p output
- run: packer build .How to prevent it
- Write the manifest to a path you know is writable.
- Create output directories before build.
- Read artifact ids from the manifest in downstream steps.