Today, we are excited to announce that we have enhanced our Terraform/OpenTofu Orchestration Engine to execute Terraform/OpenTofu Stacks in any specific order/hierarchy dependent on other related Stacks’ output.
Stack Dependencies allow ControlMonkey users to create a flow of interdependent stacks that run in a custom-defined order, with critical information passed from one to another.
This provides a deeper granularity and control over what triggers each Terraform/OpenTofu Stack and the inputs and outputs required for a successful execution.
Example: Let’s take a company with a complex infrastructure comprising multiple cloud environments with few Terraform/OpenTofu Stacks strongly linked to one another to deploy the entire infrastructure.
Building the infrastructure is a linear process in which these stacks must be orchestrated precisely, starting with Account Configuration, Access Control & Authentication, Networking, Databases, Compute, Alerting, Monitoring, etc.
Moreover, the information generated in each Stack has to be passed along to the next Stack in the execution Queue.
A typical scenario would involve passing along critical networking information from the ‘network’ stack to the ‘compute resources’ stack so they can have the right network configuration, for example.
With ControlMonkey Stack Dependencies, you can now easily define the order, triggers, inputs, and outputs of each Terraform/OpenTofu Stack to customize your infrastructure orchestration.
Cloud engineering teams no longer need to manually collect the data produced in each stack deployment to configure the next stack. ControlMonkey collects the stack’s required outputs in runtime and automatically inserts the data into the next stack in the deployment flow.
![](https://controlmonkey.io/wp-content/uploads/2024/06/image.png)
The Benefits of Stack Dependencies:
- Link Terraform/OpenTofu Stacks. Users can tightly manage stacks when closely connected due to interdependencies.
- Direct Information Transfer. Variables can now be passed directly from one stack to another. There is no need to fetch this information within the stack; you can simply use it as the value of a variable. This shortens execution times and eliminates the possibility of misconfiguration.
To summarize, with Stack Dependencies, you now have the option to connect two stacks to execute one after another and pass information created in the runtime of one stack to another.
This enables stronger interconnection between stacks and saves time by building the infrastructure automatically without the need to manually trigger pipeline executions.
Managing Terraform/OpenTofu at scale?
Our Experts are available for a quick call so you can learn more about the future of Terraform/OpenTofu Automation.