Terraform Associate Practice Exam

Question: 1 / 400

Does the 'terraform.tfstate' file always match your currently built infrastructure?

Yes, it always matches

No, it does not match

The 'terraform.tfstate' file does not always match the currently built infrastructure because it serves as a source of truth for Terraform about the resources it manages, but it relies on several factors to remain in sync. Terraform state reflects the latest known state of the infrastructure as recorded during the last successful Terraform operation. If manual changes are made directly to the infrastructure outside of Terraform, or if there's a failure during an apply operation, the state file can become out of sync with the actual infrastructure. Additionally, if someone modifies the infrastructure without going through Terraform (e.g., via a cloud provider console or CLI), those changes won't be reflected in the 'terraform.tfstate' file, leading to discrepancies. Therefore, while Terraform aims to maintain the accuracy and consistency of the state file, it is not guaranteed to always match the live infrastructure, especially if external modifications occur or if operations did not complete successfully.

Get further explanation with Examzify DeepDiveBeta

It sometimes matches

Only if there are no changes made

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy