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

terraform plan -destroy doesnt destroy a resource #4452

Closed
gtmtech opened this issue Dec 28, 2015 · 3 comments
Closed

terraform plan -destroy doesnt destroy a resource #4452

gtmtech opened this issue Dec 28, 2015 · 3 comments

Comments

@gtmtech
Copy link

gtmtech commented Dec 28, 2015

I have a remote state file (in s3). When executing terraform show, I can clearly see I have a resource:

aws_instance.foo

(indeed the instance is up and running).

I have removed the code for this resource from my local .tf files, as I no longer need it. Finally the last stage is to clean it up, which I normally do with a separate plan -destroy, then apply

terraform plan -destroy -target=aws_instance.foo

Refreshing Terraform state prior to plan...


No changes. Infrastructure is up-to-date. This means that Terraform
could not detect any differences between your configuration and
the real physical resources that exist. As a result, Terraform
doesn't need to do anything.

Is this incorrect behaviour? - surely it should be trying to destroy the resource.

@gtmtech
Copy link
Author

gtmtech commented Dec 28, 2015

Terraform 0.6.6

@jen20
Copy link
Contributor

jen20 commented Jan 4, 2016

Hi @gtmtech - I believe with Terraform 0.6.6 you're hitting the issue which was fixed in #3912 and released in Terraform 0.6.7. Could you try upgrading the version of Terraform you are using, and reopen this issue if it does not resolve the problem? Thanks!

@jen20 jen20 closed this as completed Jan 4, 2016
@ghost
Copy link

ghost commented Apr 29, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants