My main use case for Spacelift is that I primarily use it for Terraform, focusing on module versioning and deployment. Recently, we started exploring the blueprints option, but the primary focus remains on getting my Terraform landing zones defined and versioned in Spacelift and then testing the modules increment. As we have a GitOps approach, we want every commit and every pull request in Git to run through the set of tests that we have defined in the module in Spacelift. In summary, it serves as the main infrastructure as code tool.
A specific example of how I use Spacelift in my workflow is that we have landing zones in Azure based on the Microsoft concept of landing zones, where we define what we have in an application landing zone or a management landing zone and so on. These landing zones are built using Terraform modules, and each of those modules I have defined in Spacelift. Spacelift is tied to our Git repo, and that's where we develop the modules. For example, we have a SQL module where we have a SQL database module, SQL server module, and so on. They have versioning, and they're all tied together. If we want to deploy that specific SQL as part of a landing zone because an application needs it, we go to the application zone and plug in that module, referencing it from Spacelift. Then we deploy it, and especially if we want to release new features or new versions, we can simply increment the module version and go to the landing zone and do a small increment of the version of the module, which will deploy the new features. This represents approximately 90% of my use cases.
My use case for Spacelift fits into my workflow in many aspects through useful features such as the environments that you can pass between modules, which is not something that comes native in Terraform. Spacelift helps when I have variables that I want to pass between modules, between landing zones in our case, which are the stacks in Spacelift. When I say landing zone, that equals a stack, a Spacelift stack. It's valuable that I can pass the variables between stacks when I have some references, which isn't easily achievable with Terraform. Building the stack dependencies is another feature I use. It is excellent because I can execute stack updates based on module changes, then run that in a dependency flow and execute the change on each stack as I do it, so that I don't forget or miss any of that if I would have been doing this manually. I mentioned earlier that I started exploring the blueprints as well, but I still don't have a strong use case yet for that one in my team at least.



