mirror of https://github.com/hashicorp/packer
This is the first step in attempting to read a Packer configuration file via the packer init command. At the present moment it will try to read one or more configuration templates from a given directory or path. Once parsed it will error if parsing fails or exist successfully if it is able to parse the file. Looking at how the code is structured there will need to be changes made to the following places: - When no configuration file is found Packer will display an error. That error should be bubbled up a bit so that the caller command can determine if it should be displayed or not. For packer init no configuration is not an error. Maybe it should be? - After a configuration has been parsed there needs to be a single way to determine a list of plugins associated with the configuration. HCL and JSON configs have fields for this data but some is exported and some is unexported. Adapting the packerHandler interface may be an option here. More investigation needed.poc/packer-init
parent
8069ae4f43
commit
1bb154de5a
Loading…
Reference in new issue