Pre-Winter 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: 9

Questions 81

Which of the following statements about Terraform modules is not true?

Options:
A.

Modules can call other modules

B.

A module is a container for one or more resources

C.

Modules must be publicly accessible

D.

You can call the same module multiple times

HashiCorp Terraform-Associate-004 Premium Access
Questions 82

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 " {default = " " }

B.

variable " billing_dept " {optional = true}

C.

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

D.

variable " billing_dept " {type = default}

Questions 83

What is the primary purpose of IaC (Infrastructure as Code)?

Options:
A.

To provision infrastructure cheaply.

B.

To programmatically create and configure resources.

C.

To define a vendor-agnostic API.

D.

To define a pipeline to test and deliver software.

Questions 84

When using Terraform to deploy resources into Azure, which scenarios are true regarding state files? (Choose two.)

Options:
A.

When you change a Terraform-managed resource via the Azure Cloud Console, Terraform updates the state file to reflect the change during the next plan or apply

B.

Changing resources via the Azure Cloud Console records the change in the current state file

C.

When you change a resource via the Azure Cloud Console, Terraform records the changes in a new state file

D.

Changing resources via the Azure Cloud Console does not update current state file

Questions 85

INcheck block ' s assertion fails, Terraform blocks the current operation from executing.

Options:
A.

True

B.

False

Questions 86

A Terraform local value can reference other Terraform local values.

Options:
A.

True

B.

False

Questions 87

Changing the Terraform backend from the default " local " backend to a different one after performing your first terrafom apply is:

Options:
A.

Optional

B.

Impossible

C.

Mandatory

D.

Discouraged

Questions 88

Which of the following should you put into the required_providers block?

Options:
A.

version > = 3.1

B.

version = “ > = 3.1”

C.

version ~ > 3.1

Questions 89

You have two separate Terraform configurations:

Configuration A provisions a virtual network and subnets.

Configuration B provisions compute resources that must be attached to those subnets.

In Configuration B, you have a terraform_remote_state data source configured to read Configuration A’s local state file. When running terraform plan for Configuration B in a CI/CD pipeline, Terraform fails because the state file cannot be found and is not accessible to the pipeline runtime.

What is the best solution to reliably access the state data from Configuration A in this scenario?

Options:
A.

Switch to input variables in Configuration B and supply the values using a terraform.tfvars file.

B.

Change the path argument to use an absolute filesystem path so Terraform can always locate the local state file.

C.

Migrate Configuration A to a remote backend and update the terraform_remote_state data source in Configuration B to reference that remote backend.

D.

Combine the two configurations into a single configuration and use local references.

Questions 90

Which are forbidden actions when the terraform state file is locked? Choose three correct answers.

Options:
A.

Terraform state list

B.

Terraform destroy

C.

Terraform validate

D.

Terraform validate

E.

Terraform for

F.

Terraform apply