amazon-web-servicesaws-cloudformation

Cloudformation exports cannot be deleted


I'm trying to delete a stack on Cloudformation but it return a rollback UPDATE_ROLLBACK_COMPLETE. I have removed all dependencies from the template and all the outputs as well but the error persists.

Is there a way to force a delete? or even better just to delete the outpus?

I removed the outputs from the template and ran update-stack but without success. The error persist.


Solution

  • Have you created a circular reference issue? I’ve run into this in the past, even referencing an export from the current stack in that stack (easy to do when you make updates). The solution is to modify the stacks that are referencing The export, and removing the resource(s) that has the reference. Update the stack with the reference(s) removed and then you can do the delete. If you no longer have the start template you can modify it in the console by editing the existing stack, or you can copy the template from the console and edit it elsewhere. Any way you go about it, the key is updating the stack(s) with ImportValue references removed, then deleting the stack(s).