---
title: "Infrastructure as code in any language – Pulumi IaC"
description: "Write infrastructure in TypeScript, Python, Go, C#, Java, or YAML and deploy to any cloud, with previews and tests before anything changes."
url: "https://www.pulumi.com/product/infrastructure-as-code/"
image: "https://www.pulumi.com/assets/og/product/infrastructure-as-code.png"
---

# Infrastructure as code in any language – Pulumi IaC

Write infrastructure in TypeScript, Python, Go, C#, Java, or YAML and deploy to any cloud, with previews and tests before anything changes.

**Infrastructure as code** in any language

Write infrastructure in the languages you already know and deploy to AWS, Azure, Google Cloud, Kubernetes, and hundreds more providers. Coding agents get the same type checking and tests you use.

- [Get started](https://www.pulumi.com/up/)
- [Contact us](https://www.pulumi.com/contact/?form=sales)

## Write infrastructure code in your **favorite language**

TypeScript/JavaScript, Python, Go, .NET, Java, YAML, and HCL. Get autocomplete, type checking, and all your favorite IDE features. Build on AWS, Azure, Google Cloud, Kubernetes, and hundreds of other providers. Our open source engine is Apache 2.0 licensed and will always be free.

- **Use real code, not DSLs:** Write infrastructure with loops, conditionals, functions, and classes. Reuse code, catch errors at compile time, and refactor with confidence.
- **Build on any cloud:** Access AWS, Azure, Google Cloud, Kubernetes, and hundreds of providers through a unified, consistent API. Same-day updates for new cloud features.
- **Test before you ship:** Preview changes before deploying them. Write unit tests for your infrastructure. Run integration tests against ephemeral environments.

## Open source core. **Pulumi Cloud built-in.**

Our [open-source engine](https://github.com/pulumi/pulumi) runs your deployments, and Pulumi Cloud's Free edition adds state management and secrets. As you scale, add advanced features or self-host Pulumi Cloud.

> We use Pulumi widely at Wiz. It enabled our product to support multi-cloud and to scale quickly — scaling and driving hundreds of thousands of infrastructure updates every day.
>
> — Yarin Miran, Senior Software Engineer, Wiz

- **350,000+** engineers building with Pulumi
- **4,000+** companies in production
- **200+** cloud and service providers

## Ship faster with **reusable components**

Create reusable infrastructure components that can be used in any language. Package common patterns once and use them everywhere. Publish your components to the Pulumi Registry, npm, PyPI, NuGet, or any package manager.

```typescript
import * as awsx from "@pulumi/awsx";

const vpc = new awsx.ec2.Vpc("vpc", {
    subnetSpecs: [
        { type: awsx.ec2.SubnetType.Public, cidrMask: 22 },
        { type: awsx.ec2.SubnetType.Private, cidrMask: 20 },
    ],
}, { protect: true });

export const vpcId = vpc.vpcId;
export const privateSubnetIds = vpc.privateSubnetIds;
export const publicSubnetIds = vpc.publicSubnetIds;
```

```python
import pulumi
import pulumi_awsx as awsx

vpc = awsx.ec2.Vpc("vpc",
    awsx.ec2.VpcArgs(
        subnet_specs=[
            awsx.ec2.SubnetSpecArgs(type=awsx.ec2.SubnetType.PUBLIC, cidr_mask=22),
            awsx.ec2.SubnetSpecArgs(type=awsx.ec2.SubnetType.PRIVATE, cidr_mask=20),
        ],
    ),
    opts=pulumi.ResourceOptions(protect=True),
)

pulumi.export("vpcId", vpc.vpc_id)
pulumi.export("privateSubnetIds", vpc.private_subnet_ids)
pulumi.export("publicSubnetIds", vpc.public_subnet_ids)
```

```go
package main

import (
    "github.com/pulumi/pulumi-awsx/sdk/v3/go/awsx/ec2"
    "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        vpc, err := ec2.NewVpc(ctx, "vpc", &ec2.VpcArgs{
            SubnetSpecs: []ec2.SubnetSpecArgs{
                {Type: ec2.SubnetTypePublic, CidrMask: pulumi.IntRef(22)},
                {Type: ec2.SubnetTypePrivate, CidrMask: pulumi.IntRef(20)},
            },
        }, pulumi.Protect(true))
        if err != nil {
            return err
        }

        ctx.Export("vpcId", vpc.VpcId)
        ctx.Export("privateSubnetIds", vpc.PrivateSubnetIds)
        ctx.Export("publicSubnetIds", vpc.PublicSubnetIds)
        return nil
    })
}
```

```csharp
using Pulumi;
using System.Collections.Generic;
using Pulumi.Awsx.Ec2.Inputs;
using Ec2 = Pulumi.Awsx.Ec2;

return await Deployment.RunAsync(() =>
{
    var vpc = new Ec2.Vpc("vpc", new()
    {
        SubnetSpecs =
        {
            new SubnetSpecArgs { Type = Ec2.SubnetType.Public, CidrMask = 22 },
            new SubnetSpecArgs { Type = Ec2.SubnetType.Private, CidrMask = 20 },
        },
    }, new ComponentResourceOptions { Protect = true });

    return new Dictionary<string, object?>
    {
        ["vpcId"] = vpc.VpcId,
        ["privateSubnetIds"] = vpc.PrivateSubnetIds,
        ["publicSubnetIds"] = vpc.PublicSubnetIds,
    };
});
```

```java
package myproject;

import java.util.Arrays;
import com.pulumi.Pulumi;
import com.pulumi.awsx.ec2.Vpc;
import com.pulumi.awsx.ec2.VpcArgs;
import com.pulumi.awsx.ec2.enums.SubnetType;
import com.pulumi.awsx.ec2.inputs.SubnetSpecArgs;
import com.pulumi.resources.ComponentResourceOptions;

public class App {
    public static void main(String[] args) {
        Pulumi.run(ctx -> {
            var vpc = new Vpc("vpc",
                VpcArgs.builder()
                    .subnetSpecs(Arrays.asList(
                        SubnetSpecArgs.builder().type(SubnetType.Public).cidrMask(22).build(),
                        SubnetSpecArgs.builder().type(SubnetType.Private).cidrMask(20).build()
                    ))
                    .build(),
                ComponentResourceOptions.builder().protect(true).build());

            ctx.export("vpcId", vpc.vpcId());
            ctx.export("privateSubnetIds", vpc.privateSubnetIds());
            ctx.export("publicSubnetIds", vpc.publicSubnetIds());
        });
    }
}
```

- **Production-ready patterns:** Ship EKS clusters, serverless apps, or entire platforms with one line of code using well-architected components.
- **Hundreds of providers:** Full API coverage for AWS, Azure, Google Cloud, Kubernetes, plus Cloudflare, Datadog, GitHub, and hundreds more.
- **From VMs to Kubernetes:** Manage traditional infrastructure, containers, serverless, and Kubernetes with one tool, one workflow.

## Ship infrastructure **like software**

Infrastructure as code means infrastructure in Git. Review changes in pull requests. Run tests in CI. Ship through GitHub Actions, GitLab, Jenkins, or any CI/CD system.

- **Git-native workflow:** Every infrastructure change is a pull request. Review, comment, approve. Full audit trail built in.
- **Catch bugs before production:** Run [unit tests](https://www.pulumi.com/docs/iac/guides/testing/unit/) in milliseconds. Spin up ephemeral environments for [integration tests](https://www.pulumi.com/docs/iac/guides/testing/integration/). Fail fast, fix fast.
- **Works with your CI/CD:** Integrates with [any CI/CD system](https://www.pulumi.com/docs/iac/operations/continuous-delivery/). GitHub Actions, GitLab, Jenkins, CircleCI – your choice. Or use the [Kubernetes operator](https://www.pulumi.com/docs/integrations/clouds/kubernetes/pulumi-kubernetes-operator/) for GitOps.

> Pulumi has changed how our team works by giving us deployment superpowers. It’s great to run ‘pulumi up’ and not have to worry about deploying an invalid configuration.
>
> — Beyang Liu, CTO, Sourcegraph

## Scale confidently with **Pulumi Cloud**

Encrypted state storage, secrets management, and collaboration built in. When you scale, advanced features like RBAC, policy enforcement, and SSO are ready. All powered by our open source engine.

- **Encrypted state management:** Never lose state again. Automatic versioning and encryption at rest. Pulumi Cloud handles it all, or self-host with S3/Azure Blob.
- **Built-in secrets management:** No more secrets in plaintext. Automatic encryption for sensitive values. Integrate with AWS Secrets Manager, Azure Key Vault, or use [Pulumi ESC](https://www.pulumi.com/product/secrets-management/) for centralized secrets.
- **Ship with confidence:** Review every change before it ships. Full history and audit logs. Roll back to any previous state when needed.
- **See everything, everywhere:** Unified view across all your clouds. Search across AWS, Azure, and GCP. Find that rogue EC2 instance in seconds.
- **Automation API:** Infrastructure as code as a library. Embed Pulumi in your app. Build custom CLIs, portals, or platforms. Full programmatic control.
- **Self-service infrastructure:** Let engineers provision their own infrastructure safely. Templates, guardrails, and approval workflows. Works with Backstage or build your own.
- **Enterprise SSO & RBAC:** SAML, SCIM, GitHub, GitLab, Atlassian. Fine-grained permissions. Temporary access tokens. SOC 2 Type II compliant.
- **Policy as code:** Enforce security and compliance automatically. Hundreds of built-in policies or write your own. Block non-compliant infrastructure before it ships.
- **Complete audit trail:** Every action logged. Who changed what, when, and why. Export to SIEM. Compliance reports at your fingertips.

## Start building today

Write your first Pulumi program in the language you already know. Start with the Free edition and scale when you need advanced features.

- [Get started](https://www.pulumi.com/up/)
- [Book a demo](https://www.pulumi.com/request-a-demo/)

## Learn more

Explore the documentation and get started guides to build infrastructure with Pulumi IaC.

- [Read the docs](https://www.pulumi.com/docs/iac/)
- [Get started](https://www.pulumi.com/docs/iac/get-started/)

## Explore Pulumi

- [Product overview](https://www.pulumi.com/product/): The unified platform for infrastructure teams.
- [Pulumi Delivery](https://www.pulumi.com/product/delivery/): Your release process, in code.
- [Pulumi Agents](https://www.pulumi.com/product/agents/): Put agents to work on your infrastructure.
- [Pulumi ESC](https://www.pulumi.com/product/secrets-management/): Centralized configuration, zero sprawl.
- [Discovery & governance](https://www.pulumi.com/product/discovery-governance/): Continuous compliance, by construction.
- [Pulumi IDP](https://www.pulumi.com/product/internal-developer-platforms/): Self-service infrastructure at any scale.
