Reader small image

You're reading from  HashiCorp Packer in Production

Product typeBook
Published inJul 2023
PublisherPackt
ISBN-139781803246857
Edition1st Edition
Right arrow
Author (1)
John Boero
John Boero
author image
John Boero

John Boero has 20 years of experience in the tech industry covering engineering, consulting, architecture, and pre-sales. He comes from Chicago, IL in the USA but currently lives in London, UK. He has worked for Red Hat, Puppet, and HashiCorp and remains active in the open source community. All commissions for this book will be donated to the Raspberry Pi Foundation non-profit to encourage coding and computing skills for kids.
Read more about John Boero

Right arrow

Breakdown of components, variables, and artifacts

HCL templates rely on the declaration of sources and parameters, which are then invoked in a build declaration. The build block declares a list of sources to use and which provisioners to run on them. In this case, we’re defining just one source using the virtualbox-iso builder:

source "virtualbox-iso" "hello-base" {

Note that there are actually multiple builders that support VirtualBox: ISO, OVF, or VM. ISO is the standard way you might install a VirtualBox machine from a DVD image or ISO file. This slightly complicates our installation because we need two steps:

  1. Format and install a virtual hard disk.
  2. Boot from the new install and finish provisioners over SSH.

Once this image is built into an OVF output, it can be used as a quicker base image to try other build options, since no ISO installation will be necessary. Instead, the VirtualBox OVF builder can be used to rapidly create...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
HashiCorp Packer in Production
Published in: Jul 2023Publisher: PacktISBN-13: 9781803246857

Author (1)

author image
John Boero

John Boero has 20 years of experience in the tech industry covering engineering, consulting, architecture, and pre-sales. He comes from Chicago, IL in the USA but currently lives in London, UK. He has worked for Red Hat, Puppet, and HashiCorp and remains active in the open source community. All commissions for this book will be donated to the Raspberry Pi Foundation non-profit to encourage coding and computing skills for kids.
Read more about John Boero