TA-003-P Online Practice Questions

Home / HashiCorp / TA-003-P

Latest TA-003-P Exam Practice Questions

The practice questions for TA-003-P exam was last updated on 2025-06-03 .

Viewing page 1 out of 14 pages.

Viewing questions 1 out of 70 questions.

Question#1

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?


A. Data.vsphere_datacenter.D
B. id
C. Vsphere_datacenter.dc.id
D. Data,dc,id
E. Data.vsphere_datacenter,dc

Explanation:
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#2

Your root module contains a variable named num_servers.
Which is the correct way to pass its value to a child module with an input named servers?

A. servers = num_servers
B. servers = var(num_servers)
C. servers = var.num_servers
D. servers = ${var.num_servers}

Explanation:
The correct syntax to pass a variable from the root module to a child module is servers = var.num_servers. Terraform uses dot notation to reference variables.
References:
Terraform Variables

Question#3

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

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

Explanation:
The -replace flag is used with the terraform apply command when there is a need to explicitly force Terraform to destroy and then recreate a specific resource during the next apply. This can be necessary in situations where a simple update is insufficient or when a resource must be re-provisioned to pick up certain changes.

Question#4

You have a Terraform configuration that defines a single virtual machine with no references to it, You have run terraform apply to create the resource, and then removed the resource definition from your Terraform configuration file.
What will happen you run terraform apply in the working directory again?

A. Terraform will remove the virtual machine from the state file, but the resource will still exist
B. Nothing
C. Terraform will error
D. Terraform will destroy the virtual machine

Explanation:
This is what will happen if you run terraform apply in the working directory again, after removing the resource definition from your Terraform configuration file. Terraform will detect that there is a resource in the state file that is not present in the configuration file, and will assume that you want to delete it.

Question#5

Which parameters does terraform import require? Choose two correct answers.

A. Provider
B. Resource ID
C. Resource address
D. Path

Explanation:
These are the parameters that terraform import requires, as they allow Terraform to identify the existing resource that you want to import into your state file, and match it with the corresponding configuration block in your files.

Exam Code: TA-003-PQ & A: 195 Q&AsUpdated:  2025-06-03

 Get All TA-003-P Q&As