Agentic Infrastructure Lifecycle Management

AI assistants can generate infrastructure code quickly, but speed alone does not make infrastructure safe, repeatable, or maintainable. The interesting problem is not how to get an AI agent to write Terraform, Compose, Ansible, or Kubernetes manifests. It is how to design infrastructure projects where an agent can make useful changes without bypassing the engineering practices that make infrastructure-as-code reliable.

This talk presents a practical framework for using agentic tools across the infrastructure lifecycle: build, update, test, deploy, and destroy. Using Docker Compose-based applications as an approachable example, we'll examine how familiar IaC practices such as pinned dependencies, modular and DRY configuration, environment separation, secrets management, idempotency, automated testing, and reviewable changes become even more important when an AI agent is modifying the repository.

We'll also look at the agent-facing side of the problem: repository instructions, scoped context, validation commands, tests, and explicit guardrails that give an agent enough information to work effectively without giving it unrestricted authority over production-impacting decisions.

Although the examples use Docker Compose, the patterns apply broadly to Terraform/OpenTofu, Ansible, Kubernetes, Helm, Pulumi, CI/CD systems, and other infrastructure-as-code environments.

The goal is not better prompt engineering. It is better infrastructure engineering: building repositories where humans, automation, and AI agents can all make changes through the same predictable, testable, and reviewable lifecycle.

Cody Lee Cochran

Cody Lee Cochran is a Principal Engineer and Enterprise Architect for a small, family-owned defense contractor, Global InfoTek, Inc. He is an open-source contributor, former Red Hat Certified Engineer, and former Racker. He enjoys using Linux, Bash programming, and automating all the things.