Halloween Special Sale 75% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: sale75best

Free HashiCorp Terraform-Associate-004 Practice Exam with Questions & Answers | Set: 10

Questions 91

When you run terraform apply -refresh-only, which of the following is not consulted by Terraform to update the state file?

Options:
A.

Terraform configuration files defining the resources.

B.

Authentication credentials for the provider.

C.

The most recent state file.

D.

The actual infrastructure as reported by the provider API.

HashiCorp Terraform-Associate-004 Premium Access
Questions 92

Which of the following methods, used to provision resources into a public cloud, demonstrates the concept of infrastructure as code?

Options:
A.

curl commands manually run from a terminal

B.

A sequence of REST requests you pass to a public cloud API endpoint Most Voted

C.

A script that contains a series of public cloud CLI commands

D.

A series of commands you enter into a public cloud console

Questions 93

You have set the TF_LOG_PATH environment variable for Terraform, and you would like to ensure the logs contain all debug-level messages and verbose process logs.

Which action should you take?

Options:
A.

Set the TF_LOG environment variable to TRACE.

B.

Add a log argument to the terraform block.

C.

Update the Terraform CLI configuration file.

D.

Run the terraform output command.

Questions 94

You are using a networking module in your Terraform configuration with the name label my-network. In your main configuration you have the following code:

When you run terraform validate, you get the following error:

What must you do to successfully retrieve this value from your networking module?

Options:
A.

Change the reference value to my-network,outputs,vmet_id

B.

Define the attribute vmet_id as a variable in the networking modeule

C.

Define the attribute vnet_id as an output in the networking module

D.

Change the reference value module.my,network,outputs,vnet_id

Questions 95

A developer accidentally launched a VM (virtual machine) outside of the Terraform workflow and ended up with two servers with the same name. They don ' t know which VM Terraform manages but do have a list of all active VM IDs.

Which of the following methods could you use to discover which instance Terraform manages?

Options:
A.

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

B.

Update the code to include outputs for the ID of all VMs, then run terraform plan to view the outputs

C.

Run terraform taint/code on all the VMs to recreate them

D.

Use terraform refresh/code to find out which IDs are already part of state

Questions 96

It is best practice to store secret data in the same version control repository as your Terraform configuration.

Options:
A.

True

B.

False

Questions 97

The public Terraform Module Registry is free to use.

Options:
A.

True

B.

False

Questions 98

terraform validate reports syntax check errors for which of the following?

Options:
A.

Code contains tabs for indentation instead of spaces

B.

There is a missing value for a variable

C.

The state file does not match the current infrastructure

D.

None of the above

Questions 99

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 100

You need to deploy resources into two different regions in the same Terraform configuration using the block shown in the exhibit below.

What do you need to add to the provider configuration to deploy the resource to the us-west-2 AWS region?

Options:
A.

B.

100

C.

100

D.