Summer Certification Sale 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: save70

Full Access HashiCorp Terraform-Associate-004 Tutorials

HashiCorp Certified: Terraform Associate (004) (HCTA0-004) Questions and Answers

Question 105

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}

Question 106

You have a simple Terraform configuration containing one virtual machine (VM) in a cloud provider. You run terraform apply and the VM is created successfully.

What will happen if you delete the VM using the cloud provider console, then run terraform apply again without changing any Terraform code?

Options:

A.

Terraform will recreate the VM.

B.

Terraform will report an error.

C.

Terraform will remove the VM from the state file.

D.

Terraform will not make any changes.