DRY out and deduplicate packer scripts
Deduplicate and DRY out the code usage in the packer scripts. Use of programatic generation or the more advanced features of HCL should be considered.
See #2059 (closed) for context of the ask.
From @apatterson2 in !6429 (comment 1130717987)
I believe this commit meets MVC criteria for this issue, however, there is a lot of duplicated code that factored out to make it more DRY. HCL has only a limited include file capability, so two possible methods could be used to factor out the common code:
- Move each current HCL AMI file into its own directory and use symlinks to common files.
- Use one HCL file for all AMIs and use command-line variable settings to do database lookups for specific customizations.
Edited by DJ Mountney