HashiCorp Terraform Infrastructure as Code (IaC) Practice Test 2026 - Free Terraform Exam Questions and Study Guide

Session length

1 / 20

What does the `terraform plan` command do?

It destroys the existing infrastructure

It creates a new execution plan

The `terraform plan` command is instrumental in Terraform's workflow as it generates an execution plan detailing the changes that will be made to the infrastructure. This command evaluates the current state of the infrastructure compared to the desired state defined in the Terraform configuration files. By doing so, it identifies what resources need to be added, changed, or destroyed to achieve the desired configuration.

Generating this plan is crucial for users as it enables them to review the proposed changes before actually applying them. This review process helps to avoid unintentional modifications to the infrastructure, providing an opportunity to validate and understand the implications of the commands that would follow, specifically when `terraform apply` is used to enact those planned changes.

The other options do not accurately describe the functionality of the `terraform plan` command. For instance, it does not destroy infrastructure, create resources, or initialize the working directory— tasks that are part of other commands such as `terraform destroy`, `terraform apply`, and `terraform init`, respectively. Understanding the specific role of each command in Terraform is essential for effective infrastructure management.

It applies changes to the infrastructure

It initializes the working directory

Next Question
Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy