HashiCorp HashiCorp Infrastructure Automation Certification

HashiCorp TA-002-P Exam Dumps

HashiCorp Certified: Terraform Associate

Exam code
TA-002-P
Questions
449
Updated
25 Nov 2026
  • Instant access from My Account after payment
  • 90 days of free updates
  • Money-back guarantee – see conditions
  • Help by live chat or email
Choose a format
Try free sample questions

Prices in USD. Downloads appear in My Account once your order is complete.

  • Instant access from My Account after payment
  • 90 days of free updates
  • Money-back guarantee – see conditions
  • Help by live chat or email
Free demo

TA-002-P sample questions

Check the style and quality of the material before you buy.

Question 1

In the following code snippet, the block type is identified by which string?

  • A. "aws_instance" 
  • B. resource 
  • C. "db" 
  • D. instance_type 

Answer: B

Question 2

Which statements best describes what the local variable assignment is doing in thefollowing code snippet:

  • A. Create a distinct list of route table name objects 
  • B. Create a map of route table names to subnet names 
  • C. Create a map of route table names from a list of subnet names 
  • D. Create a list of route table names eliminating duplicates 

Answer: D

Question 3

While Terraform is generally written using the HashiCorp Configuration Language (HCL),what other syntax can Terraform are expressed in?

  • A. JSON 
  • B. YAML 
  • C. TypeScript 
  • D. XML 

Answer: A

Explanation

The constructs in the Terraform language can also be expressed in JSON syntax, which is harder for humans to read and edit but easier to generate and parse programmatically.

Question 5

Which Terraform command will check and report errors within modules, attribute names,and value types to make sure they are syntactically valid and internally consistent?

  • A. terraform validate 
  • B. terraform format 
  • C. terraform fmt 
  • D. terraform show 

Answer: A

Explanation

The terraform validate command validates the configuration files in a directory, referring only to the configuration and not accessing any remote services such as remote state, provider APIs, etc. Validate runs checks that verify whether a configuration is syntactically valid and internally consistent, regardless of any provided variables or existing state. It is thus primarily useful for general verification of reusable modules, including the correctness of attribute names and value types. It is safe to run this command automatically, for example as a post-save check in a text editor or as a test step for a re-usable module in a CI system.

Question 6

A user creates three workspaces from the command line - prod, dev, and test. Which of thefollowing commands will the user run to switch to the dev workspace?

  • A. terraform workspace dev 
  • B. terraform workspace select dev 
  • C. terraform workspace -switch dev 
  • D. terraform workspace switch dev 

Answer: B

Explanation

Explanation The terraform workspace select command is used to choose a different workspace to use for further operations. https://www.terraform.io/docs/commands/workspace/select.html

Question 9

Given the below resource configuration -resource "aws_instance" "web" { # ... count = 4 }What does the terraform resource address aws_instance.web refer to?

  • A. It refers to all 4 web instances , together , for further individual segregation , indexing isrequired , with a 0 based index. 
  • B. It refers to the last web EC2 instance , as by default , if no index is provided , the last /N-1 index is used. 
  • C. It refers to the first web EC2 instance out of the 4 ,as by default , if no index is provided ,the first / 0th index is used. 
  • D. The above will result in a syntax error , as it is not syntactically correct . Resourcesdefined using count , can only be referenced using indexes. 

Answer: A

Explanation

A Resource Address is a string that references a specific resource in a larger infrastructure. An address is made up of two parts: [module path][resource spec] Module path: A module path addresses a module within the tree of modules. It takes the form: module.A.module.B.module.C... Multiple modules in a path indicate nesting. If a module path is specified without a resource spec, the address applies to every resource within the module. If the module path is omitted, this addresses the root module. Given a Terraform config that includes: resource "aws_instance" "web" { # ... count = 4 } An address like this: aws_instance.web[3] Refers to only the last instance in the config, and an address like this: aws_instance.web Refers to all four "web" instances.

Question 10

A user has created a module called "my_test_module" and committed it to GitHub. Overtime, several commits have been made with updates to the module, each tagged in GitHubwith an incremental version number. Which of the following lines would be required in amodule configuration block in terraform to select tagged version v1.0.4?

  • A. source = "git::https://example.com/my_test_module.git@tag=v1.0.4" 
  • B. source = "git::https://example.com/my_test_module.git&ref=v1.0.4" 
  • C. source = "git::https://example.com/my_test_module.git#tag=v1.0.4" 
  • D. source = "git::https://example.com/my_test_module.git?ref=v1.0.4" 

Why Dumpsforsure is the best choice for HashiCorp TA-002-P exam preparation

Secure your position in a competitive IT industry

The HashiCorp TA-002-P certification is a strong way to demonstrate your understanding and ability. Our TA-002-P questions & answers help you prepare for it, so you can secure your current position and move your career forward.

Reviewed by IT professionals

We keep our TA-002-P exam dumps up to date, with explanations. The questions and answers on Dumpsforsure are reviewed by people with professional experience of HashiCorp technologies.

One place to prepare

Dumpsforsure brings together the material you need for the HashiCorp TA-002-P exam. Explanations are added to the questions to help you understand the logic behind them and prepare for other HashiCorp exams.

Updated TA-002-P questions & answers

We update the exam files regularly to add new questions. The date of the latest update is shown at the top of this page.

Free TA-002-P demo before you buy

You can view sample TA-002-P questions on this page before buying, to see the format and pattern of the material.

90 days of free updates

You are eligible for 90 days of free updates after buying the TA-002-P exam. If the file is updated in that time, you can download the latest version from your account.

Ready to prepare?

HashiCorp TA-002-P · 449 questions

Choose a format