{"id":13505833,"url":"https://github.com/jckuester/terradozer","last_synced_at":"2025-07-10T22:20:52.470Z","repository":{"id":37102563,"uuid":"220629318","full_name":"jckuester/terradozer","owner":"jckuester","description":"Terraform destroy without configuration files","archived":false,"fork":false,"pushed_at":"2023-02-25T06:42:28.000Z","size":714,"stargazers_count":165,"open_issues_count":13,"forks_count":16,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-27T01:12:06.529Z","etag":null,"topics":["aws","cleanup","cloud","delete","destroy","golang","terraform","tfstate"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jckuester.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-11-09T11:00:12.000Z","updated_at":"2025-02-16T14:28:28.000Z","dependencies_parsed_at":"2024-01-03T02:28:54.478Z","dependency_job_id":"8ab4787e-e27f-4474-9954-af44467506eb","html_url":"https://github.com/jckuester/terradozer","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jckuester%2Fterradozer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jckuester%2Fterradozer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jckuester%2Fterradozer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jckuester%2Fterradozer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jckuester","download_url":"https://codeload.github.com/jckuester/terradozer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248695299,"owners_count":21146952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","cleanup","cloud","delete","destroy","golang","terraform","tfstate"],"created_at":"2024-08-01T00:01:14.954Z","updated_at":"2025-04-13T09:50:47.570Z","avatar_url":"https://github.com/jckuester.png","language":"Go","funding_links":[],"categories":["Tools"],"sub_categories":["Community providers"],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"terradozer\" src=\"https://github.com/jckuester/terradozer/blob/master/img/logo.png\" height=\"180\" /\u003e\n  \u003ch3 align=\"center\"\u003eterradozer\u003c/h3\u003e\n  \u003cp align=\"center\"\u003eTerraform destroy using the state only - no *.tf files needed\u003c/p\u003e\n\u003c/p\u003e\n\n---\n[![Release](https://img.shields.io/github/release/jckuester/terradozer.svg?style=for-the-badge)](https://github.com/jckuester/terradozer/releases/latest)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=for-the-badge)](/LICENSE.md)\n[![Travis](https://img.shields.io/travis/jckuester/terradozer/master.svg?style=for-the-badge)](https://travis-ci.com/jckuester/terradozer)\n[![Codecov branch](https://img.shields.io/codecov/c/github/jckuester/terradozer/master.svg?style=for-the-badge)](https://codecov.io/gh/jckuester/terradozer)\n[![Go Doc](https://img.shields.io/badge/godoc-reference-blue.svg?style=for-the-badge)](http://godoc.org/github.com/jckuester/terradozer)\n\nTerradozer takes a Terraform state file as input and destroys all resources it finds in it - without needing any *.tf\nfiles. This works currently only for resources of the Terraform AWS Provider. If you need support for any other provider,\nlet me know, and I will try to help.\n\nHappy (terra)dozing!\n\n## Example\n\n![](img/example.gif)\n\n## Features\n\n* Nothing will be deleted without your confirmation. Terradozer always lists all resources first and then waits for\n  your approval\n* Using the `-force` flag (dangerous!), terradozer can run in an automated fashion without human interaction and approval,\n  for example, as part of your CI pipeline\n* **Planned**, if you want me to implement this, [please upvote](https://github.com/jckuester/terradozer/issues/9):\n  Allow terradozer pointing directly to a state file stored in S3, i.e., `terradozer s3://path/to/terraform.tfstate`\n* **Planned**, if you want me to implement this, [please upvote](https://github.com/jckuester/terradozer/issues/8):\n  A `-recursive` flag to delete resources of all states found under a given directory, i.e.,\n  `terradozer -recursive s3://bucket-with-states/`. This is especially helpful if\n  you orchestrate Terraform modules with [Terragrunt](https://github.com/gruntwork-io/terragrunt) and store all states\n  under the same directory or in the same S3 bucket. This way, a complete Terragrunt project could be cleaned up in an\n  automated fashion.\n\n## Installation\n\nIt's recommended to install a specific version of terradozer available on the\n[releases page](https://github.com/jckuester/terradozer/releases).\n\nHere is the recommended way to install terradozer v0.1.2:\n\n```bash\n# install it into ./bin/\ncurl -sSfL https://raw.githubusercontent.com/jckuester/terradozer/master/install.sh | sh -s v0.1.2\n```\n\n## Usage\n\nTo delete all resources in a Terraform state file:\n\n    terradozer [flags] \u003cpath/to/terraform.tfstate\u003e\n\nTo see all options, run `terradozer --help`. Provide credentials for the AWS account you want to destroy resources in\nvia the usual [environment variables](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html), e.g.,\n`AWS_PROFILE=\u003cmyaccount\u003e` and `AWS_DEFAULT_REGION=\u003cmyregion\u003e`.\n\nThe region information is needed as it is not stored as part of the state. Having multiple providers with different\nregions in one state file is not yet supported.\n \n## How it works\n\nTerradozer first scans a given Terraform state file (read-only) to find all resources (excluding data sources),\nthen downloads the necessary Terraform Provider Plugins to call the destroy function for each resource on the respective\nCRUD API via GRPC (e.g., calling the Terraform AWS Provider to destroy a `aws_instance` resource).\n\n## Tests\n\nThis section is only relevant if you want to contribute to Terradozer and therefore run the tests. Terradozer has\nacceptance tests, integration tests checking against changes of behaviour in the Terraform Provider API, and of course\nunit tests.\n\nRun unit tests\n\n    make test\n    \nRun acceptance and integration tests\n\n    AWS_PROFILE=\u003cmyaccount\u003e AWS_DEFAULT_REGION=\u003cmyregion\u003e make test-all\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjckuester%2Fterradozer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjckuester%2Fterradozer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjckuester%2Fterradozer/lists"}