Free Terraform-Associate-003 Exam Braindumps (page: 24)

Page 24 of 45

You have to initialize a Terraform backend before it can be configured.

  1. True
  2. False

Answer(s): B

Explanation:

You can configure a backend in your Terraform code before initializing it. Initializing a backend will store the state file remotely and enable features like locking and workspaces. Reference = [Terraform Backends]



You've used Terraform to deploy a virtual machine and a database. You want to replace this virtual machine instance with an identical one without affecting the database.
What is the best way to achieve this using Terraform?

  1. Use the terraform state rm command to remove the VM from state file
  2. Use the terraform taint command targeting the VMs then run terraform plan and terraform apply
  3. Use the terraform apply command targeting the VM resources only
  4. Delete the Terraform VM resources from your Terraform code then run terraform plan and terraform apply

Answer(s): B

Explanation:

The terraform taint command marks a resource as tainted, which means it will be destroyed and recreated on the next apply. This way, you can replace the VM instance without affecting the database or other resources. Reference = [Terraform Taint]



How would you output returned values from a child module in the Terraform CLI output?

  1. Declare the output in the root configuration
  2. Declare the output in the child module
  3. Declare the output in both the root and child module
  4. None of the above

Answer(s): C

Explanation:

To output returned values from a child module in the Terraform CLI output, you need to declare the output in both the child module and the root module. The child module output will return the value to the root module, and the root module output will display the value in the CLI. Reference = [Terraform Outputs]



If a module declares a variable with a default, that variable must also be defined within the module.

  1. True
  2. False

Answer(s): B

Explanation:

A module can declare a variable with a default value without requiring the caller to define it. This allows the module to provide a sensible default behavior that can be customized by the caller if needed. Reference = [Module Variables]



Page 24 of 45



Post your Comments and Discuss HashiCorp Terraform-Associate-003 exam with other Community members:

Marc commented on October 18, 2024
What the best way to learn terraform?
UNITED STATES
upvote

Chandra commented on October 09, 2024
This is the best and only way of passing this exam as it is extremely hard. Good questions and valid dump.
INDIA
upvote

Madhan commented on September 26, 2024
Useful questions
INDIA
upvote

Abu commented on September 22, 2024
I did not know these questions were available online. I did not believe and trust them and studied quite a lot and just used these questions for practice. But most of the questions turned out to be in the exam.
UNITED STATES
upvote

Sahin commented on July 04, 2024
Need que to learn new things
UNITED STATES
upvote