Packer build flow -- build, store files etc

Hey folks.
Really just a simple question about packer build flow.
I built out a structure for our packer images (OS builds, cloud builds etc.) as we use lots of different versions.
We keep all of our configs in git and push the configs files to github for backup/team sharing.
Our builds pull an ISO remotely, so when you execute that in the directory, it creates the packer_cache directory where the artifacts are pulled down.
I can easily exclude that in the .gitignore file and that works fine.

But i was curious if others have a workflow they like to use, to keep everything nice and clean/organized? Any recommendations?
Hopefully I explained that correctly


You can set the env var PACKER_CACHE_DIR to make Packer create the cache somewhere else on the build system: This would prevent the cache from being formed inside of your git repo, if you’d rather not add it to your gitignore.


O thats awesome! Thank you so much! I will use that for sure in our setup.