AI can write your infrastructure code. There's a reason most teams won't let it.

By The New Stack

Share:

Key Concepts

  • Infrastructure as Code (IaC): Managing and provisioning infrastructure through machine-readable definition files rather than manual hardware configuration.
  • Open Tofu: An open-source fork of Terraform, created in response to HashiCorp’s transition to the Business Source License (BSL).
  • HCL (HashiCorp Configuration Language): The declarative language used to define infrastructure in Terraform and Open Tofu.
  • Spacelift: A platform designed to manage IaC workflows, focusing on collaboration, policy enforcement, and automation.
  • Intent: A Spacelift feature that allows LLMs to interact directly with cloud provider APIs, bypassing traditional HCL pipelines for faster, more tactile infrastructure management.
  • Open Policy Agent (OPA): A policy-as-code engine used to enforce guardrails and compliance within infrastructure workflows.
  • Stateful Infrastructure: Systems (like databases) where the current configuration and data are persistent, making changes inherently riskier than stateless application code.

1. The Evolution of Infrastructure as Code

Marcin Vyshensky explains that while tools like Terraform were revolutionary for solo operators, they struggle in "multiplayer mode." Much like Git required platforms like GitHub to manage collaboration, IaC requires specialized tooling to handle the complexities of stateful infrastructure. Spacelift was built to provide this collaborative layer, ensuring that teams can manage infrastructure safely without the risks associated with manual or uncoordinated changes.

2. The Open Tofu Initiative

  • The Catalyst: On August 10, 2023, HashiCorp moved Terraform from an open-source license to the Business Source License (BSL).
  • The Response: Spacelift and other industry partners, in collaboration with the Linux Foundation, launched Open Tofu to preserve the open-source lineage of cloud management tools.
  • Technical Divergence: While Open Tofu maintains API compatibility with Terraform, it has implemented features long requested by the community that were previously ignored, such as:
    • End-to-end state encryption.
    • Provider-for-each: Enabling simultaneous management of multiple regions or accounts.
    • Open Telemetry integration: Providing deeper visibility into infrastructure runs.
    • Codebase Refactoring: Moving away from "spaghetti code" to a modular, well-architected structure to encourage external contributions.

3. AI and the Future of Infrastructure

Vyshensky highlights a shift in how infrastructure is defined:

  • The "Portuguese Phrasebook" Analogy: AI makes it easy to generate perfect HCL code, but users may lack the underlying expertise to understand the "response" (the implications or errors) from the infrastructure.
  • Democratization vs. Risk: There is a growing demand for non-experts (e.g., data scientists) to provision infrastructure. However, because infrastructure is stateful, an AI error (like deleting a database) is far more catastrophic than a bug in application code.
  • Spacelift Intent: This framework allows LLMs to talk directly to cloud providers. It uses OPA to enforce deterministic guardrails, ensuring that even if an LLM generates the configuration, it cannot violate organizational security or operational policies.

4. Balancing Speed and Control

Vyshensky argues that the industry is moving toward a spectrum of choices rather than a single "best" way to deploy:

  • Ceremonial vs. Fast: Organizations can choose between "ceremonial" workflows (PRs, human reviews, full IaC) and "fast" workflows (AI-driven, direct API interaction).
  • Hybrid Architectures: Spacelift acts as "glorified glue," allowing teams to use the right tool for the job. For example, while Spacelift uses Open Tofu for general infrastructure, they use AWS CloudFormation for application deployments because CloudFormation provides atomic rollback capabilities that Open Tofu lacks.

5. Notable Quotes

  • "If you think about a lot of what other tools are doing for the cloud... it was like removing a foundational block from an otherwise open-source stack." — On the impact of HashiCorp’s license change.
  • "You don't always have to buy the whole pig to eat a sausage." — On the need for flexible, non-ceremonial infrastructure workflows.
  • "I usually counter [concerns about AI trust] by saying that humans are non-deterministic as well... There's nothing new conceptually in having LLMs offer guardrails as well."

Synthesis and Conclusion

The core takeaway is that the infrastructure landscape is transitioning from a rigid, manual-heavy "ceremonial" model to a more fluid, AI-augmented model. The success of this transition depends on deterministic guardrails (like OPA) that allow for high velocity without sacrificing safety. By providing a platform that acts as a bridge between AI-driven speed and enterprise-grade control, Spacelift aims to empower platform teams to delegate infrastructure tasks safely while maintaining the integrity of their production environments.

Chat with this Video

AI-Powered

Load the transcript when you're ready to chat so the initial page stays lighter.

Ready to summarize another video?

Summarize YouTube Video