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

Questions 51

A module block is shown in the Exhibit space of this page. When you use a module block to reference a module from the Terraform Registry such as the one in the example, how do you specify version 1.0.0 of the module?

Options:
A.

Append ?ref=v1.0.0 argument to the source path.

B.

You cannot. Modules stored on the public Terraform Registry do not support versioning.

C.

Add a version = " 1.0.0 " attribute to the module block.

D.

Nothing. Modules stored on the public Terraform module Registry always default to version 1.0.0.

HashiCorp Terraform-Associate-004 Premium Access
Questions 52

When using multiple configurations of the same Terraform provider, what meta-argument must you include in any non-default provider configurations?

Options:
A.

depends_on

B.

alias

C.

name

D.

id

Questions 53

Which task does terraform init not perform?

Options:
A.

Discovers all providers used in the configuration and downloads them.

B.

Validates that values are set for all required input variables.

C.

Connects to the configured backend.

D.

Discovers any remote modules and downloads them.

Questions 54

Which of the following ate advantages of using infrastructure as code (laC) instead of provisioning with a graphical user interface (GUI)? Choose two correct answers.

Options:
A.

Lets you version, reuse, and share infrastructure configuration

B.

Provisions the same resources at a lower cost

C.

Secures your credentials

D.

Reduces risk of operator error

E.

Prevents manual modifications to your resources

Questions 55

You are creating a reusable Terraform configuration and want to include an optional billing_dept tag so your Finance team can track team-specific spending on resources. Which of the following billing_dept variable declarations will achieve this?

Options:
A.

variable " billing_dept " { type = default}

B.

variable " billing_dept " { default =}

C.

variable " billing_dept " { type = optional(string)}

D.

variable " billing_dept " { optional = true}

Questions 56

How can you trigger a run in a Terraform Cloud workspace that is connected to a Version Control System (VCS) repository?

Options:
A.

Only Terraform Cloud organization owners can set workspace variables on VCS connected workspaces

B.

Commit a change to the VCS working directory and branch that the Terraform Cloud workspace is connected to

C.

Only Terraform Cloud organization owners can approve plans in VCS connected workspaces

D.

Only members of a VCS organization can open a pull request against repositories that are connected to Terraform Cloud workspaces

Questions 57

You used Terraform to create an ephemeral development environment in the cloud and are now ready to destroy all the infrastructure described by your Terraform configuration. To be safe, you would like to first see all the infrastructure that Terraform will delete.

Which command should you use to show all the resources that will be deleted? (Pick the 2 correct responses)

Options:
A.

Runterraform destroy. This will output all the resources that will be deleted before prompting for approval.

B.

Runterraform show -destroy.

C.

Runterraform state rm *.

Questions 58

Terraform can only manage resource dependencies if you set them explicitly with the depends_on argument.

Options:
A.

True

B.

False

Questions 59

Where in your Terraform configuration do you specify remote state storage settings?

Options:
A.

The resource block

B.

The provider block

C.

The data block

D.

The terraform block

Questions 60

Variables declared within a module are accessible outside of the module.

Options:
A.

True

B.

False