July 9, 2025josh-pollara

AI in Infrastructure as Code: Petar Nikov on Avoiding AI Pitfalls

Petar Nikov

Petar Nikov

Founder at Cloud Solutions

Infrastructure Architecture & DevOps Expert

About Petar

Petar is the visionary behind Cloud Solutions - a professional services company delivering AWS and DevOps consulting for fast-growing startups. As a cloud consultant specializing in AWS, Terraform, and infrastructure automation, he works closely with both engineering teams and decision-makers. Most of his customers are startups that have just secured funding and need to scale quickly without introducing long-term technical debt. Cloud Solutions helps them avoid common pitfalls - like fragmented Terraform states, broken CI/CD rollbacks, missing observability, or insecure cloud setups. It's all about building their AWS and DevOps right from the start, so they never have to "fix it later."

Current Focus: Open-Source Terraform Module Library

Right now, Petar and his team are getting ready to launch one of the largest open-source Terraform module libraries that's ever been built. It's the result of five years of hands-on AWS work - battle-tested, production-grade modules that they've used across dozens of fast-moving startups. They've seen firsthand how messy cloud setups can get when teams start from scratch or copy random code off the internet. So they're putting out what they wish existed when they started: clean, opinionated building blocks that actually reflect best practices. Open source has always been a core value for Cloud Solutions, and this is their way of giving back - and raising the baseline for how AWS infrastructure gets done.

AI should be treated as a powerful assistant, not a decision-maker.

Q1: Where have you seen AI genuinely transform infrastructure, and where's it mostly hype?

AI absolutely has a place in infrastructure and DevOps - but it's not the silver bullet some make it out to be. Where it genuinely shines is in accelerating repetitive tasks: generating boilerplate, writing documentation, or quickly surfacing relevant configurations. In DevOps specifically, AI is powerful for monitoring, anomaly detection, smarter alerting, and spotting patterns humans would miss.

"Letting AI design your infrastructure or write Terraform from scratch often leads to fragile setups that no one fully understands."

Where it gets overhyped, however, is when people treat it as a replacement for architectural thinking. AI should always complement deep architectural thinking, not replace it.

Q2: How are team roles evolving as AI becomes commonplace?

I'm observing a growing tension between speed and accountability. Developers can move faster with AI-assisted code, but platform teams often find themselves cleaning up the resulting mess, like misconfigured IAM roles, missing lifecycle policies, or modules that break during rollbacks. Meanwhile, security teams frequently get looped in far too late in the process.

If platform and security teams embed their expertise earlier in the workflow, AI becomes an accelerator rather than a liability.

The opportunity is clear: through pre-approved IaC modules, policies-as-code, and stronger CI checks, teams can harness AI effectively. But that shift requires cultural changes, not just better tooling. Teams need to move beyond treating infrastructure as an afterthought and start owning it together, upfront.

Q3: Fast-forward five years: how do you see us managing infrastructure day-to-day?

Five years feels like a lifetime in tech, especially with new AI models appearing every week. It's tough to predict specific tools, but I see a fundamental shift happening less in the technologies we use and more in our mindset toward infrastructure. Manual provisioning will (hopefully) vanish, replaced entirely by declarative intent and automation, whether through Terraform, platform APIs, or entirely new abstractions.

AI will likely occupy a space between product and platform teams, translating high-level product requirements into carefully reviewed infrastructure changes.

The most successful teams won't be the ones with the trendiest tech stack, but those who build robust guardrails around speed and clarity.


Josh's Note

Petar's point about embedding platform and security expertise earlier in the workflow resonates with us at Terrateam. We're consistently seeing that the most successful teams treat infrastructure as a shared, upfront responsibility rather than an afterthought, exactly the mindset shift Petar emphasizes here.


Follow Petar's work:

  • LinkedIn - Follow for daily insights from real AWS and DevOps work
  • Cloud Solutions Blog - Published twice weekly focusing on helping startups navigate cloud challenges the right way
  • GitHub - Watch for the upcoming release of their full Terraform module library and other open-source tools