hashicorp / packer

Packer is a tool for creating identical machine images for multiple platforms from a single source configuration.
http://www.packer.io
Other
15.03k stars 3.32k forks source link

`packer fmt`: support formatting multiple named templates #12883

Open tomeon opened 5 months ago

tomeon commented 5 months ago

Community Note

Description

This is a request for supporting multiple template and/or directory arguments to packer fmt, rather than the current limitation to a single template (or directory, or stdin). Basically hashicorp/terraform#28191, but for Packer. Related: numtide/treefmt-nix#169.

Use Case(s)

  1. Support for/compliance with the treefmt formatter specification, and
  2. Greater user control over the precise set of files-to-be-formatted.

Potential configuration

$ packer fmt this.pkr.hcl yet/another.pkrvars.hcl but/wait/theres/more.pkr.hcl

Potential References

Thank you in advance for your consideration!

nywilken commented 5 months ago

@tomeon thanks for opening up this request. This looks like a nice enhancement for the fmt command. Thanks for bubbling this up.