Packer: Infrastructure Image Building Fundamentals
Packer: Infrastructure Image Building Fundamentals
Up to 20 questions, shuffled on every run
Welcome to the Packer Basics Quiz! Mastering Packer is the key to creating consistent, automated machine images across any platform. This quiz will test your knowledge of how Packer builds, provisioners, and post-processors work together to enable a true “Build Once, Run Anywhere” workflow. Good luck!
Answer key and explanations20 questions
The quiz above draws 20 questions at random from these 30, so a second attempt will not be the same run. Everything in the pool is listed here.
What is the primary purpose of HashiCorp Packer?
AnswerTo create identical machine images for multiple platforms
What is a Packer "Builder"?
AnswerA component that creates an image for a specific platform
What is a Packer "Provisioner"?
AnswerA component used to configure software on a machine image
Which command is used to verify the syntax of a Packer template?
Answer`packer validate` template
What is a "Post-Processor" used for?
AnswerTo perform tasks on the resulting artifact after a build
What is "Immutable Infrastructure"?
AnswerReplacing servers with new images for every configuration
What is the default configuration language for modern Packer templates?
AnswerHCL (HashiCorp Configuration Language)
What does the `packer build` command do?
AnswerExecutes builders and provisioners to create artifacts
What is a "Source" block in an HCL Packer template?
AnswerA block defining the base image and machine parameters
How do you pass variables into a Packer build from the command line?
Answer`packer build -var "name=value" template.pkr.hcl`
What is the purpose of the "shell" provisioner?
AnswerTo run terminal commands on the guest machine during build
What is a "Manifest" post-processor?
AnswerA tool that outputs a JSON file with build artifact details
What does "Parallel Builds" mean in Packer?
AnswerRunning multiple builders simultaneously for different clouds
What is the "file" provisioner used for?
AnswerTo upload files from the host to the machine being built
What happens to the temporary VM Packer creates after a successful build?
AnswerIt is automatically terminated and deleted by Packer
What is a "Communicator" in Packer?
AnswerThe interface used to connect to the machine being built
What is the purpose of "Packer Init"?
AnswerTo download required plugins defined in the HCL template
Which provisioner would you use to run an Ansible playbook against the image?
AnswerThe `ansible` or `ansible-local` provisioners
What is a "User Variable" in Packer?
AnswerA custom variable used to make templates dynamic
What does the `-force` flag do in a packer build?
AnswerIt deletes an existing image with the same name before building
What is the "Amazon-EBS" builder used for?
AnswerTo build an AMI by launching and stopping an EC2 instance
What is "Packer fmt"?
AnswerA command to format HCL code to HashiCorp standards
What is a "Variables File" (.pkrvars.hcl)?
AnswerAn external file that defines values for template variables
What is the "null" builder used for?
AnswerTo test provisioners without creating an actual cloud image
What is "Artifact" in Packer terms?
AnswerThe result of a builder, such as an AMI or a file
What are "Only" and "Except" in a Packer build block?
AnswerDirectives to run components only for specific builders
What is "Sensitive Variables" in Packer?
AnswerVariables that are masked in the UI and build logs
What is the "Local" Shell provisioner?
AnswerA provisioner that runs commands on the host machine
What is "Packer Console"?
AnswerAn interactive shell to test HCL expressions
Why use Packer with Terraform?
AnswerTo build the images that Terraform later deploys








