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

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

Questions 1

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]

HashiCorp Terraform-Associate-004 Premium Access
Questions 2

You can define multiple backend blocks in your Terraform configuration to store your state in multiple locations.

Options:
A.

True

B.

False

Questions 3

A child module can always access variables declared in its parent module.

Options:
A.

True

B.

False

Questions 4

Which Terraform command checks that your configuration syntax is correct?

Options:
A.

terraform validate

B.

terraform init

C.

terraform show

D.

terraform fmt

Questions 5

As a member of an operations team that uses infrastructure as code (lac) practices, you are tasked with making a change to an infrastructure stack running in a public cloud. Which pattern would follow laC best practices for making a change?

Options:
A.

Make the change via the public cloud API endpoint

B.

Clone the repository containing your infrastructure code and then run the code

C.

Use the public cloud console to make the change after a database record has been approved

D.

Make the change programmatically via the public cloud CLI

E.

Submit a pull request and wait for an approved merge of the proposed changes

Questions 6

You’ve enabled DEBUG-level logging for Terraform, and you’d like to send the log data to a file. Which action should you take?

Options:
A.

Set the TF_LOG_PATH environment variable.

B.

Update the Terraform CLI configuration file.

C.

Add a path argument to the terraform block.

D.

Run the terraform output command.

Questions 7

A module can always refer to all variables declared in its parent module.

Options:
A.

True

B.

False

Questions 8

How is terraform import run?

Options:
A.

As a part of terraform init

B.

As a part of terraform plan

C.

As a part of terraform refresh

D.

By an explicit call

E.

All of the above

Questions 9

Your team is collaborating on infrastructure using Terraform and wants to format code to follow Terraform language style conventions. How can you update your code to meet these requirements?

Options:
A.

Run terraform fmt to update your Terraform configurations.

B.

Replace all tabs with spaces within your Terraform configuration files.

C.

Run terraform validate prior to executing terraform plan or terraform apply.

D.

Terraform automatically formats configuration on terraform apply.

Questions 10

Exhibit:

resource " kubernetes_namespace " " example " {

name = " test "

}

A resource block is shown in the exhibit. How would you reference the name attribute of this resource in HCL?

Options:
A.

kubernetes_namespace.example,name

B.

kubernetes_namespace.test.name

C.

data.kubernetes_namespace.name

D.

resource.kubernetes_namespace.example.name