nerdexam
HashiCorp

TA-002-P · Question #61

FILL BLANK Which flag would you add to terraform plan to save the execution plan to a file? Type your answer in the field provided. The text field is not case-sensitive and all variations of the…

The correct answer is A. -out=FILENAME. The '-out' flag is used with 'terraform plan' to save the generated execution plan to a specified file, enabling it to be later applied using 'terraform apply'.

Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)

Question

FILL BLANK Which flag would you add to terraform plan to save the execution plan to a file? Type your answer in the field provided. The text field is not case-sensitive and all variations of the correct answer are accepted.

Options

  • A-out=FILENAME

How the community answered

(64 responses)
  • A
    100% (64)

Why each option

The '-out' flag is used with 'terraform plan' to save the generated execution plan to a specified file, enabling it to be later applied using 'terraform apply'.

A-out=FILENAMECorrect

The 'terraform plan -out=FILENAME' command creates a plan file that contains the actions Terraform will take to achieve the desired state, which can then be used with 'terraform apply FILENAME' to ensure the exact same plan is executed. This prevents any drift between planning and applying.

Concept tested: Terraform plan output to file

Source: https://developer.hashicorp.com/terraform/cli/commands/plan

Topics

#terraform plan#CLI flags#saving execution plan#command line interface

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice