_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN
Let's talk

Pulumi — Infrastructure in TypeScript Instead of HCL

24. 04. 2019 1 min read CORE SYSTEMSdevelopment
Pulumi — Infrastructure in TypeScript Instead of HCL

Terraform taught us infrastructure as code. But HCL has limits — conditionals are cumbersome, loops are limited, no unit tests. Pulumi says: write infrastructure in a real programming language.

Pulumi vs. Terraform

Pulumi: TypeScript/Python/Go, full programming language, existing tooling (IDE, linter, test framework). Terraform: HCL, declarative, huge provider ecosystem, battle-tested.

Example in TypeScript

import * as aws from "@pulumi/aws";
import * as k8s from "@pulumi/kubernetes";

const cluster = new aws.eks.Cluster("prod", {
    vpcConfig: { subnetIds: subnets.ids }
});

const app = new k8s.apps.v1.Deployment("api", {
    spec: { replicas: 3, ... }
}, { provider: cluster.provider });

Advantages of a Real Language

  • Loops, conditions, functions — the full power of the language
  • Unit tests for infrastructure
  • IDE support (autocomplete, type checking)
  • Code sharing as npm/pip packages

Why We’re Sticking with Terraform for Now

Provider ecosystem. Community. Hiring — finding a Terraform engineer is easier. And HCL’s declarative approach is simpler for review than imperative TypeScript. But we’re watching Pulumi closely.

Pulumi Is the Future for Complex Infrastructure

For simple setups, Terraform is enough. For complex infrastructure with logic, testing, and componentization, Pulumi has a significant advantage.

pulumiiactypescriptterraform
Share:

CORE SYSTEMS

Stavíme core systémy a AI agenty, které drží provoz. 15 let zkušeností s enterprise IT.

Need help with implementation?

Our experts can help with design, implementation, and operations. From architecture to production.

Contact us