Exam2pass
0 items Sign In or Register
  • Home
  • IT Exams
  • Guarantee
  • FAQs
  • Reviews
  • Contact Us
  • Demo
Exam2pass > HashiCorp > HashiCorp Certifications > TERRAFORM-ASSOCIATE-003 > TERRAFORM-ASSOCIATE-003 Online Practice Questions and Answers

TERRAFORM-ASSOCIATE-003 Online Practice Questions and Answers

Questions 4

terraform validate confirms that your infrastructure matches the Terraform state file.

A. True

B. False

Buy Now

Correct Answer: B

terraform validate does not confirm that your infrastructure matches the Terraform state file. It only checks whether the configuration files in a directory are syntactically valid and internally consistent3. To confirm that your infrastructure matches the Terraform state file, you need to use terraform plan or terraform apply with the -refresh- only option.

Questions 5

Terraform configuration (including any module references) can contain only one Terraform provider type.

A. True

B. False

Buy Now

Correct Answer: B

Terraform configuration (including any module references) can contain more than one Terraform provider type. Terraform providers are plugins that Terraform uses to interact with various cloud services and other APIs. A Terraform configuration can use multiple providers to manage resources across different platforms and services. For example, a configuration can use the AWS provider to create a virtual machine, the Cloudflare provider to manage DNS records, and the GitHub provider to create a repository. Terraform supports hundreds of providers for different use cases and scenarios. References = [Providers], [Provider Requirements], [Provider Configuration]

Questions 6

When does Sentinel enforce policy logic during a Terraform Cloud run?

A. Before the plan phase

B. During the plan phase

C. Before the apply phase

D. After the apply phase

Buy Now

Correct Answer: C

Sentinel policies are checked after the plan stage of a Terraform run, but before it can be confirmed or the terraform apply is executed3. This allows you to enforce rules on your infrastructure before it is created or modified.

Questions 7

Which two steps are required to provision new infrastructure in the Terraform workflow? Choose two correct answers.

A. Plan

B. Import

C. Alidate

D. Init

E. apply

Buy Now

Correct Answer: DE

The two steps that are required to provision new infrastructure in the Terraform workflow are init and apply. The terraform init command initializes a working directory containing Terraform configuration files. It downloads and installs the provider plugins that are needed for the configuration, and prepares the backend for storing the state. The terraform apply command applies the changes required to reach the desired state of the configuration, as described by the resource definitions in the configuration files. It shows a plan of the proposed changes and asks for confirmation before making any changes to the infrastructure. References = [The Core Terraform Workflow], [Initialize a Terraform working directory with init], [Apply Terraform Configuration with apply]

Questions 8

Which is the best way to specify a tag of v1.0.0 when referencing a module stored in Git (for example.Git::https://example.com/vpc.git)?

A. Append pref=v1.0.0 argument to the source path

B. Add version = "1.0.0" parameter to module block

C. Nothing modules stored on GitHub always default to version 1.0.0

Buy Now

Correct Answer: A

The best way to specify a tag of v1.0.0 when referencing a module stored in Git is to append ?ref=v1.0.0 argument to the source path. This tells Terraform to use a specific Git reference, such as a branch, tag, or commit, when fetching the module source code. For example, source = "git::https://example.com/vpc.git?ref=v1.0.0". This ensures that the module version is consistent and reproducible across different environments. References = [Module Sources], [Module Versions]

Questions 9

A developer accidentally launched a VM (virtual machine) outside of the Terraform workflow and ended up with two servers with the same name. They don't know which VM Terraform manages but do have a list of all active VM IDs. Which of the following methods could you use to discover which instance Terraform manages?

A. Run terraform state list to find the names of all VMs, then run terraform state show for each of them to find which VM ID Terraform manages

B. Update the code to include outputs for the ID of all VMs, then run terraform plan to view the outputs

C. Run terraform taint/code on all the VMs to recreate them

D. Use terraform refresh/code to find out which IDs are already part of state

Buy Now

Correct Answer: A

The terraform state list command lists all resources that are managed by Terraform in the current state file1. The terraform state show command shows the attributes of a single resource in the state file2. By using these two commands, you can compare the VM IDs in your list with the ones in the state file and identify which one is managed by Terraform.

Questions 10

What does the default "local" Terraform backend store?

A. tfplan files

B. State file

C. Provider plugins

D. Terraform binary

Buy Now

Correct Answer: B

The default "local" Terraform backend stores the state file in a local file named terraform.tfstate, which can be used to track and manage the state of your infrastructure3.

Questions 11

How does Terraform manage most dependencies between resources?

A. Terraform will automatically manage most resource dependencies

B. Using the depends_on parameter

C. By defining dependencies as modules and including them in a particular order

D. The order that resources appear in Terraform configuration indicates dependencies

Buy Now

Correct Answer: A

This is how Terraform manages most dependencies between resources, by using the references between them in the configuration files. For example, if resource A depends on resource B, Terraform will create resource B first and then pass its attributes to resource A.

Questions 12

Which Terraform collection type should you use to store key/value pairs?

A. Set

B. Map

C. Tuple

D. list

Buy Now

Correct Answer: B

The Terraform collection type that should be used to store key/value pairs is map. A map is a collection of values that are accessed by arbitrary labels, called keys. The keys and values can be of any type, but the keys must be unique within a map. For example, var = { key1 = "value1", key2 = "value2" } is a map with two key/value pairs. Maps are useful for grouping related values together, such as configuration options or metadata. References = [Collection Types], [Map Type Constraints]

Questions 13

Once you configure a new Terraform backend with a terraform code block, which command(s) should you use to migrate the state file?

A. terraform destroy, then terraform apply

B. terraform init

C. terraform push

D. terraform apply

Buy Now

Correct Answer: A

This command will initialize the new backend and prompt you to migrate the existing state file to the new location4. The other commands are not relevant for this task.

Exam Code: TERRAFORM-ASSOCIATE-003
Exam Name: HashiCorp Certified: Terraform Associate (003) (HCTA0-003)
Last Update:
Questions: 547

PDF (Q&A)

$45.99
ADD TO CART

VCE

$49.99
ADD TO CART

PDF + VCE

$59.99
ADD TO CART

Exam2Pass----The Most Reliable Exam Preparation Assistance

There are tens of thousands of certification exam dumps provided on the internet. And how to choose the most reliable one among them is the first problem one certification candidate should face. Exam2Pass provide a shot cut to pass the exam and get the certification. If you need help on any questions or any Exam2Pass exam PDF and VCE simulators, customer support team is ready to help at any time when required.

Home | Guarantee & Policy |  Privacy & Policy |  Terms & Conditions |  How to buy |  FAQs |  About Us |  Contact Us |  Demo |  Reviews

2025 Copyright @ exam2pass.com All trademarks are the property of their respective vendors. We are not associated with any of them.