Spring Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 70track

Free HashiCorp Terraform-Associate-003 Practice Exam with Questions & Answers

Questions 1

You've used Terraform to deploy a virtual machine and a database. You want to replace this virtual machine instance with an identical one without affecting the database. What is the best way to achieve this using Terraform?

Options:
A.

Use the terraform state rm command to remove the VM from state file

B.

Use the terraform taint command targeting the VMs then run terraform plan and terraform apply

C.

Use the terraform apply command targeting the VM resources only

D.

Delete the Terraform VM resources from your Terraform code then run terraform plan and terraform apply

HashiCorp Terraform-Associate-003 Premium Access
Questions 2

When should you write Terraform configuration files for existing infrastructure that you want to start managing with Terraform?

Options:
A.

You can import infrastructure without corresponding Terraform code

B.

Terraform will generate the corresponding configuration files for you

C.

Before you run terraform Import

D.

After you run terraform import

Questions 3

All standard backend types support state locking, and remote operations like plan, apply, and destroy.

Options:
A.

True

B.

False

Questions 4

You have a list of numbers that represents the number of free CPU cores on each virtual cluster:

numcpus = [ 18, 3, 7, 11, 2 ]

What Terraform function could you use to select the largest number from the list?

Options:
A.

top(numcpus)

B.

max(numcpus)

C.

ceil (numcpus)

D.

hight[numcpus]

Questions 5

You have multiple team members collaborating on infrastructure as code (IaC) using Terraform, and want to apply formatting standards for readability.

How can you format Terraform HCL (HashiCorp Configuration Language) code according to standard Terraform style convention?

Options:
A.

Run the terraform fmt command during the code linting phase of your CI/CD process Most Voted

B.

Designate one person in each team to review and format everyone's code

C.

Manually apply two spaces indentation and align equal sign "=" characters in every Terraform file (*.tf)

D.

Write a shell script to transform Terraform files using tools such as AWK, Python, and sed

Questions 6

You ate creating a Terraform configuration which needs to make use of multiple providers, one for AWS and one for Datadog. Which of the following provider blocks would allow you to do this?

A)

Terraform-Associate-003 Question 6

B)

C)

D)

Options:
A.

Option A

B.

Option B

C.

Option C

D.

Option D

Questions 7

terraform init retrieves and caches the configuration for all remote modules.

Options:
A.

True

B.

False

Questions 8

You want to define multiple data disks as nested blocks inside the resource block for a virtual machine. What Terraform feature would help you define the blocks using the values in a variable?

Options:
A.

Local values

B.

Count arguments

C.

Collection functions

D.

Dynamic blocks

Questions 9

What does the default "local" Terraform backend store?

Options:
A.

tfplan files

B.

State file

C.

Provider plugins

D.

Terraform binary

Questions 10

Which of the following is not a valid Terraform collection type?

Options:
A.

Tree

B.

Map

C.

List

D.

set