<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Backend on Daniel Corneschi</title><link>https://blog.corneschi.ro/tags/backend/</link><description>Recent content in Backend on Daniel Corneschi</description><generator>Hugo</generator><language>en</language><copyright>Daniel Corneschi</copyright><lastBuildDate>Fri, 09 Oct 2026 22:08:09 +0300</lastBuildDate><atom:link href="https://blog.corneschi.ro/tags/backend/index.xml" rel="self" type="application/rss+xml"/><item><title>terraform.tfstate vs .terraform/terraform.tfstate</title><link>https://blog.corneschi.ro/posts/terraform-tfstate-vs-terraform-directory-state/</link><pubDate>Fri, 09 Oct 2026 00:00:00 +0000</pubDate><guid>https://blog.corneschi.ro/posts/terraform-tfstate-vs-terraform-directory-state/</guid><description>&lt;h2 id="overview"&gt;Overview&lt;/h2&gt;&#10;&lt;p&gt;These two files serve completely different purposes in a Terraform workflow, and confusing them is a common source of frustration.&lt;/p&gt;&#10;&lt;p&gt;Everything below was tested with Terraform 1.16.5 on Debian, with an S3 backend running against a local S3-compatible server. The outputs shown are real.&lt;/p&gt;&#10;&lt;h2 id="terraformtfstate-root-state-file"&gt;terraform.tfstate (Root State File)&lt;/h2&gt;&#10;&lt;p&gt;&lt;strong&gt;Location:&lt;/strong&gt; &lt;code&gt;./terraform.tfstate&lt;/code&gt; (project root, or remote backend)&lt;/p&gt;&#10;&lt;p&gt;This is the &lt;strong&gt;actual state file&lt;/strong&gt; — the source of truth for what Terraform has provisioned. It maps your declared resources to real-world infrastructure objects (IDs, attributes, dependencies).&lt;/p&gt;</description></item></channel></rss>