-
Hi, We are working on moving our resources to a new region (region-A) and removing the ones created in the old one (region-B). As part of this process we’re destroying the resources from CLI using terragrunt destroy and then deleting the folders/files and creating a PR and merging it using GW Ref Arch pipeline. Everything was working as expected until we went to remove the sample-app folders, since we had removed other resources used by the sample-app like the load balancers, now we’re getting a dependency error like this one:
We already deleted these resources from the CLI ( Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The Reference Architecture can be destroyed/undeployed following reverse dependency order, to avoid this issue where existing modules depend on already destroyed resources. Here's an example undeploy documentation that you would have received in your Ref Arch deployment (look under /docs). First recommendation, if you still have the code in your version control for the old region (region-B), restore the already deleted module and redeploy. Then undeploy using the reverse dependency order in that undeploy doc. This is a known path. If that's not feasible because there's too many to restore, you can use the |
Beta Was this translation helpful? Give feedback.
-
This suggestion worked, you can mark the response as answered |
Beta Was this translation helpful? Give feedback.
The Reference Architecture can be destroyed/undeployed following reverse dependency order, to avoid this issue where existing modules depend on already destroyed resources.
Here's an example undeploy documentation that you would have received in your Ref Arch deployment (look under /docs).
First recommendation, if you still have the code in your version control for the old region (region-B), restore the already deleted module and redeploy. Then undeploy using the reverse dependency order in that undeploy doc. This is a known path.
If that's not feasible because there's too many to restore, you can use the
skip_outputs
flag in thedependency
blocks for the resources that have already been …