Uploaded October 2025 | Updated September 2026, 2 weeks ago
As developers use AI agents to generate Terraform configurations, ensuring compliance with internal policies becomes a critical challenge. This talk presents a new approach: Integrating an MCP (Model Context Protocol) server that connects AI agents with existing OPA (Open Policy Agent) policies. By querying these policies, the server extracts real-time constraints, such as allowed instance types, required tags or open ports, and feeds them back into the generation prompt. This allows developers to request infrastructure in natural language (“I need a server on AWS”) and receive compliant Terraform code by default. The session includes a prototype demo and explores how this pattern bridges policy, AI and Infrastructure as Code inside modern developer workflows.
About the speaker:
Óscar Cobles Montes, Senior Infrastructure Consultant
Óscar is a Senior Software Engineer and Cloud Architect with over 14 years of experience building and automating cloud infrastructure at scale. He specializes in Infrastructure as Code, cloud governance, and platform automation. Throughout his career, he has supported enterprise clients in adopting DevOps practices, improving developer experience, and ensuring policy compliance across cloud environments.
A few months ago, Óscar joined the Thoughtworks family, where he focuses on infrastructure and developer enablement. This is his first time speaking at XConf, where he’s excited to share a new approach to policy-aware infrastructure generation using AI agents.
thoughtworks.com/xconf
As developers use AI agents to generate Terraform configurations, ensuring compliance with internal policies becomes a critical challenge. This talk presents a new approach: Integrating an MCP (Model Context Protocol) server that connects AI agents with existing OPA (Open Policy Agent) policies. By querying these policies, the server extracts real-time constraints, such as allowed instance types, required tags or open ports, and feeds them back into the generation prompt. This allows developers to request infrastructure in natural language (“I need a server on AWS”) and receive compliant Terraform code by default. The session includes a prototype demo and explores how this pattern bridges policy, AI and Infrastructure as Code inside modern developer workflows.
About the speaker:
Óscar Cobles Montes, Senior Infrastructure Consultant
Óscar is a Senior Software Engineer and Cloud Architect with over 14 years of experience building and automating cloud infrastructure at scale. He specializes in Infrastructure as Code, cloud governance, and platform automation. Throughout his career, he has supported enterprise clients in adopting DevOps practices, improving developer experience, and ensuring policy compliance across cloud environments.
A few months ago, Óscar joined the Thoughtworks family, where he focuses on infrastructure and developer enablement. This is his first time speaking at XConf, where he’s excited to share a new approach to policy-aware infrastructure generation using AI agents.
thoughtworks.com/xconf










