Haiku Driven Development with Packer and Terraform
Packer and Terraform are awesome tools for building machine images and deploying cloud infrastructure (respectively).
I've been digging into Terraform for awhile now, and recently as an exercise in integrating it with Packer, I built a shell script that used Packer to create an Ubuntu based AMI image with a message of the day installed. Since I'm doing Haiku Driven Development(tm), naturally the message of the day was a haiku.
With the machine image built by Packer, the script launched Terraform to spin up an EC2 instance based on that image, and as a last step the Terraform code created an ssh login script to show the Haiku, which the bash wrapper dutifully executed.
I have shared the code on Github so you can build your own Infrastructure as Code Japanese Poetry, but if you can't wait for that to see the haiku, here it is:
Shell starts, packer builds
Terraform deploys to cloud
Glad nerds read haiku