0.8.2
Please list the resources as a list, for example:
```Error applying plan:
3 error(s) occurred:
If tf is trying to destroy instances, and those instances don't exist, this should not be a fatal error.
TF halted after it couldn't destroy the nonexistent deposed instances.
Hi @kojiromike, and thanks for filing this!
This is an interesting situation... I guess the issue is that Terraform doesn't run the "refresh" action for deposed instances, so it doesn't get the opportunity to detect them as gone and remove them quietly from state.
At first blush it seems like it should be reasonable and safe for Terraform to refresh these just like it does for the primary instances. Presumably the same behavior would be desirable for tainted instances, for the same reason.
I didn't dig deep into the code yet to see how easy such a thing would be to implement. It might require some tweaking of Terraform core to allow the "refresh" result to be written to a non-primary instance in the state, but otherwise it seems pretty straightforward since all of the provider mechanisms are in place to do run these operations.
I'm going to retag this as an AWS issue. I agree with @apparentlymart but it will be a lot more straightforward for the AWS resource to be more robust to handle already-destroyed instances in the destroy step. Other resources are expected to do this.
I'm having this issue also (Terraform 7.7). Could it have anything to do with the increased resource ID length?
Experiencing this issue with Terraform v0.11.7 We are currently blocked on missing deposed resources. Is there a way to clean them up manually?
@teu the cleanest/quickest way I have found to fix this is:
terraform state pull > temp.tfstate
vi temp.tfstate
terraform state push temp.tfstate
the editing manipulation in this case seems pretty straightforward, as there are no ids to alter or other data to add, just stale data to remove - easy to identify looking for "deposed"
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.
Most helpful comment
Experiencing this issue with
Terraform v0.11.7We are currently blocked on missing deposed resources. Is there a way to clean them up manually?