Error from pipeline with unsupported folder structure
I've a blocking issue here, I have this structure from Ref Arch — `dev/_regional/sns-topic/terragrunt.hcl` (the standard) And I added — `dev/_regional/sns-topic/non-prod-alarms/terragrunt.hcl` (deployed manually at some point) The issue now is that I can delete the latest resource (non-prod-alarms) and I’m getting this error through the deployer: ``` /tmp/tmpjgj8cqjd/dev. Underlying error: open /tmp/tmpjgj8cqjd/dev/us-east-2/_regional/sns-topic/_envcommon/networking/sns-topics.hcl: no such file or directory ``` Which obviously doesn’t exist (the path) and I understand this issue is because I have to 2 terragrunt.hcl in the path, but how can I fix it?
If the resource hasn't been deployed, then you can ignore the deploy error from the pipeline for that commit, as it will self resolve in the next commit when it tries to deploy other things. If you have mixed this change with other changes and the error is blocking the roll out of the other resources, then the best course of action is to isolate this particular change into a separate branch so that the pipeline will only act on the relevant changes that need to be deployed. If on the other hand you want to use this folder structure, in general it is not recommended to nest folders like this because it breaks the operating model of Terragrunt, where it depends on using `find_in_parent_folders` to do its thing. The recommended approach is to put `non-prod-alarms` in a folder parallel to `sns-topic`, or to move the `terragrunt.hcl` in `sns-topic` to another subfolder so it doesn’t get picked up by `find_in_parent_folders`. If you really want to use this folder structure, then you will need to modify the code so that it replaces usage of `find_in_parent_folders()` (without args) with `find_in_parent_folders("common.hcl")/terragrunt.hcl`, which should be the equivalent in a reference architecture setup.