Which flag would you add to terraform plan to save the execution plan to a file?

Prepare for your Terraform Associate Exam with our engaging quiz. Test your knowledge with multiple choice questions and receive detailed explanations to enhance your understanding. Ace your exam with confidence!

The correct choice for saving the execution plan to a file in Terraform is to use the -out=FILE flag. When this flag is specified during the terraform plan command, it directs Terraform to write the generated execution plan to the specified file. This allows users to review the plan later or to use it for applying the changes later on without having to regenerate it.

By utilizing the -out flag, you ensure that you have a manageable way to retain the proposed changes, which can be particularly useful in environments where changes should go through a review or approval process. It also makes it easier to apply the exact same plan later, facilitating consistency in Terraform deployments.

The other choices do not align with Terraform’s syntax for saving an execution plan. For instance, -save=FILE, -output=FILE, and -saveplan=FILE are not valid options in the context of the terraform plan command, which is why they do not serve the intended purpose of saving the plan to a file.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy