00:00

QUESTION 46

In Terraform HCL, an object type of object({name=string, age-number}) would match this value.
A)
Terraform-Associate-003 dumps exhibit
B)
Terraform-Associate-003 dumps exhibit
C)
Terraform-Associate-003 dumps exhibit
D)
Terraform-Associate-003 dumps exhibit

Correct Answer: B

QUESTION 47

You have provisioned some virtual machines (VMs) on Google Cloud Platform (GCP) using the gcloud command line tool. However, you are standardizing with Terraform and want to manage these VMs using Terraform instead. What are the two things you must do to achieve this? Choose two correct answers.

Correct Answer: BC
To import existing resources into Terraform, you need to do two things1:
✑ Write a resource configuration block for each resource, matching the type and name used in your state file.
✑ Run terraform import for each resource, specifying its address and ID. There is no such command as terraform Import-gcp, and provisioning new VMs with the same names will not import them into Terraform.

QUESTION 48

How could you reference an attribute from the vsphere_datacenter data source for use with the datacenter_id argument within the vsphere_folder resource in the following configuration?
Terraform-Associate-003 dumps exhibit

Correct Answer: A
The correct way to reference an attribute from the vsphere_datacenter data source for use with the datacenter_id argument within the vsphere_folder resource in the following configuration is data.vsphere_datacenter.dc.id. This follows the syntax for accessing data source attributes, which is data.TYPE.NAME.ATTRIBUTE. In this case, the data source type is vsphere_datacenter, the data source name is dc, and the attribute we want to access is id. The other options are incorrect because they either use the wrong syntax, the wrong punctuation, or the wrong case. References = [Data Source: vsphere_datacenter], [Data Source: vsphere_folder], [Expressions: Data Source References]

QUESTION 49

Which of these actions will prevent two Terraform runs from changing the same state file at the same time?

Correct Answer: B
To prevent two Terraform runs from changing the same state file simultaneously, state locking is used. State locking ensures that when one Terraform operation is running, others will be blocked from making changes to the same state, thus preventing conflicts and data corruption. This is achieved by configuring the state backend to support locking, which will lock the state for all operations that could write to the state.References = This information is supported by Terraform's official documentation,
which explains the importance of state locking and how it can be configured for different backends to prevent concurrent state modifications .

QUESTION 50

How can terraform plan aid in the development process?

Correct Answer: B
The terraform plan command is used to create an execution plan. It allows you to see what actions Terraform will take to reach the desired state defined in your configuration files. It evaluates the current state and configuration, showing a detailed outline of the resources that will be created, updated, or destroyed. This is a critical step in the development process as it helps you verify that the changes you are about to apply will perform as expected, without actually modifying any state or infrastructure.
References:
✑ Terraform documentation on terraform plan: Terraform Plan