Terraform Associate Exam QuestionsBrowse all questions from this exam

Terraform Associate Exam - 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 correct answer are accepted.

Show Answer
Correct Answer:

-out=FILENAME

Reference:

https://www.terraform.io/docs/cli/commands/plan.html

Discussion

10 comments
Sign in to comment
Eltooth
Dec 28, 2022

Answer is correct: terraform plan -out=FILE "You can use the optional -out=FILE option to save the generated plan to a file on disk, which you can later execute by passing the file to terraform apply as an extra argument. This two-step workflow is primarily intended for when running Terraform in automation. If you run terraform plan without the -out=FILE option then it will create a speculative plan, which is a description of the effect of the plan but without any intent to actually apply it." https://www.terraform.io/cli/commands/plan

secdaddy
Jun 6, 2023

Question asks for the flag and the flag is -out =FILE is the parameter for the flag No idea if they'll just parse this for -out or if =FILE will be useful terraform plan -out │ Error: Failed to parse command-line flags │ flag needs an argument: -out

thor7
Sep 29, 2023

terraform plan -out=path/to/the/file

Honeywealth
Dec 29, 2022

-out=FILE

kopper2019
Feb 10, 2023

terraform plan -out=FILE

samkobadev
Aug 10, 2023

-out=path Write a plan file to the given path. This can be used asinput to the "apply" command.

Power123
Oct 1, 2023

terraform plan -out =FILE

Dsmo
Jun 4, 2023

Would -out still count as correct?

modarov
Feb 5, 2024

terraform plan -out plan.out

Canarys_Automations
Jul 8, 2024

-out=FILEPATH