jckuester / terradozer Goto Github PK
View Code? Open in Web Editor NEWTerraform destroy without configuration files
License: MIT License
Terraform destroy without configuration files
License: MIT License
terradozer s3://path/to/terraform.tfstate
Allow terradozer pointing directly to a state file stored in S3.
It looks like terradozer does not support to remove network_interface resources?
• aws_network_interface error=Error detaching ENI: OperationNotPermitted: You are not allowed to manage 'ela-attach' attachments.
status code: 400, request id: d21b2dbf-6aca-4784-b02f-3502c6e51a70 id=eni-044a15a3b3e1d1162
in my case my tfstate.json
consists of aws_network_interface
resources only.
👋 it looks like terradozer 1.0.3 is not marked as latest release yet, any reason about that? Thanks!
Hello Jan-Christoph, it's me again :)
Have you planned to support others providers than aws, like GCP by chance?
Cheers
Here is the actual resource:
"aws_db_event_subscription.tfer--210242135891": {
"type": "aws_db_event_subscription",
"depends_on": [],
"primary": {
"id": "210242135891",
"attributes": {
"id": "210242135891",
"name": "210242135891"
},
"meta": {
"schema_version": 0
},
"tainted": false
},
"deposed": [],
"provider": "provider.aws"
}
And here is the run log:
terradozer tfstate.json
• READING STATE
• using state file=tfstate.json
• downloaded and installed provider name=aws version=2.68.0
• configured provider name=aws version=2.68.0
• cannot refresh resource state error=failed to read current state of resource: error retrieving RDS Event Subscription (210242135891): InvalidParameterValue: Invalid subscription name: 210242135891
status code: 400, request id: 40ad084d-d654-4dca-b343-0ed056816ed1 resource_id=210242135891 type=aws_db_event_subscription
• SHOWING RESOURCES THAT WOULD BE DELETED (DRY RUN)
• ALL RESOURCES HAVE ALREADY BEEN DELETED
$ terradozer -dry-run tfstate.json
• READING STATE
• using state file=tfstate.json
• downloaded and installed provider name=aws version=2.68.0
Error:️ failed to initialize Terraform providers: failed to configure provider (name=aws, version=2.68.0): Invalid AWS Region:
terradozer -recurive <directory/containing/states>
Delete resources of all states found under a given directory. This is especially helpful if you orchestrate Terraform projects with Terragrunt and store states under the same directory or in the same S3 bucket. This way, a complete Terragrunt project can be cleaned up in an automated fashion.
In the sentence "Having multiple providers wit different regions in one state file is not yet supported." there is an 'h' missing in the 'with' :)
Hi Jan-Christoph,
I'd like to use this rather often (especially while working on terraform-aws-modules), but it does not seem to work with later version of Terraform:
$ terradozer --version
version: 0.1.2
commit: 48e53cb
built at: 2020-06-28T13:28:01Z
using: go1.13.12
$ terradozer -dry-run terraform.tfstate
Error:️ failed to read Terraform state file: failed reading terraform.tfstate as a statefile: state snapshot was created by Terraform v1.2.3, which is newer than current v0.12.25; upgrade to Terraform v1.2.3 or greater to work with this state
Am I doing something wrong?
Error installing onto a 2021 16" Macbook Pro (M1 Pro)
curl -sSfL https://raw.githubusercontent.com/jckuester/terradozer/master/install.sh | sh -s v0.1.2 jckuester/terradozer crit platform darwin/arm64 is not supported. Make sure this script is up-to-date and file request at https://github.com/jckuester/terradozer/issues/new
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.