#packer (2020-04)
Discuss Packer for building AMIs and Docker Images
Archive: https://archive.sweetops.com/packer/
2020-04-06
![ikar avatar](https://avatars.slack-edge.com/2019-12-12/872745210438_a9cbe68481dd0d2b9e3d_72.jpg)
Hi there! haven’t done my research yet, but quite curious about HCL & packer - is it possible to “import modules”? I’ll have about 5 AMIs to pack and all JSONs look the same except for 1 parameter. Anyone have a solution?
![Abel Luck avatar](https://secure.gravatar.com/avatar/0f605397e0ead93a68e1be26dc26481a.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0001-72.png)
I usually use a Makefile with an environment variable to build AMIs dynamically with packer
![Abel Luck avatar](https://secure.gravatar.com/avatar/0f605397e0ead93a68e1be26dc26481a.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0001-72.png)
make your 1 param an env var in the packer json, and then write a Makefile that sets the var and calls packer once for each value
![ikar avatar](https://avatars.slack-edge.com/2019-12-12/872745210438_a9cbe68481dd0d2b9e3d_72.jpg)
oh, good idea! you use HCL or JSON for that?
![Abel Luck avatar](https://secure.gravatar.com/avatar/0f605397e0ead93a68e1be26dc26481a.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0001-72.png)
i’ve only used JSON with packer
![Abel Luck avatar](https://secure.gravatar.com/avatar/0f605397e0ead93a68e1be26dc26481a.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0001-72.png)
haven’t had time to try out HCL with packer yet
![ikar avatar](https://avatars.slack-edge.com/2019-12-12/872745210438_a9cbe68481dd0d2b9e3d_72.jpg)
cool thanks!
2020-04-08
![RB avatar](https://avatars.slack-edge.com/2020-02-26/958727689603_86844033e59114029b3c_72.png)
anyone know how to retrieve the source ami date ?
![Jason Walsh avatar](https://secure.gravatar.com/avatar/90a2082cd36795676d8bd2be5f01e569.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0002-72.png)
The ec2 describe-images
API might be useful
![RB avatar](https://avatars.slack-edge.com/2020-02-26/958727689603_86844033e59114029b3c_72.png)
ya i mean i could use the awscli or boto to do it. i was hoping there was something within packer
![Jason Walsh avatar](https://secure.gravatar.com/avatar/90a2082cd36795676d8bd2be5f01e569.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0002-72.png)
Not that I’m aware of
![RB avatar](https://avatars.slack-edge.com/2020-02-26/958727689603_86844033e59114029b3c_72.png)
after sniffing around the code, there doesnt seem to be a way so i wrote up a ticket with packer https://github.com/hashicorp/packer/issues/9029
![RB avatar](https://avatars.slack-edge.com/2020-02-26/958727689603_86844033e59114029b3c_72.png)
I added it to Packer. It should be released in the upcoming 1.5.7 version
2020-04-09
2020-04-13
![Abel Luck avatar](https://secure.gravatar.com/avatar/0f605397e0ead93a68e1be26dc26481a.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0001-72.png)
Anyone seen/used https://github.com/wata727/packer-post-processor-amazon-ami-management ?
Packer post-processor plugin for AMI management. Contribute to wata727/packer-post-processor-amazon-ami-management development by creating an account on GitHub.