Closed mgopez closed 1 day ago
A workaround for this issue is to delete the state file of module_1
and re-run terragrunt run-all init
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for raising this issue.
Describe the bug Given the following Terragrunt structure:
Where
module_2
has an explicit dependency onmodule_1
.If
module_1
fails its deploy, but has a resource in it like anazurecaf
naming resource. Thatazurecaf
naming resource is created, and the state file ofmodule_1
is populated with the following:The state file exists with elements in the resource list but the actual Terraform resource that
module_1
contains is not deployed due to some error and is not present in the resource list.Now for every subsequent run of the project, during the
init
phase we can observe the following:It appears that during the init phase that due to the existence of the state file and the resources list is populated, Terragrunt attempts to resolve
some_derived_value
from the state file rather than using the mock defined in themock_outputs
block.To Reproduce Steps to reproduce the behavior, code snippets and examples which can be used to reproduce the issue.
module_1
failing to deploy the Terraform resource.terragrunt run-all init
.module_1
failed to deploy, but itsazurecaf
naming resource was created.module_1
.terragrunt run-all init
.You should see the error now.
Expected behavior Terragrunt checks the resources list and verifies if the Terraform resource is deployed by checking the type of the element.
Versions