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.
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).
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, 5 months agogargaditya
1 year, 8 months agoNunyabiznes
1 year, 7 months agoclouddevnoob
Most Recent 1 month agoerif
1 month, 2 weeks agoDeyemzy
1 month, 2 weeks agohrajkuma
4 months, 1 week agoHanu1
9 months, 1 week agosccampos
10 months agoluxdolorosa
1 year agomaze_
1 year, 2 months agohajurbau
1 year, 2 months agoJayanth
1 year, 3 months agoBusi57
1 year, 4 months agoChandru1988
1 year, 6 months agojvuoso
1 year, 7 months agoconnecttozee
1 year, 7 months agogargaditya
1 year, 8 months agoPrasad28
1 year, 9 months ago