Pre-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 | Set: 6

Questions 51

If you manually destroy infrastructure, what is the best practice reflecting this change in Terraform?

Options:
A.

Run terraform refresh

B.

It will happen automatically

C.

Manually update the state fire

D.

Run terraform import

HashiCorp Terraform-Associate-004 Premium Access
Questions 52

When should you run terraform init?

Options:
A.

Every time you run terraform apply

B.

Before you start coding a new Terraform project

C.

After you run terraform plan for the time in a new terraform project and before you run terraform apply

D.

After you start coding a new terraform project and before you run terraform plan for the first time.

Questions 53

You have just developed a new Terraform configuration for two virtual machines with a cloud provider. You would like to create the infrastructure for the first time.

Which Terraform command should you runfirst?

Options:
A.

terraform apply

B.

terraform init

C.

terraform plan

D.

terraform show

Questions 54

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 55

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 56

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

Terraform-Associate-004 Question 56 What do you need to add to the provider configuration to deploy the resource to the us-west-2 AWS region?

A

Terraform-Associate-004 Question 56

B.

Terraform-Associate-004 Question 56

C.

Terraform-Associate-004 Question 56

D.

Terraform-Associate-004 Question 56

Options:
Questions 57

What information does the public Terraform Module Registry automatically expose about published modules?

Options:
A.

Required input variables

B.

Optional inputs variables and default values

C.

Outputs

D.

All of the above

E.

None of the above

Questions 58

Multiple team members are collaborating on infrastructure using Terraform and want to format the* Terraform code following standard Terraform-style convention.

How should they ensure the code satisfies conventions?

Options:
A.

Terraform automatically formats configuration on terraform apply

B.

Run terraform validate prior to executing terraform plan or terraform apply

C.

Use terraform fmt

D.

Replace all tabs with spaces

Questions 59

You modified your Terraform configuration and run Terraform plan to review the changes. Simultaneously, your teammate manually modified the infrastructure component you are working on. Since you already ran terraform plan locally, the execution plan for terraform apply will be the same.

Options:
A.

True

B.

False

Questions 60

Which situation will return an error when you run terraform validate?

Options:
A.

The state file does not match the current infrastructure.

B.

The code contains tabs for indentation instead of spaces.

C.

There is a missing variable block.

D.

None of these will return an error.