Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Terraform Associate All Questions

View all questions & answers for the Terraform Associate exam

Exam Terraform Associate topic 1 question 1 discussion

Actual exam question from HashiCorp's Terraform Associate
Question #: 1
Topic #: 1
[All Terraform Associate Questions]

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

  • A. True
  • B. False
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
fabiomlop
Highly Voted 2 years, 5 months ago
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.
upvoted 33 times
gargaditya
1 year, 8 months ago
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.
upvoted 1 times
Nunyabiznes
1 year, 7 months ago
Incorrect, question does not mention about "your so called " terraform plan or refresh commands
upvoted 5 times
...
...
...
clouddevnoob
Most Recent 1 month ago
Selected Answer: B
The correct answer is false because Terraform performs a refresh operation before any operation to update the state with the real infrastructure. This means the state file might not always perfectly match the current infrastructure if there are discrepancies between the state and the actual resources.
upvoted 1 times
...
erif
1 month, 2 weeks ago
Selected Answer: B
The terraform.tfstate file reflects Terraform's understanding of the infrastructure, but it may not always match the actual state of the infrastructure if changes have been made manually (outside of Terraform) or if the state file hasn't been updated after such changes. In those cases, the state file would be outdated or inaccurate.
upvoted 1 times
...
Deyemzy
1 month, 2 weeks ago
B. False The terraform.tfstate file reflects the infrastructure as it was last known to Terraform, but changes made outside of Terraform (manually or through other tools) may not be reflected in the state file until a terraform refresh or terraform plan is run to reconcile the differences.
upvoted 1 times
...
hrajkuma
4 months, 1 week ago
Selected Answer: B
upvoted 1 times
...
Hanu1
9 months, 1 week ago
Selected Answer: A
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.
upvoted 1 times
...
sccampos
10 months ago
Selected Answer: B
B is the correct
upvoted 1 times
...
luxdolorosa
1 year ago
Selected Answer: B
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.
upvoted 1 times
...
maze_
1 year, 2 months ago
Selected Answer: B
The actual provisioned resources may drift, the state represents a snapshot of their status from *the last time* Terraform was run.
upvoted 1 times
...
hajurbau
1 year, 2 months ago
Selected Answer: B
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
upvoted 1 times
...
Jayanth
1 year, 3 months ago
B. False
upvoted 1 times
...
Busi57
1 year, 4 months ago
Selected Answer: B
B is the correct answer
upvoted 1 times
...
Chandru1988
1 year, 6 months ago
B is the correct answer
upvoted 1 times
...
jvuoso
1 year, 7 months ago
Selected Answer: B
Not necessarily
upvoted 2 times
...
connecttozee
1 year, 7 months ago
After deployment, we can change change configuration by manual. So terraform.tfstate may be different with current infra. B is correct
upvoted 1 times
...
gargaditya
1 year, 8 months ago
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).
upvoted 1 times
...
Prasad28
1 year, 9 months ago
Answer - False, because state file doesn't matches the current infrastructure unwantedly.
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...