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

Questions 1

Module version is required to reference a module on the Terraform Module Registry.

Options:
A.

True

B.

False

HashiCorp Terraform-Associate-004 Premium Access
Questions 2

A resource block is shown in the Exhibit space of this page. What is the Terraform resource name of the resource block?

Options:
A.

test

B.

google

C.

compute_instance

D.

main

Questions 3

You are responsible for a set of infrastructure that is managed by two workspaces: example-network and example-compute . The example-compute workspace uses data from output values configured in the example-network workspace and must be deployed afterward. Currently, this is a manual process:

    An operator deploys changes to the example-network workspace.

    They manually copy the output values from the example-network workspace to input variables configured for the example-compute workspace.

    They deploy the example-compute workspace.

Which HCP Terraform features can you use to automate this process?

Pick the two correct responses below.

Options:
A.

A health check configured on the example-network workspace to create a plan on the example-compute workspace when HCP Terraform applies changes to it.

B.

A health check configured on the example-compute workspace to create a plan when HCP Terraform applies changes to the example-network workspace.

C.

A tfe_outputs data source configured in the example-compute workspace to automatically load output values from the example-network workspace.

D.

A run trigger configured on the example-network workspace to automatically plan changes to the example-compute workspace after every apply.

E.

A run trigger configured on the example-compute workspace to automatically plan changes after HCP Terraform applies changes to the example-network workspace.

Questions 4

Which of the following does terraform apply change after you approve the execution plan? (Choose two.)

Options:
A.

Cloud infrastructure

B.

The .terraform directory

C.

The execution plan

D.

State file

E.

Terraform code

Questions 5

HashiCorp Configuration Language (HCL) supports user-denned functions.

Options:
A.

True

B.

False

Questions 6

When you initialize Terraform, where does it cache modules from the public Terraform Registry?

Options:
A.

In the /tmp directory.

B.

In the .terraform sub-directory.

C.

In memory.

D.

They are not cached.

Questions 7

Which of the following locations can Terraform use as aprivate sourcefor modules?(Pick 2 correct responses)

Options:
A.

Public repository on GitHub.

B.

Public Terraform Registry.

C.

Internally hosted VCS (Version Control System) platform.

D.

Private repository on GitHub.

Questions 8

You add a new resource to an existing Terraform configuration, but do not update the version constraint in the configuration. The existing and new resources use the same provider. The working contains a .terraform.lock, hc1 file.

How will Terraform choose which version of the provider to use?

Options:
A.

Terraform will use the version recorded in your lock file

B.

Terraform will use the latest version of the provider for the new resource and the version recorded in the lock file to manage existing resources

C.

Terraform will check your state file to determine the provider version to use

D.

Terraform will use the latest version of the provider available at the time you provision your new resource

Questions 9

Which is a benefit of the Terraform state file?

Options:
A.

A state file can schedule recurring infrastructure tasks.

B.

A state file is the desired state expressed by the Terraform code files.

C.

A state file is a source of truth for resources provisioned with Terraform.

D.

A state file is a source of truth for resources provisioned with a public cloud console.

Questions 10

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

Options:
A.

True

B.

False