nerdexam
HashiCorp

TERRAFORM-ASSOCIATE-003 · Question #106

terraform validate confirms that your infrastructure matches the Terraform state file.

The correct answer is B. False. terraform validate does not confirm that your infrastructure matches the Terraform state file. It only checks whether the configuration files in a directory are syntactically valid and internally consistent. To confirm that your infrastructure matches the Terraform state file…

Use the core Terraform workflow

Question

terraform validate confirms that your infrastructure matches the Terraform state file.

Options

  • ATrue
  • BFalse

How the community answered

(46 responses)
  • A
    26% (12)
  • B
    74% (34)

Explanation

terraform validate does not confirm that your infrastructure matches the Terraform state file. It only checks whether the configuration files in a directory are syntactically valid and internally consistent. To confirm that your infrastructure matches the Terraform state file, you need to use terraform plan or terraform apply with the -refresh-only option.

Topics

#terraform validate#configuration validation#CLI commands#state file

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-003 Practice