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.
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.
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.
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.
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.
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.
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.
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.
fabiomlop
Highly Voted 2 years, 8 months agogargaditya
1 year, 12 months agoNunyabiznes
1 year, 11 months agoeLJoudi
Most Recent 1 week, 2 days agoSoubi
1 month, 2 weeks agodidistars13
1 month, 3 weeks agoSergiuss95
2 months agoclouddevnoob
4 months, 2 weeks agoerif
5 months agoDeyemzy
5 months, 1 week agohrajkuma
8 months agoHanu1
1 year agosccampos
1 year, 1 month agoluxdolorosa
1 year, 3 months agomaze_
1 year, 5 months agohajurbau
1 year, 6 months agoJayanth
1 year, 7 months agoBusi57
1 year, 7 months agoChandru1988
1 year, 10 months ago