Files
Packer-Cn/packer
Lucas Bajolet 479ca07324 hcp-sbom: use a JSON-encoded output for Packer
When outputting the data from the provisioner so Packer can consume it,
we are writing to a file.
The only constraints on this file are that Packer manages its lifecycle,
and that Packer core and the provisioner are synced-up in terms of the
contents and the structure of the file.

Since we are outputting the file, and its format, we can bundle the two
together, and export them under a structure that both the provisioner
and Packer core have access to, so we can then fill-in the blanks, and
write a serialised version of this structure to disk.

This is the approach taken in this commit.

First we clean-up the existing code a bit, since some abstractions were
a bit hasty, and did not necessarily make sense in all cases, so the
code is consolidated under `Provision`, and we use that structure then
to fill-in the relevant information before serialising it to JSON and
writing it in the output file provided by Packer core.
2024-11-11 17:04:00 -05:00
..
2024-11-11 17:04:00 -05:00
2024-11-11 17:04:00 -05:00
2023-08-10 15:53:29 -07:00
2024-07-18 10:51:17 -04:00