{
    "url": "https://delaparra-services.nl/knowledge-hub/terraformtfstate",
    "locale": "en",
    "title": "terraform.tfstate: Knowledge hub | DeLaParra Services",
    "description": "The default local state file. A JSON document; never edit it by hand — use the state subcommands.",
    "alternates": {
        "en": "https://delaparra-services.nl/knowledge-hub/terraformtfstate",
        "nl": "https://delaparra-services.nl/nl/kennisbank/terraformtfstate"
    },
    "formats": {
        "csv": "https://delaparra-services.nl/knowledge-hub/terraformtfstate.csv",
        "md": "https://delaparra-services.nl/knowledge-hub/terraformtfstate.md",
        "json": "https://delaparra-services.nl/knowledge-hub/terraformtfstate.json",
        "zip": "https://delaparra-services.nl/knowledge-hub/terraformtfstate.zip",
        "pdf": "https://delaparra-services.nl/knowledge-hub/terraformtfstate.pdf"
    },
    "downloads": [
        {
            "url": "https://delaparra-services.nl/knowledge-hub/terraformtfstate.csv",
            "encodingFormat": "text/csv",
            "name": "terraformtfstate.csv"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/terraformtfstate.json",
            "encodingFormat": "application/json",
            "name": "terraformtfstate.json"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/terraformtfstate.md",
            "encodingFormat": "text/markdown",
            "name": "terraformtfstate.md"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/terraformtfstate.pdf",
            "encodingFormat": "application/pdf",
            "name": "terraformtfstate.pdf"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/terraformtfstate.zip",
            "encodingFormat": "application/zip",
            "name": "terraformtfstate.zip"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/terraformtfstate/skills.zip",
            "encodingFormat": "application/zip",
            "name": "terraformtfstate-skills.zip"
        }
    ],
    "markdown": "1. [Home](<https://delaparra-services.nl/>) \n1. [Knowledge hub](<https://delaparra-services.nl/knowledge-hub>) \n1. [terraform.tfstate](<https://delaparra-services.nl/knowledge-hub/terraformtfstate>)\n\n  \n\nCategory: Terraform \n\n# terraform.tfstate\n\n  Explained by [Reinier de la Parra](<https://delaparra-services.nl/about>)  Updated November 25, 2026    \n\n## What is terraform.tfstate?\n\n \n\nterraform.tfstate: The default local state file. A JSON document; never edit it by hand — use the state subcommands. ` terraform.tfstate ` is the default local state file, a JSON document where Terraform records every resource it manages and its current attributes. It is created in your working folder when you use local state. That is fine for experiments, but risky for real infrastructure: it lives on one machine, has no locking and often contains secrets in plain text.\n\n \n\nDefinition source [Coders Lingo](<https://coderslingo.com/resources/open-dataset/>), [CC BY 4.0](<https://creativecommons.org/licenses/by/4.0/>)\n\n \n\n## Frequently asked questions about terraform.tfstate\n\n  \n\n### What should you keep in mind with terraform.tfstate?\n\n \n\nNever edit it by hand. Use ` terraform state ` subcommands, or ` moved ` and ` import ` blocks, for any changes. Never commit it to Git; add ` *.tfstate ` and ` *.tfstate.backup ` to ` .gitignore `. For anything shared or long-lived, move to a remote backend with locking and versioning. ` terraform init -migrate-state ` copies existing local state to the new backend.\n\n    \n\n### What does an example of terraform.tfstate look like?\n\n \n\n```\ncat terraform.tfstate | jq .resources\n```\n\n \n\n## At a glance\n\n   CategoryTerraform Explained by[Reinier de la Parra](<https://delaparra-services.nl/about>) UpdatedNovember 25, 2026\n\n \n\n## More Terraform terms\n\n \n\n- [taint](<https://delaparra-services.nl/knowledge-hub/taint-terraform>) \n- [ternary](<https://delaparra-services.nl/knowledge-hub/ternary>) \n- [terraform block](<https://delaparra-services.nl/knowledge-hub/terraform-block>) \n- [validate](<https://delaparra-services.nl/knowledge-hub/validate>) \n- [variable](<https://delaparra-services.nl/knowledge-hub/variable>) \n- [workspace](<https://delaparra-services.nl/knowledge-hub/workspace>)\n\n \n\n[All terms starting with T](<https://delaparra-services.nl/knowledge-hub#letter-t>)\n\n \n\n## Skills\n\n \n\n- ### Terraform safe workflow\n\n \n\nUse when running or changing Terraform (or OpenTofu) - init, fmt, validate, plan, apply, destroy, import, state mv/rm, refresh, workspaces, remote backends, state locking, drift, taint/-replace. Enforces a plan-review-apply workflow and protects state.\n\n [View skill](<https://delaparra-services.nl/skills/terraform-safe-workflow>) [Download zip](<https://delaparra-services.nl/skills/terraform-safe-workflow/download>) \n- ### Terraform Module Library\n\n \n\nBuild reusable Terraform modules for AWS, Azure, GCP, and OCI infrastructure following infrastructure-as-code best practices. Use when creating infrastructure modules, standardizing cloud provisioning, or implementing reusable IaC components.\n\n [View skill](<https://delaparra-services.nl/skills/terraform-module-library>) [Download zip](<https://delaparra-services.nl/skills/terraform-module-library/download>)\n\n [Download all skills (zip)](<https://delaparra-services.nl/knowledge-hub/terraformtfstate/skills.zip>)\n\n \n\n## Manuals\n\n \n\n- [Kubernetes and Terraform: do you need them?](<https://delaparra-services.nl/manuals/kubernetes-en-terraform-heb-je-het-nodig>)\n\n \n\n## Related services\n\n \n\n- [Custom software and web applications](<https://delaparra-services.nl/services#service-03>)\n\nPerhaps your customers need somewhere to download their invoices, or your staff are managing bookings in a spreadsheet.\n\n \n\n## Need any help?\n\n \n\nStuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.\n\n  [Get in touch](<https://delaparra-services.nl/availability>)\n\n[HTML version](https://delaparra-services.nl/knowledge-hub/terraformtfstate)\n",
    "structured_data": {
        "@context": "https://schema.org",
        "@graph": [
            {
                "@type": "Organization",
                "@id": "https://delaparra-services.nl/#practice",
                "logo": "https://delaparra-services.nl/logo.png",
                "name": "DeLaParra Services",
                "legalName": "DeLaParra Services",
                "url": "https://delaparra-services.nl/",
                "description": "Bespoke software, web applications and mobile apps, developed in Laravel by a single developer in Groningen. Fixed price agreed in advance, full source code provided upon delivery.",
                "email": "info@delaparra-services.nl",
                "address": {
                    "@type": "PostalAddress",
                    "addressLocality": "Groningen",
                    "addressRegion": "Groningen",
                    "addressCountry": "NL"
                },
                "areaServed": "Groningen, the Netherlands",
                "knowsLanguage": [
                    "en",
                    "nl"
                ],
                "knowsAbout": [
                    "Web design and development",
                    "App development",
                    "Custom software and web applications",
                    "OpenSpec",
                    "AI code review",
                    "Your own coding agent"
                ],
                "founder": {
                    "@id": "https://delaparra-services.nl/#person"
                }
            },
            {
                "@type": "FAQPage",
                "@id": "https://delaparra-services.nl/knowledge-hub/terraformtfstate#webpage",
                "url": "https://delaparra-services.nl/knowledge-hub/terraformtfstate",
                "name": "terraform.tfstate: Knowledge hub | DeLaParra Services",
                "description": "The default local state file. A JSON document; never edit it by hand — use the state subcommands.",
                "isPartOf": {
                    "@id": "https://delaparra-services.nl/#website"
                },
                "about": {
                    "@type": "DefinedTerm",
                    "@id": "https://delaparra-services.nl/knowledge-hub/terraformtfstate#term",
                    "name": "terraform.tfstate",
                    "description": "The default local state file. A JSON document; never edit it by hand — use the state subcommands.",
                    "termCode": "terraformtfstate",
                    "url": "https://delaparra-services.nl/knowledge-hub/terraformtfstate",
                    "inLanguage": "en",
                    "keywords": "Terraform",
                    "dateModified": "2026-11-25T17:46:31+00:00",
                    "inDefinedTermSet": {
                        "@id": "https://delaparra-services.nl/knowledge-hub#terms"
                    },
                    "isPartOf": {
                        "@id": "https://delaparra-services.nl/knowledge-hub#dataset"
                    },
                    "subjectOf": [
                        {
                            "@id": "https://delaparra-services.nl/knowledge-hub/terraformtfstate#webpage"
                        },
                        {
                            "@id": "https://delaparra-services.nl/knowledge-hub/terraformtfstate#dataset"
                        }
                    ]
                },
                "inLanguage": "en",
                "breadcrumb": {
                    "@id": "https://delaparra-services.nl/knowledge-hub/terraformtfstate#breadcrumb"
                },
                "mainEntity": [
                    {
                        "@type": "Question",
                        "name": "What is terraform.tfstate?",
                        "acceptedAnswer": {
                            "@type": "Answer",
                            "text": "The default local state file. A JSON document; never edit it by hand — use the state subcommands. terraform.tfstate is the default local state file, a JSON document where Terraform records every resource it manages and its current attributes. It is created in your working folder when you use local state. That is fine for experiments, but risky for real infrastructure: it lives on one machine, has no locking and often contains secrets in plain text."
                        }
                    },
                    {
                        "@type": "Question",
                        "name": "What should you keep in mind with terraform.tfstate?",
                        "acceptedAnswer": {
                            "@type": "Answer",
                            "text": "Never edit it by hand. Use terraform state subcommands, or moved and import blocks, for any changes. Never commit it to Git; add *.tfstate and *.tfstate.backup to .gitignore. For anything shared or long-lived, move to a remote backend with locking and versioning. terraform init -migrate-state copies existing local state to the new backend."
                        }
                    },
                    {
                        "@type": "Question",
                        "name": "What does an example of terraform.tfstate look like?",
                        "acceptedAnswer": {
                            "@type": "Answer",
                            "text": "cat terraform.tfstate | jq .resources"
                        }
                    }
                ],
                "author": {
                    "@id": "https://delaparra-services.nl/#person"
                },
                "mentions": [
                    {
                        "@id": "https://delaparra-services.nl/skills/terraform-safe-workflow#skill"
                    },
                    {
                        "@id": "https://delaparra-services.nl/skills/terraform-module-library#skill"
                    },
                    {
                        "@id": "https://delaparra-services.nl/manuals/kubernetes-en-terraform-heb-je-het-nodig#article"
                    }
                ]
            },
            {
                "@type": "BreadcrumbList",
                "@id": "https://delaparra-services.nl/knowledge-hub/terraformtfstate#breadcrumb",
                "itemListElement": [
                    {
                        "@type": "ListItem",
                        "position": 1,
                        "name": "Home",
                        "item": "https://delaparra-services.nl/"
                    },
                    {
                        "@type": "ListItem",
                        "position": 2,
                        "name": "Knowledge hub",
                        "item": "https://delaparra-services.nl/knowledge-hub"
                    },
                    {
                        "@type": "ListItem",
                        "position": 3,
                        "name": "terraform.tfstate"
                    }
                ]
            },
            {
                "@type": "Person",
                "@id": "https://delaparra-services.nl/#person",
                "name": "Reinier de la Parra",
                "url": "https://delaparra-services.nl/about"
            },
            {
                "@type": "Dataset",
                "@id": "https://delaparra-services.nl/knowledge-hub/terraformtfstate#dataset",
                "name": "terraform.tfstate",
                "description": "The default local state file. A JSON document; never edit it by hand — use the state subcommands.",
                "url": "https://delaparra-services.nl/knowledge-hub/terraformtfstate",
                "identifier": "https://delaparra-services.nl/knowledge-hub/terraformtfstate#dataset",
                "about": {
                    "@id": "https://delaparra-services.nl/knowledge-hub/terraformtfstate#term"
                },
                "creator": {
                    "@id": "https://delaparra-services.nl/#practice"
                },
                "publisher": {
                    "@id": "https://delaparra-services.nl/#practice"
                },
                "license": "https://creativecommons.org/licenses/by/4.0/",
                "creditText": "Coders Lingo (https://coderslingo.com/resources/open-dataset/), CC BY 4.0",
                "isAccessibleForFree": true,
                "inLanguage": "en",
                "keywords": "Terraform",
                "version": "2026-11-25",
                "dateModified": "2026-11-25T17:46:31+00:00",
                "isPartOf": {
                    "@type": "Dataset",
                    "@id": "https://delaparra-services.nl/knowledge-hub#dataset",
                    "name": "IT terms from A to Z",
                    "url": "https://delaparra-services.nl/knowledge-hub"
                },
                "includedInDataCatalog": {
                    "@type": "DataCatalog",
                    "@id": "https://delaparra-services.nl/knowledge-hub#catalog",
                    "name": "Knowledge hub data catalog",
                    "url": "https://delaparra-services.nl/knowledge-hub"
                },
                "distribution": [
                    {
                        "@type": "DataDownload",
                        "name": "terraformtfstate.csv",
                        "encodingFormat": "text/csv",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/terraformtfstate.csv",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:31+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "terraformtfstate.json",
                        "encodingFormat": "application/json",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/terraformtfstate.json",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:31+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "terraformtfstate.md",
                        "encodingFormat": "text/markdown",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/terraformtfstate.md",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:31+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "terraformtfstate.pdf",
                        "encodingFormat": "application/pdf",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/terraformtfstate.pdf",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:31+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "terraformtfstate.zip",
                        "encodingFormat": "application/zip",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/terraformtfstate.zip",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:31+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "terraformtfstate-skills.zip",
                        "encodingFormat": "application/zip",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/terraformtfstate/skills.zip",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:31+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    }
                ]
            }
        ]
    }
}