Free Terraform-Associate-003 Exam Braindumps

Pass your HashiCorp Certified: Terraform Associate (003) exam with these free Questions and Answers

Page 2 of 36
QUESTION 1

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

  1. A. You want Terraform to ignore a resource on the next apply
  2. B. You want Terraform to destroy all the infrastructure in your workspace
  3. C. You want to force Terraform to destroy a resource on the next apply
  4. D. You want to force Terraform to destroy and recreate a resource on the next apply

Correct Answer: D
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 2

You modified your Terraform configuration and run Terraform plan to review the changes. Simultaneously, your teammate manually modified the infrastructure component you are working on. Since you already ran terraform plan locally, the execution plan for terraform apply will be the same.

  1. A. True
  2. B. False

Correct Answer: B
The execution plan for terraform apply will not be the same as the one you ran locally with terraform plan, if your teammate manually modified the infrastructure component you are working on. This is because Terraform will refresh the state file before applying any changes, and will detect any differences between the state and the real resources.

QUESTION 3

You want to define a single input variable to capture configuration values for a server. The values must represent memory as a number, and the server name as a string.
Which variable type could you use for this input?

  1. A. List
  2. B. Object
  3. C. Map
  4. D. Terraform does not support complex input variables of different types

Correct Answer: B
This is the variable type that you could use for this input, as it can store multiple attributes of different types within a single value. The other options are either invalid or incorrect for this use case.

QUESTION 4

What Terraform command always causes a state file to be updated with changes that might have been made outside of Terraform?

  1. A. Terraform plan –refresh-only
  2. B. Terraform show –json
  3. C. Terraform apply –lock-false
  4. D. Terraform plan target-state

Correct Answer: A
This is the command that always causes a state file to be updated with changes that might have been made outside of Terraform, as it will only refresh the state file with the current status of the real resources, without making any changes to them or creating a plan.

QUESTION 5

FILL IN THE BLANK
What is the name of the default file where Terraform stores the state?
Type your answer in the field provided. The text field is not case-sensitive and all variations of the correct answer are accepted.
Solution:
The name of the default file where Terraform stores the state is terraform.tfstate. This file contains a JSON representation of the current state of the infrastructure managed by Terraform. Terraform uses this file to track the metadata and attributes of the resources, and to plan and apply changes. By default, Terraform stores the state file locally in the same directory as the configuration files, but it can also be configured to store the state remotely in a backend. References = [Terraform State], [State File Format]

Does this meet the goal?

  1. A. Yes
  2. B. No

Correct Answer: A

Page 2 of 36

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