Which command is used to view the changes that will be made by applying a Terraform configuration?

Master the HashiCorp Terraform Test with these flashcards and multiple choice questions. Each question includes hints and explanations to prepare you effectively. Set yourself up for success!

The command used to view the changes that will be made by applying a Terraform configuration is indeed the one known as "terraform plan." This command generates an execution plan, showing what actions Terraform will take to align the current state of your infrastructure with the desired state defined in your configuration files.

When you run this command, it compares the existing infrastructure with the configuration you have defined and outputs a detailed list of changes that will occur, including additions, deletions, and modifications. This step is critical in the Terraform workflow, as it allows users to preview and confirm changes before actually applying them, ensuring that any unintended alterations are caught in advance.

The other options do not serve this purpose. "Terraform output" is used to display the outputs defined in your Terraform configuration after application, "terraform change" is not an available command in the Terraform CLI, and "terraform review" does not exist as a command within the Terraform command set. Therefore, "terraform plan" is the correct and essential command for reviewing upcoming changes.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy