Exam4Training

When is the best time to run terraform validate?

You ate making changes to existing Terraform code to add some new infrastructure.

When is the best time to run terraform validate?
A . After you run terraform apply so you can validate your infrastructure
B . Before you run terraform apply so you can validate your provider credentials
C . Before you run terraform plan so you can validate your code syntax
D . After you run terraform plan so you can validate that your state file is consistent with your infrastructure

Answer: C

Explanation:

This is the best time to run terraform validate, as it will check your code for syntax errors, typos, and missing arguments before you attempt to create a plan. The other options are either incorrect or unnecessary.

Exit mobile version