Terraform Associate Exam QuestionsBrowse all questions from this exam

Terraform Associate Exam - Question 1


The terraform.tfstate file always matches your currently built infrastructure.

Show Answer
Correct Answer: B

B

Reference:

https://www.terraform.io/docs/language/state/index.html

Discussion

17 comments
Sign in to comment
fabiomlopOption: B
Jun 17, 2022

It doesn't necessarily always matches the current infrastructure, since one can manually change resources and therefore drift from the state configuration. Terraform has no way to know or track changes made outside of it.

gargaditya
Mar 14, 2023

Incorrect,your next terraform plan or terraform refresh will inform you that there is change(provided the deployment was initially done via terraform). tfstate reflects values from actual infrastructure deployed, and it picks drift from actual tf files.

Nunyabiznes
Apr 3, 2023

Incorrect, question does not mention about "your so called " terraform plan or refresh commands

happychiOption: B
Dec 22, 2022

B IS CORRECT

jvuosoOption: B
Apr 19, 2023

Not necessarily

happychiOption: B
Dec 22, 2022

B TEST

Prasad28Option: B
Feb 8, 2023

Answer - False, because state file doesn't matches the current infrastructure unwantedly.

gargadityaOption: B
Mar 14, 2023

Question is a bit ambiguous-technically tfstate file reflects any deployments done VIA TERRAFORM. Even if manual changes were made to a deployment done by terraform,a terraform refresh would actually update the tfstate file to reflect actual infrastructure.(this lets terraform know that there is a mismatch betweeh tfstate and actual tf file).

connecttozeeOption: B
Apr 3, 2023

After deployment, we can change change configuration by manual. So terraform.tfstate may be different with current infra. B is correct

Chandru1988Option: B
May 10, 2023

B is the correct answer

Busi57Option: B
Jul 23, 2023

B is the correct answer

JayanthOption: B
Jul 28, 2023

B. False

hajurbauOption: B
Sep 10, 2023

Question is a bit ambiguous.it says currently built, does it mean to say right after Terraform apply? Anyways feel like B is the answer

MazeOption: B
Sep 21, 2023

The actual provisioned resources may drift, the state represents a snapshot of their status from *the last time* Terraform was run.

luxdolorosaOption: B
Nov 15, 2023

Of course, it's B. For example, when you perform tasks in the AWS web console, you cannot see the .tfstate file. Additionally, if we add that, you can update it to the latest state through 'tf refresh.

sccamposOption: B
Jan 26, 2024

B is the correct

Hanu1Option: A
Feb 13, 2024

The terraform.tfstate file maintains the state of your infrastructure as managed by Terraform. It keeps track of the resources that Terraform has provisioned and their current state.

Impz
May 21, 2024

is this exam valid on 21 May 2024?

hrajkumaOption: B
Jul 12, 2024

Selected Answer: B