Say Goodbye to YAML Hell: Introducing Infra Lang v0.5.1

작성자

카테고리:

← 피드로
DEV Community · TuviDev · 2026-08-26 개발(SW)

TuviDev

If you’ve ever spent 3 hours debugging a missing 2-space indentation in a 1,000-line Kubernetes YAML file or copy-pasting the same service definition between docker-compose.yml, Helm templates, and Terraform HCL — you’re not alone.

Today, I’m excited to share Infra Lang v0.5.1, an open-source, human-friendly Infrastructure-as-Code (IaC) compiler that lets you define your architecture once in a clean, typed DSL and compile it to Kubernetes, Docker Compose, Helm Charts, and Terraform HCL.

🌟 Why Infra Lang?
Instead of choosing between raw YAML files or full imperative programming languages (JS/Python SDKs), Infra Lang provides a declarative, type-safe DSL with built-in FinOps cost calculation, live drift detection, and security linting.

Define Once, Deploy Anywhere
Write a single .infra file for local development (docker compose) and production (Kubernetes / Helm / Terraform):

environment “prod” {
service api {
replicas: 5
}
}

service api {
image: “myorg/api:v1.5.0”
port: 8080
cpu: “500m”
memory: “512Mi”
depends_on: [postgres_db]
env {
NODE_ENV: “production”
}
}

database postgres_db {
type: “postgres”
storage: “20Gi”
}

network_policy “api_sec” {
target: “api”
allow_ingress: [“frontend”]
block_all_ingress: true
}

🔥 What’s New in v0.5.1?
Here are the flagship features packed into the v0.5.1 release:

⚡ 1. Service DAG Dependencies (depends_on)
Declare architectural dependencies (depends_on: [postgres_db]). Infra Lang automatically cross-compiles them into:

Kubernetes: initContainers (busybox waiting for TCP port availability before starting).
Docker Compose: Native depends_on with service_healthy conditions.
Terraform / Helm: Explicit DAG resource dependency edges.

🔒 2. Cloud Secret Stores (secret_store)
Native integration for HashiCorp Vault, AWS Secrets Manager, GCP Secret Manager, and Kubernetes ExternalSecret CRDs (external-secrets.io/v1beta1).

🛡️ 3. Network Policy Security DSL (network_policy)
Declaratively define traffic isolation rules and default-deny policies. Compiles to Kubernetes NetworkPolicy, isolated Compose networks:, or Terraform aws_security_group.

💰 4. FinOps Cost Estimation & CI/CD Guardrails (infra cost)
Know your cloud bill before deploying!

infra cost app.infra –format markdown

Generates clean Markdown tables for GitHub Pull Request comments and fails CI pipelines if monthly costs exceed budget (infra validate –max-cost 200).

🔎 5. Live Drift Detection & Terraform-Style Preview
infra doctor –check-drift –live — Compare running K8s/Compose state against .infra source files.
infra diff app.infra –live — Visual color-coded preview of planned changes before running infra up.

📦 Getting Started in 30 Seconds
Install via PyPI:

pip install –upgrade infra-lang

Compile to your favorite target:

infra compile app.infra -t kubernetes
infra compile app.infra -t compose
infra cost app.infra

VS Code Extension:
Search for Infra Lang in the VS Code Marketplace for live syntax highlighting, diagnostics, and autocompletion!

🤝 Open Source & Community
Infra Lang is 100% open-source under the MIT License, backed by 2,660+ unit tests, 96.7% test coverage, and 100% strict Mypy type safety.

GitHub Repository: github.com/TuviDev/infra-lang
Documentation: TuviDev.github.io/infra-lang
If you find the project useful, drop a ⭐ on GitHub and let me know your thoughts in the comments below!

원문에서 계속 ↗