Big Halloween Sale 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: sale65best

Free HashiCorp Terraform-Associate-003 Practice Exam with Questions & Answers | Set: 7

Questions 61

You have declared a variable called var.list which is a list of objects that all have an attribute id . Which options will produce a list of the IDs? Choose two correct answers.

Options:
A.

[ var.list [ * ] , id ]

B.

[ for o in var.list : o.Id ]

C.

var.list[*].id

D.

{ for o in var.llst : o => o.id }

HashiCorp Terraform-Associate-003 Premium Access
Questions 62

Which of the following is not a way to trigger terraform destroy?

Options:
A.

Using the destroy command with auto-approve.

B.

Passing --destroy at the end of a plan request.

C.

Running terraform destroy from the correct directory and then typing yes when prompted in the CLI.

Questions 63

What is a Terraform provider not responsible for?

Options:
A.

Provisioning infrastructure in multiple cloud providers.

B.

Managing actions to take based on resource differences.

C.

Managing resources and data sources based on an API.

D.

Understanding API interactions with a hosted service.

Questions 64

Why would you use the -replace flag for terraform apply?

Options:
A.

You want Terraform to ignore a resource on the next apply

B.

You want Terraform to destroy all the infrastructure in your workspace

C.

You want to force Terraform to destroy a resource on the next apply

D.

You want to force Terraform to destroy and recreate a resource on the next apply

Questions 65

A resource block is shown in the Exhibit section of this page. How would you reference the attribute name of this resource in HCL?

Options:
A.

resource.kubernetes_namespace.example.name

B.

kubernetes_namespace.example.name

C.

data.kubernetes.namespace.name

D.

kubernetes_namespace.test.name

Questions 66

You're writing a Terraform configuration that needs to read input from a local file called id_rsa.pub . Which built-in Terraform function can you use to import the file's contents as a string?

Options:
A.

file("id_rsa.pub")

B.

templaTefil("id_rsa.pub")

C.

filebase64("id_rsa.pub")

D.

fileset<"id_rsa.pub")

Questions 67

You want to define multiple data disks as nested blocks inside the resource block for a virtual machine. What Terraform feature would help you define the blocks using the values in a variable?

Options:
A.

Local values

B.

Count arguments

C.

Collection functions

D.

Dynamic blocks

Questions 68

You much initialize your working directory before running terraform validate.

Options:
A.

True

B.

False

Questions 69

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

Options:
A.

True

B.

False

Questions 70

terraform validate reports syntax check errors for which of the following?

Options:
A.

Code contains tabs for indentation instead of spaces

B.

There is a missing value for a variable

C.

The state file does not match the current infrastructure

D.

None of the above