Handsome Savings - Limited Time Offer 30% OFF - Ends In 0d 0h 0m 0s Coupon code: 50OFF
Welcome to QA4Exam
Logo

- Trusted Worldwide Questions & Answers

HashiCorp Terraform-Associate-003 Exam Actual Questions

The questions for Terraform-Associate-003 were last updated on Oct 4, 2024.
  • Viewing page 1 out of 35 pages.
  • Viewing questions 1-5 out of 176 questions
Unlock Access to All 176 Questions & Answers
Question No. 1

When does Terraform create the .terraform.lock.hc1 file?

Show Answer Hide Answer
Correct Answer: C

Terraform creates the .terraform.lock.hcl file after the first terraform init command. This lock file ensures that the dependencies for your project are consistent across different runs by locking the versions of the providers and modules used.


Question No. 2

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?

Show Answer Hide Answer
Correct Answer: D

Dynamic blocks in Terraform allow you to define multiple nested blocks within a resource based on the values of a variable. This feature is particularly useful for scenarios where the number of nested blocks is not fixed and can change based on variable input.


Question No. 3

A Terraform output that sets the "sensitive" argument to true will not store that value in the state file.

Show Answer Hide Answer
Correct Answer: A

A Terraform output that sets the 'sensitive' argument to true will store that value in the state file. The purpose of setting sensitive = true is to prevent the value from being displayed in the CLI output during terraform plan and terraform apply, and to mask it in the Terraform UI. However, it does not affect the storage of the value in the state file. Sensitive outputs are still written to the state file to ensure that Terraform can manage resources correctly during subsequent operations.


Terraform documentation on sensitive outputs: Terraform Output Values

Question No. 4

All standard backend types support state locking, and remote operations like plan, apply, and destroy.

Show Answer Hide Answer
Correct Answer: B

Not all standard backend types support state locking and remote operations like plan, apply, and destroy. For example, the local backend does not support remote operations and state locking. State locking is a feature that ensures that no two users can make changes to the state file at the same time, which is crucial for preventing race conditions. Remote operations allow running Terraform commands on a remote server, which is supported by some backends like remote or consul, but not all.


Terraform documentation on backends: Terraform Backends

Detailed backend support: Terraform Backend Types

Question No. 5

You can access state stored with the local backend by using terraform_remote_state data source.

Show Answer Hide Answer
Correct Answer: B

You cannot access state stored with the local backend by using the terraform_remote_state data source. The terraform_remote_state data source is used to retrieve the root module output values from some other Terraform configuration using the latest state snapshot from the remote backend. It requires a backend that supports remote state storage, such as S3, Consul, AzureRM, or GCS. The local backend stores the state file locally on the filesystem, which terraform_remote_state cannot access.


Terraform documentation on terraform_remote_state data source: Terraform Remote State Data Source

Example usage of remote state: Example Usage (remote Backend)

Product Image

Unlock All Questions for HashiCorp Terraform-Associate-003 Exam

Full Exam Access, Actual Exam Questions, Validated Answers, Anytime Anywhere, No Download Limits, No Practice Limits

Get All 176 Questions & Answers