Automating Image Creation with HashiCorp Packer for DevOps - Declaring Packer Variables

Automating Image Creation with HashiCorp Packer for DevOps - Declaring Packer Variables

Assessment

Interactive Video

Information Technology (IT), Architecture

University

Hard

Created by

Quizizz Content

FREE Resource

The video tutorial explains how to declare and define variables in Packer, including using default files and command line options. It covers variable types such as string, number, list, and map, and discusses type constraints and inference. The tutorial also addresses handling sensitive variables by marking them as sensitive to obfuscate their values in outputs.

Read more

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Where can variables be declared in Packer?

Only via the command line

Only in the default KR file

Only in PKRVARS.HCO file

In any file as long as the correct file name is pointed to

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens if you try to assign a string to a boolean variable in Packer?

Packer will assign a default value

Packer will throw an error and the build will fail

Packer will ignore the assignment

Packer will automatically convert the string to boolean

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT a common variable type in Packer?

List

Number

String

Character

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If a variable type is not specified, what does Packer use to infer the type?

The file name

The first assigned value

The default value

The variable name

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default variable type if neither type nor default is provided in Packer?

Boolean

Number

List

String

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you prevent a variable's value from being displayed in Packer's output?

By marking it as hidden

By marking it as sensitive

By using a special character

By declaring it in a separate file

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens to a sensitive variable in Packer's output?

It is displayed in a separate log file

It is displayed with a warning

It is displayed as asterisks

It is not displayed at all