Using the manifest post-processor
Collecting a lot of build data together can result in a mess of directories and artifacts without any way to index or organize them. Packer does provide a simple mechanism to index this data. The manifest post-processor can be used to generate a helpful JSON document listing what was generated during the build. The manifest isn’t enabled by default but can be enabled by simply adding a post-processor for the manifest in just one line:
post-processor "manifest" {}
If you simply enable the manifest post-processor, Packer will use default settings, which are pretty useful, without customizing anything. This means that a JSON document will be created or appended at the ./packer-manifest.json
path. A list of all builds will be maintained within the manifest. It would be wise to either rotate this file or store it inside a JSON document database such as MongoDB if you wish to search for it later. Or, we can see in the next chapter...