Exam Terraform Associate All QuestionsBrowse all questions from this exam
Question 215

What is a key benefit of the Terraform state file?

    Correct Answer: D

    A key benefit of the Terraform state file is that it represents a source of truth for resources provisioned with Terraform. The state file keeps track of the current state of the infrastructure resources that are being managed by Terraform. It contains detailed information about the resources, their properties, and interdependencies, which Terraform uses to determine what changes need to be made to align the actual infrastructure with the desired state defined in the configuration files.

Discussion
Agil09Option: D

D is correct

gekkehenkOption: D

The idea of a state file is to operate as a source of truth. If the infrastructure deviates from that it is capable of fixing that.

Blitz123Option: D

Though the Answer is "D", he is the tricky aspect Lets just say, we provisioned Infrastructure through Terraform using config files, then someone goes to CLI and makes a manual change. Once you apply terraform Refresh, you no longer have all the information in statefile which is provisioned through terrform. Just like option C, you make changes to confi files and you apply, desired state, current state are same and state file does represents the desired state expressed by the Terraform code files.

campsOption: D

it's D

ZeppoonstreamOption: D

D. A state file represents a source of truth for resources provisioned with Terraform A key benefit of the Terraform state file is that it represents a source of truth for resources provisioned with Terraform. The state file is used to keep track of the current state of the infrastructure resources that are being managed by Terraform. It contains information about the resources, their properties, and the dependencies between them. The state file is used by Terraform to determine what changes need to be made to the infrastructure to reach the desired state defined in the configuration files. A. A state file can be used to schedule recurring infrastructure tasks, is not a benefit of state file. B. A state file represents a source of truth for resources provisioned with a public cloud console, is not a benefit of state file. C. A state file represents the desired state expressed by the Terraform code files, is not a benefit of state file.

NirmsOption: D

D is correct