Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add option to delete remote state file after running terraform destroy #25754

Open
maxcbc opened this issue Aug 5, 2020 · 0 comments
Open

add option to delete remote state file after running terraform destroy #25754

maxcbc opened this issue Aug 5, 2020 · 0 comments

Comments

@maxcbc
Copy link

maxcbc commented Aug 5, 2020

Current Terraform Version

0.12.28

Use-cases

I create PR environments for a number of my repos, these create entirely separate resources, they're spun up, some tests are run, and then they're torn down.

This is great, and terraform is great at this. The only evidence of the existence of this environment is that it leaves behind a remote state file with 0 resources in it. I remove it with the aws cli, but it'd be nice if this was an option on terraform destroy.

Attempted Solutions

I use aws s3 rm

Proposal

add a --delete-remote-state option for terraform destroy which deletes the remote state if all resources have been successfully removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant