Skip to content
Discussion options

You must be logged in to vote

In some cases, you can avoid all code errors in terraform and trigger a destroy of all resources by creating a new empty module:

  • Create a new module called empty with a single main.tf file that is empty.
  • Ensure the empty module points to the state file of the module you are trying to destroy
    • If you are using terragrunt, update the terraform.source attribute in terragrunt.hcl to point to the empty module.
    • If you are using terraform, update the empty module to have a terraform.backend config that points to the state file of your original module.
  • Now run terragrunt init && terragrunt plan (or terraform init && terraform plan). If you don't have nested providers (provider blocks nested in…

Replies: 2 comments

This comment has been hidden.

Comment options

You must be logged in to vote
0 replies
Answer selected by yorinasub17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
2 participants