terragrunt icon indicating copy to clipboard operation
terragrunt copied to clipboard

Terragrunt run-all destroy attempts to delete "dependent" configurations outside the folder on which the destroy is occuring.

Open kansberry-kr opened this issue 2 years ago • 6 comments

If I have a folder structure as follows:

root--------folder1 |------folder2------folder3 | -----folder5 |-----folder4

And I run a run-all destroy against folder2, I would expect the configuration state files to be removed for folder2, folder3 and folder4, as 3 and 4 are nest under folder2. I would not expect folder1 to be deleted if HCL files in any of the 3 folders being deleted depend upon the output of folder1's configuration, but Terragrunt run-all -destroy does this today. Can the code be modified so that only the parent folder on which the "destroy" is being run and any of its children be deleted, but not any dependent Terraform configurations?

kansberry-kr avatar Feb 24 '23 13:02 kansberry-kr