Transcript
Stack dependencies are a way to create an order for stacks to deploy in Spacelift and also reference variable outputs from between them. So I have an OpenTofu, an Ansible, and a Kubernetes stack here, and you can see that the OpenTofu stack is creating an output to the Ansible stack, and the Ansible stack then triggers the Kubernetes stack. For my use case, I create a few EC2 instances, install Kubernetes on them, and then deploy workloads on that Kubernetes cluster. Here we could trigger the OpenTofu stack, the first one in the dependencies, and just watch this run. I'll skip through this. Okay, so first we could see the changes that it has some outputs and output inventory tofu, and if we go to dependencies, this is where that output goes to with this Ansible stack, and it takes the inventory and then deploys it. And I'll quickly just skip through this so you don't have to wait for it. Now if we go back to the dependencies, we can see the final stack, Kubernetes, that is going to deploy, and we can check the track run it's planning, and now it will just deploy those jobs to the cluster that we just created. I'm going to include the docs page in the video description just so you could see the different examples that we have to deploy some more complicated stack dependencies. Thanks for watching!