Terraform Associate Practice Exam

Access More Questions
Will terraform apply fail if terraform plan was not executed first?
Correct Answer:
False
Explanation:
When you use Terraform, the command `terraform apply` is designed to execute the changes specified in a configuration file based on the current state of your infrastructure. It does not require a `terraform plan` to be run first for the apply to be successful. The primary role of `terraform plan` is to generate an execution plan, which shows you what actions Terraform will take to reach the desired state defined in your configuration. However, it's not a prerequisite for running `terraform apply`. You can apply changes directly without reviewing the plan first by simply executing `terraform apply`. In practice, while it's recommended to run `terraform plan` before applying changes—especially in a production environment—to ensure that you understand the upcoming changes and can catch any unintended actions, Terraform is fully capable of applying configurations based on the current state even if the plan command has not been executed beforehand. Thus, the application of the changes will not inherently fail just because a plan was not previously generated, leading to the conclusion that the correct answer is that it will not fail simply due to the absence of a prior plan step.

Access more questions from this quiz

Continue to Terraform Associate Practice Exam for more practice questions and the full quiz experience.

Access More Questions