Services

Open source

EN

KUBICAST 179 - Day 2 with IaC

Are you creating code that can be used after your infrastructure is created?

mansplainer

João Brito

In episode 179 of Kubicast, we welcome Renan Lira to explore, in running text, the challenges and learnings of the much-discussed "Day Two" of IaC. We start by talking about the journey from a greenfield environment to a manageable state in production, highlighting the importance of strict naming conventions and code review policies that prevent unwanted drifts. Renan shares how small decisions, such as standardizing paths and variables, can prevent future headaches and ensure consistency between development, staging, and production.

Transitioning from Greenfield to Day Two

The conversation moves on to Smart Abstraction, where we learn how to create infrastructure modules that are generic enough to serve different projects, but simple enough not to generate unnecessary complexity. Instead of a single monolithic module full of conditionals, Renan recommends breaking the logic into smaller parts with clear input and output interfaces. This approach maintains flexibility and reduces maintenance effort, facilitating the constant evolution of the infrastructure.

Pipelines, Testing and Security

Finally, we dive into best practices for putting IaC into CI/CD pipelines, featuring auto-formatting, linters, and plan validations in pull requests that help catch unwanted changes before deployment. Automated testing, from syntax to integration scenarios in a sandbox, ensures resources are provisioned as expected. Renan also reinforces the use of Policies as Code (with OPA or Sentinel) and least-privilege IAM permissions to raise the bar on security and compliance.



Join our early access program and get a more secure environment in moments! https://getup.io/zerocve


🎧 Listen to Kubicast also on Spotify, and share it with the whole DevOps crew that is writing code worse than vibe-coding 😂

Newsletter Getup.

Atualizações sobre Kubernetes e Software Supply Chain Security todos os meses.

Operating Kubernetes in production for more than 13 years. With Quor, this experience extends to software supply chain security as well.