Summer 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

Setting the TF_LOG environment variable to DEBUG causes debug messages to be logged into stdout.

Options:
A.

True

B.

False

HashiCorp Terraform-Associate-004 Premium Access
Questions 2

Terraform configuration can only import modules from the public registry.

Options:
A.

True

B.

False

Questions 3

One cloud block always maps to a single HCP Terraform/Terraform Cloud workspace.

Options:
A.

True

B.

False

Questions 4

terraform validate uses provider APIs to verify your infrastructure settings.

Options:
A.

True

B.

False

Questions 5

When should you use the force-unlock command?

Options:
A.

You have a high priority change

B.

Automatic unlocking failed

C.

apply failed due to a state lock

D.

You see a status message that you cannot acquire the lock

Questions 6

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 7

What’s the proper syntax for the plan command?

Options:
A.

terraform apply -var-file=tfplan

B.

terraform plan -target=tfplan

C.

terraform plan -generate-config-out=tfplan

D.

terraform plan -out=tfplan

Questions 8

You want to bring an existing database under Terraform management. What information is required to create a new import block for the database?

Pick the two correct responses below.

Options:
A.

The destination resource address of the block that will manage the database.

B.

The path to the .tf file that contains the database resource block.

C.

The ID associated with the current database on the cloud provider.

D.

The database platform and version that the existing resource is running.

E.

The connection string that Terraform will use to connect and manage the database.

Questions 9

A developer launched a VM outside of the Terraform workflow and ended up with two servers with the same name. They are unsure which VM is managed with Terraform, but they do have a list of all active VM IDs. Which method could you use to determine which instance Terraform manages?

Options:
A.

Modify the Terraform configuration to add an import block for both of the virtual machines.

B.

Run a terraform apply -refresh to identify the virtual machine IDs that are already managed by Terraform.

C.

Run terraform state rm on both VMs, then terraform apply to recreate the correct one.

D.

Run terraform state list to find the names of all VMs, then run terraform state show for each of them to find which VM ID Terraform manages.

Questions 10

Which type of block fetches or computes information for use elsewhere in a Terraform configuration?

Options:
A.

data

B.

local

C.

resource

D.

provider