2

Creating Your First Template

What is learning a new tool without a Hello World app? Let’s make a basic Hello World template to break down the basic components of a template. HCL2 is the recommended format to write templates as of version 1.5, but for those who prefer JSON or encounter legacy JSON templates, we will build both HCL and JSON versions. We’ll keep this as simple as possible while demonstrating key features in a template that can be built on your own laptop in a coffee shop using free virtualization from Oracle VirtualBox. Coffee will come in handy while you wait for builds to run. We will cover the following topics:

  • Hello World template for a local VM
  • Breakdown of template components
  • Using an IDE to help you write templates

Get HashiCorp Packer in Production now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.