You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like terraform is making a dependency from example_resource to test_module, when it should instead be making a dependency to test_module's outputs.
References
No response
The text was updated successfully, but these errors were encountered:
Thanks for filing the issue. Terraform has already made the precedent that referring to an entire module does cause a dependency on everything within that module. All references in Terraform resources are handled equally, so when connecting nodes there is no way to differentiate a reference to module.test_module which requires all edges be added, and one which could only make use of the available outputs.
In most cases this lack of differentiation is not visible to the user, but the create_before_destroy situation which forces the re-ordering of operations is a valid concern. We will have to look at increasing the granularity of these references to see if we can build a less conservative graph.
Terraform Version
Terraform Configuration Files
main.tf:
test_module/main.tf
Debug Output
https://gist.github.com/natedogith1/e57533da021cf54b9fa984082127b5af
Expected Behavior
module.test_module[\"a\"].null_resource.base
should be destroyed and then createdActual Behavior
module.test_module[\"a\"].null_resource.base
is created before being destroyed.Steps to Reproduce
terraform init
terraform apply -auto-approve
input="foo"
in main.tf toinput="bar"
terraform apply -auto-approve
Additional Context
doing
terraform plan -out out.plan
andterraform graph -plan out.plan
instead of apply in step 4, results inIt seems like terraform is making a dependency from example_resource to test_module, when it should instead be making a dependency to test_module's outputs.
References
No response
The text was updated successfully, but these errors were encountered: