Description: A blog dedicated to sharing the knowledge and resources in a broad range of categories in the area of system administration and devops.
blog (35174) automation (9032) kubernetes (1373) docker (1363) scripting (257) system administration (187) rancher (43) sysadmin resources (1) practical system administration (1) sysadmin blog (1)
There are quite a few blog posts out there detailing this, but none of them seem to be up to date for use with the HCL style syntax, introduced in Packer 1.5, which has a number of advantages over using the original JSON syntax, namely that it is much more human friendly, flexible, and easy to work with.
So in this post I will share a very quick and dirty example packer configuration that uses the HCL syntax to create, provision and upload a Windows server AMI to AWS.
You’ll need the following bootstrap_win.txt file in place in order for Packer to be able to provision the server using PowerShell commands over WinRM.