πŸ”

TA-003 β€” questions

Page 19 of 19 Β· 368 total questions.

Topic 5 Β· Question 369

Your team is using a version 3.1.4 of a module from the public Terraform Registry, and they’re worried about possible breaking changes in future versions of the module. Which version argument should you add to the module block to prevent newer versions from being used?

  • Aversion = β€œ3.1.4” (correct answer)
  • Bversion = β€œ< 3.2”
  • Cversion = β€œ!=3.1.5”
  • Dversion = β€œ~>3.1.4”
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: version = β€œ3.1.4”

Topic 6 Β· Question 370

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

  • Aterraform plan -refresh-only
  • Bterraform show -json
  • Cterraform apply =lock=false (correct answer)
  • Dterraform plan -target=state
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: terraform apply =lock=false

Explanation

terraform apply executes the dependency-aware changes required to make infrastructure match the configuration.

Topic 6 Β· Question 371

The -refresh-only parameter will update your state file when used with terraform plan.

  • ATrue
  • BFalse (correct answer)
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: False

Topic 6 Β· Question 372

It is _________ to change the Terraform backend from the default local backend to a different one after performing your first terraform apply.

  • Adiscouraged
  • Bmandatory
  • Cimpossible
  • Doptional (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: optional

Topic 7 Β· Question 373

If you manually destroy resources within your infrastructure, what is the best practice for reflecting this change in Terraform?

  • ARun terraform import to reflect the changes in Terraform state.
  • BManually update the state file to remove the destroyed resources.
  • CRemove the resource definition from your file and run terraform apply -refresh-only. (correct answer)
  • DThe change will happen automatically during the next terraform apply.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Remove the resource definition from your file and run terraform apply -refresh-only.

Explanation

terraform apply executes the dependency-aware changes required to make infrastructure match the configuration.

Topic 7 Β· Question 374

When a check block’s assertion fails, Terraform blocks the current operation from executing.

  • ATrue
  • BFalse (correct answer)
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: False

Topic 8 Β· Question 375 Β· Select all that apply

Which of the following does HCP Terraform perform during a health assessment for a workspace? (Choose two.)

  • ASentinel policy checks
  • BResource drift detection (correct answer)
  • CEstimate infrastructure cost
  • DCheck block validation (correct answer)
  • ETerraform test execution
Reveal answer & explanation
Correct answer: B, D

The correct answer is B, D. Option B: Resource drift detection Option D: Check block validation

Explanation

Infrastructure drift occurs when remote objects change outside Terraform so their real attributes differ from configuration and state.

Topic 8 Β· Question 376

You can configure multiple cloud blocks in your Terraform configuration to connect your workspace to both HCP Terraform and your Terraform Enterprise instance.

  • ATrue
  • BFalse (correct answer)
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: False

Showing questions 361–368 of 368 Β· Page 19 of 19