Teams now ask AI agents for an EKS cluster or an RDS instance and open the pull request without ever running the code. One public S3 bucket holding Social Security numbers turns that speed into a security incident, and manual console changes that bypass Git leave production drifting away from its source of truth.
In this interview on TFiR, Joey Stout, Solutions Architect at Spacelift, covers how guardrails, local testing and enforced GitOps keep infrastructure as code safe, what to weigh before moving from Terraform to OpenTofu, and where Kubernetes learners get stuck.
Guest: Joey Stout, Solutions Architect at Spacelift
Show: KubeCon+CloudNativeCon
LinkedIn: Joey Stout
Watch the discussion on YouTube
Here is what every platform engineer needs to know.
Technical Deep Dive
Q: How do you add guardrails to AI-built infrastructure as code?
Joey Stout, Solutions Architect at Spacelift, says the biggest change in infrastructure as code over the past year is the need for guardrails, because AI agents now build infrastructure very quickly. Guardrails let a team keep that speed without, for example, creating an S3 bucket that may contain Social Security numbers and then becomes public. Stout’s point is that safeguards have to be built in before the infrastructure ships.
“You don’t want people to be able to just create an S3 bucket that might contain Social Security numbers and then have it become public.” Joey Stout, Solutions Architect, Spacelift
Q: What mistakes do platform teams keep making with infrastructure as code?
Stout says teams are no longer deploying changes locally. They ask an agent for an EKS cluster or an RDS instance, trust the code it writes and open the pull request. His fix is to go back to testing locally and confirm the code creates the infrastructure as expected before the PR. He also notes that Spacelift has an intent product that lets teams vibe code with an agent and spin up infrastructure safely with policies.
“I think what needs to change is going back to the old ways a little bit: testing it locally and making sure that those things actually run and create the infrastructure in the way that you anticipate before you open the pull request.” Joey Stout, Solutions Architect, Spacelift
Q: Where does GitOps fall apart in production and how can teams avoid it?
According to Stout, GitOps falls apart when it is not enforced. Everything is in Git, but someone still makes a manual change in the console, and with no reconciliation loop to undo it, the source of truth and what is actually deployed start drifting. His rule when enforcing GitOps in an organization is that changes go through Git or not at all.
“When I’m enforcing GitOps in an organization, you’re either doing it through Git or you’re not doing it at all.” Joey Stout, Solutions Architect, Spacelift
Q: How should you define GitOps, and what belongs in it?
Stout calls himself a GitOps purist: everything belongs in GitOps, even things not normally managed that way, such as a GitHub organization kept in a versioned repo and changed through pull requests. Some people treat GitOps as only versioning Kubernetes deployments with something like Flux or Argo. He argues that successful organizations use Terraform for GitHub orgs and CloudFormation for cloud services, so everything is GitOps from the beginning.
“I think that a very successful organization manages everything through GitOps.” Joey Stout, Solutions Architect, Spacelift
Q: Terraform vs OpenTofu: what should you check technically before moving?
Stout says the first question is who you want to run your Terraform code. Since the license change, Terraform leaves you building something yourself or using something like HashiCorp’s Terraform Cloud, while OpenTofu opens a much wider set of options, including Spacelift and ENV0. The second factor is community involvement: Stout sees OpenTofu features arriving quickly, including ones the community has wanted from Terraform for a long time.
“It’s about who you want to run your Terraform code.” Joey Stout, Solutions Architect, Spacelift
Q: Why do people get stuck learning Kubernetes?
Stout says the hardest part of Kubernetes is that it abstracts almost everything. A pod abstracts a container, and a deployment and a DaemonSet each abstract a pod. People get stuck choosing between a deployment, an HPA or something else, and those choices become clear once the underlying layers are understood.
“I think the hardest part about Kubernetes is how it’s an abstraction of pretty much everything.” Joey Stout, Solutions Architect, Spacelift
Q: What should you try first when you are stuck with Kubernetes?
Stout tells people to start with something like Docker to understand what an actual container is. Next, look at the Kubernetes pod spec to see how it abstracts parts of regular Docker, then keep building knowledge by reading and by asking AI and coworkers questions. Stout holds a CKA and credits his fast progress to starting with the basics and building up.
“I start with the basics and build on those layers of abstraction afterward.” Joey Stout, Solutions Architect, Spacelift
Resources & Documentation
- IaC and GitOps Deployment, Spacelift’s page on deploying infrastructure as code with GitOps
- OpenTofu Migration, Spacelift’s page on migrating to OpenTofu
- Docker, a starting point for understanding what a container is before learning pods
- Kubernetes pod spec, the next step for seeing how a pod abstracts regular Docker
***
👇 Click to Read Full Raw Transcript
Swapnil Bhartiya: For years, teams treated infrastructure as code as a fix for manual changes and of course slow provisioning. But as code grows across clouds, clusters, and teams, the same problems come back in a new form, including pipelines that nobody owns and Kubernetes setups that only their authors can run. With OpenTofu now an option next to Terraform, And GitOps almost everywhere is getting the foundation right, and that matters more than ever for teams. And to talk about where infrastructure as code is heading and where Kubernetes operators keep getting stuck, today we have with us Joey Stout, Solutions Architect at Spacelift. Joey, it’s great to have you on the show.
Joey Stout: Thank you for having me on here.
Swapnil Bhartiya: It’s my pleasure. Let’s start with the foundation of this discussion, which is, What has changed in how teams manage infrastructure as code over the past year?
Joey Stout: Over the past year, so there’s a lot of AI happening inside of our space. Obviously, that’s kind of throughout the entire industry, but making sure that you’re able to build that infrastructure with guardrails is becoming the more important thing. You don’t want people to be able to just create an S3 bucket that, might contain Social Security numbers and then that become public. Like, that would be really, really bad for your business, obviously. So having those guardrails in place so that, you know, even though you’re building things agenticly very, very quickly, you still have that peace of mind that you’re not going to leak millions of people’s Social Security numbers out to the internet. So I think the guardrail piece is the most important change that we’ve been seeing.
Swapnil Bhartiya: And what mistakes do you see platform teams still make Over and over with infrastructure as code.
Joey Stout: Yeah, they’re not trying to deploy changes locally really anymore. I think a big push with AI is that a lot of people are trusting AI to do what’s right, right out of the gate instead of iterating with that IaC locally and making sure that it actually works. So they’ll talk with their agents and they’ll be like, hey, I need an EKS cluster or an RDS instance. It’ll write the code out for them and then they just kind of trust it and they open up the PR. So I think what needs to kind of change is kind of going back to the old ways a little bit of like testing it locally, making sure that those things actually run and create the infrastructure in the way that you anticipate them to create before you open up the pull request. Just to kind of shoot up, or let’s cut that out, to shout out Spacelift. We have an intent product. that allows you to vibe code with an agent and spin up that infrastructure in a safe way with policies. And that enables you to kind of add that layer of trust to the agents themselves.
Swapnil Bhartiya: Of course, OpenTofu emerged and, you know, of course people, the way community grew was incredible, but still a lot of people are weighing Terraform against OpenTofu. What should they look at technically before they decide to move?
Joey Stout: Honestly, it’s who do you want to run your Terraform code? When you’re using Terraform, since the license changing, your options are building something yourself or using something like HashiCorp’s Terraform Cloud, great product. But if you switch to OpenTofu, your options are vastly wider at that point. You can move to Spacelift, you can move to ENV0, you can use all of these products because that licensing Prohibition is not in place with that anymore. The next thing that I think that they should look at is the community involvement for the OpenTofu product. From my point of view, the acceleration of the features that are being built into OpenTofu are incredible. And we’re creating features that the community has wanted for a very, very long time out of Terraform, and we’re doing that And can
Swapnil Bhartiya: you also talk about where do people get stuck most when it comes to Kubernetes?
Joey Stout: I think the hardest part about Kubernetes is how it’s an abstraction of pretty much everything. So you have a pod and that is an abstraction of a container. You have a deployment and that’s an abstraction of a pod. You have a DaemonSet and that’s an abstraction of a pod as well. So the abstractions confuse a lot of people and they don’t understand how different parts of Kubernetes are essentially just an abstraction of some other thing. And if you understand really the base of Kubernetes, like this is a pod, this is a container, and then other parts of Kubernetes build on top of it, there’s different operators that do different things with their abstractions and the entire world becomes unlocked because really you just need to know What is a pod? And then everything else builds on top of it. And people really get stuck in that loop of, well, do I need to use a deployment or do I need to use XYZ? Do I need an HPA? And it’s like all of these things are simply understood when you understand the layers that are underneath it.
Swapnil Bhartiya: And when they do get stuck, what are the things you tell them to do first or try first?
Joey Stout: I always tell them the first thing that you need to do when you’re getting ready to jump into Kubernetes is start playing around with something like Docker, understand what an actual container is. Once you understand the container, look at something like the pod spec inside of Kubernetes to understand how does that pod spec abstract away some of the things of like regular Docker. And then you just start building knowledge from there, like reading, asking AI questions, asking your coworkers questions, and you grow. I’ll say for myself, I started learning Kubernetes probably 2 years ago. 2019 was like the first real year that I like really used Kubernetes. And I feel like I went from like zero to hero inside of Kubernetes. I have CKA now very, very quickly just because I start with the basics and I build on those layers of abstraction after.
Swapnil Bhartiya: Perfect. Thank you. Now let’s just talk about GitOps for a second. Depending on who you talk to, they define it. How would you define GitOps?
Joey Stout: Yeah, I’m a GitOps purist. Honestly, in the sense of, I think everything belongs inside of GitOps, even things that you wouldn’t normally manage through GitOps, like your GitHub organization itself, I think should be in a Git repo and versioned, and people can open up pull requests to make those changes. Some people will say GitOps is just Kubernetes. Like, I just want to version my Kubernetes deployments and use something like Flux or Argo. But I think that a very successful organization manages everything inside of GitOps. You’re using something like Terraform to create your GitHub orgs. You’re using something like CloudFormation to spin up services in the cloud. Whatever it is, everything should be GitOps from the beginning.
Swapnil Bhartiya: Where does GitOps start to fall apart in production, and how can teams avoid that?
Joey Stout: I think that it falls apart when people don’t enforce GitOps. I used to be an SRE, a DevOps engineer, most of my career actually. And the things that would start falling apart is, okay, we have this in Git, but someone still goes out to the console and makes some manual change. Maybe there’s not a reconciliation loop that undoes that change. And so your source of truth and your what’s actually deployed start drifting, and you’re like, why are we even doing this GitOps thing? That’s the thing that people struggle with the most. When I’m enforcing GitOps in an organization, you’re either doing it through Git or you’re not doing it at all. And that just makes everything so much easier.
Swapnil Bhartiya: Joey, thank you so much for, of course, talking to me and of course talk about Kubernetes, GitOps, and of course Tofu, OpenTofu, not Tofu, OpenTofu, Terraform. The only thing we did not talk about is AI, but if we open that can of worms, we’ll be sitting for the day. But I really appreciate your time and I would love to have you back on the show.
Joey Stout: Thank you. I appreciate it. Thank you for having me on.





