Circular dependencies cause !terraform.output function to hang and eventually die · Issue #1216 · cloudposse/atmos · GitHub
More Web Proxy on the site http://driver.im/
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
Attempting to apply either of the components will cause atmos to hang and eventually have its process be killed. This is the case even if the components are first applied without their co-dependency and reapplied afterwards.
Expected Behavior
Ideally, I would expect the apply to be successful if (and only if) the component(s) were first initially created before their dependency was established.
My assumption is that the !terraform.output function has atmos run a terraform output command. It makes sense why the circular dependency is a problem, though it would be ideal if this could be worked around. This issue arises if at any point during the apply a circular dependency is found. When working with security groups in a multi-account environment, this can happen surprisingly often.
If the issue cannot be worked around, the next best thing would be for atmos to detect the circular dependency, write an error to stderr describing that it can't be done, then exit with a non-zero status.
Steps to Reproduce
Apply any component that (1) uses !terraform.output to get the output of another component and (2) has that component also use !terraform.output to get the output of the first component.
See the bug description for a practical example.
Screenshots
No response
Environment
Linux (Ubuntu)
Atmos version 1.171.0
Additional Context
I would be happy to provde additional information if needed.
The text was updated successfully, but these errors were encountered:
Describe the Bug
Given the following two (example) components:
Attempting to apply either of the components will cause atmos to hang and eventually have its process be killed. This is the case even if the components are first applied without their co-dependency and reapplied afterwards.
Expected Behavior
Ideally, I would expect the apply to be successful if (and only if) the component(s) were first initially created before their dependency was established.
My assumption is that the !terraform.output function has atmos run a
terraform output
command. It makes sense why the circular dependency is a problem, though it would be ideal if this could be worked around. This issue arises if at any point during theapply
a circular dependency is found. When working with security groups in a multi-account environment, this can happen surprisingly often.If the issue cannot be worked around, the next best thing would be for atmos to detect the circular dependency, write an error to stderr describing that it can't be done, then exit with a non-zero status.
Steps to Reproduce
Apply any component that (1) uses
!terraform.output
to get the output of another component and (2) has that component also use!terraform.output
to get the output of the first component.See the bug description for a practical example.
Screenshots
No response
Environment
Additional Context
I would be happy to provde additional information if needed.
The text was updated successfully, but these errors were encountered: