Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Intro to Terraform

Total questions: 10

Worksheet time: 20mins

Name
Class
Date
1.

Which of the following best describes a Terraform provider?​

a)

A container for multiple resources that are used together​

b)

Serves as a parameter for a Terraform module that allows a module to be customized​

c)

Describes an infrastructure object, such as a virtual network, compute instance, or other component​

d)

A plugin that Terraform uses to translate the API interactions with the service​

2.

What happens when a terraform apply is executed?​

a)

Reconciles the state Terraform knows about with the real-world infrastructure​

b)

Creates the execution plan for the deployment of resources​

c)

The backend is initialized and the working directory is prepped​

d)

Applies the changes required in the target infrastructure in order to reach the desired configuration​

3.

Which flag would be used within a Terraform configuration block to identify the specific version of a provider required?​

a)

required-provider​

b)

required-version​

c)

required_versions​

d)

required_providers​

4.

True or False: You can migrate the Terraform backend but only if there are no resources currently being managed.​

a)

True

b)

False

5.

In regards to Terraform state file, select all the statements below which are correct: (select 3)

a)

The state file is always encrypted at rest​

b)

The Terraform state can contain sensitive data, therefore the state file should be treated as sensitive​

c)

Storing state remotely can provide better security​

d)

When using local state, the state file is stored in plain-text​

e)

Using the mask feature, you can instruct Terraform to mask sensitive data in the state file​

6.

Before a new provider can be used, it must be ______ (Select 2)​

a)

Approved by HashiCorp​

b)

Initialized​

c)

Uploaded to source control​

d)

Declared in the configuration​

7.

What are some of the problems of how infrastructure was traditionally managed before Infrastructure as Code?

a)

Pointing and clicking in a management console isn't scalable as businesses move to a multi-cloud deployment model​

b)

Requests for infrastructure or hardware required a ticket, increasing the time required to deploy applications​

c)

Traditional deployment methods are not able to meet the demands of the modern business where resources tend to live days to weeks, rather than months to years​

d)

Traditionally managed infrastructure can't keep up with cyclic or elastic applications​

e)

All of the above

8.

By default, where does Terraform store its state file?​

a)

remotely using Terraform Cloud​

b)

current working directory​

c)

shared directory​

d)

Amazon S3 bucket​

9.

What happens when a terraform plan is executed?​

a)

It creates an execution plan and determines what changes are required to achieve the desired state in the configuration files.​

b)

It applies the changes required in the target infrastructure in order to reach the desired configuration​

c)

It reconciles the state Terraform knows about with the real-world infrastructure​

d)

The backend is initialized and the working directory is prepped​

10.

Which Terraform command will force a marked resource to be destroyed and recreated on the next apply?​

a)

terraform taint​

b)

terrform fmt​

c)

terraform destroy​

d)

terraform refresh​