MCPcopy Index your code
hub / github.com/pulumi/pulumi

github.com/pulumi/pulumi @v3.250.0 sqlite

repository ↗ · DeepWiki ↗ · release v3.250.0 ↗
107,561 symbols 555,508 edges 11,674 files 22,722 documented · 21% 91 cross-repo links
README
<a href="https://www.pulumi.com/?utm_source=github.com&utm_medium=referral&utm_campaign=pulumi-pulumi-github-repo&utm_content=top+logo" title="Pulumi - Modern Infrastructure as Code - AWS Azure Kubernetes Containers Serverless">






        <img src="https://www.pulumi.com/images/logo/logo-on-white.svg" alt="Pulumi" width="350">



</a>

Slack GitHub Discussions NPM version Python version NuGet version GoDoc License

Infrastructure as Code for Humans and Agents

Pulumi Infrastructure as Code is the easiest way to build and deploy infrastructure, of any architecture and on any cloud, using programming languages that you already know and love. Code and ship infrastructure faster with your favorite languages and tools, and embed IaC anywhere with Automation API.

Simply write code in your favorite language and Pulumi automatically provisions and manages your resources on AWS, Azure, Google Cloud Platform, Kubernetes, and 300+ providers using an infrastructure-as-code approach. Skip the YAML, and use standard language features like loops, functions, classes, and package management that you already know and love.

For example, create three web servers:

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

const ami = aws.ec2.getAmiOutput({
    mostRecent: true,
    owners: ["amazon"],
    filters: [{ name: "name", values: ["al2023-ami-*-x86_64"] }],
});

const sg = new aws.ec2.SecurityGroup("web-sg", {
    ingress: [{ protocol: "tcp", fromPort: 80, toPort: 80, cidrBlocks: ["0.0.0.0/0"] }],
});

for (const i of [0, 1, 2]) {
    new aws.ec2.Instance(`web-${i}`, {
        ami: ami.id,
        instanceType: "t3.micro",
        vpcSecurityGroupIds: [sg.id],
        userData: `#!/bin/bash
            echo "Hello, World!" > index.html
            nohup python3 -m http.server 80 &`,
    });
}

Or a simple serverless timer that archives Hacker News every day at 8:30AM:

import * as aws from "@pulumi/aws";
import { DynamoDBClient } from "@aws-sdk/client-dynamodb";
import { DynamoDBDocumentClient, PutCommand } from "@aws-sdk/lib-dynamodb";

const snapshots = new aws.dynamodb.Table("snapshots", {
    attributes: [{ name: "id", type: "S" }],
    hashKey: "id",
    billingMode: "PAY_PER_REQUEST",
});

aws.cloudwatch.onSchedule("daily-yc-snapshot", "cron(30 8 * * ? *)", async () => {
    const res = await fetch("https://news.ycombinator.com");
    const content = await res.text();

    const client = DynamoDBDocumentClient.from(new DynamoDBClient({}));
    await client.send(new PutCommand({
        TableName: snapshots.name.get(),
        Item: { id: `${Date.now()}`, content },
    }));
});

Many examples are available spanning containers, serverless, and infrastructure in pulumi/examples.

Pulumi is open source under the Apache 2.0 license, supports many languages and clouds, and is easy to extend. This repo contains the pulumi CLI, language SDKs, and core Pulumi engine, and individual libraries are in their own repos.

Welcome

Pulumi quickstart terminal

  • Get Started with Pulumi: Deploy a simple application in AWS, Azure, Google Cloud, or Kubernetes using Pulumi.

  • Learn: Follow Pulumi learning pathways to learn best practices and architectural patterns through authentic examples.

  • Examples: Browse several examples across many languages, clouds, and scenarios including containers, serverless, and infrastructure.

  • Docs: Learn about Pulumi concepts, follow user-guides, and consult the reference documentation.

  • Registry: Find the Pulumi Package with the resources you need. Install the package directly into your project, browse the API documentation, and start building.

  • Secrets Management: Tame secrets sprawl and configuration complexity securely across all your cloud infrastructure and applications with Pulumi ESC.

  • Community Slack: Join us in Pulumi Community Slack. All conversations and questions are welcome.

  • GitHub Discussions: Ask questions or share what you're building with Pulumi.

Getting Started

Watch the video

See the Get Started guide to quickly get started with Pulumi on your platform and cloud of choice.

Otherwise, the following steps demonstrate how to deploy your first Pulumi program, using AWS Serverless Lambdas, in minutes:

  1. Install:

    To install the latest Pulumi release, run the following (see full installation instructions for additional installation options):

    bash curl -fsSL https://get.pulumi.com/ | sh

  2. Create a Project:

    After installing, you can get started with the pulumi new command:

    bash mkdir pulumi-demo && cd pulumi-demo pulumi new serverless-aws-typescript

    The new command offers templates for all languages and clouds. Run it without an argument and it'll prompt you with available projects. This command creates an AWS Serverless Lambda project written in TypeScript.

  3. Deploy to the Cloud:

    Run pulumi up to get your code to the cloud:

    bash pulumi up

    This makes all cloud resources needed to run your code. Simply make edits to your project, and subsequent pulumi ups will compute the minimal diff to deploy your changes.

  4. Use Your Program:

    Now that your code is deployed, you can interact with it. In the above example, we can curl the endpoint:

    bash curl $(pulumi stack output url)

  5. Access the Logs:

    If you're using containers or functions, Pulumi's unified logging command will show all of your logs:

    bash pulumi logs -f

  6. Destroy your Resources:

    After you're done, you can remove all resources created by your program:

    bash pulumi destroy -y

To learn more, head over to pulumi.com for much more information, including tutorials, examples, and details of the core Pulumi CLI and programming model concepts.

Platform

Languages

Language Status Runtime Versions
JavaScript Stable Node.js Current, Active and Maintenance LTS versions
TypeScript Stable Node.js Current, Active and Maintenance LTS versions
Python Stable Python Supported versions
Go Stable Go Supported versions
.NET (C#/F#/VB.NET) Stable .NET Supported versions
Java Stable JDK 11+
YAML Stable n/a n/a

Clouds

Visit the Registry for the full list of supported cloud and infrastructure providers.

Contributing

Visit CONTRIBUTING.md for information on building Pulumi from source or contributing improvements.

Extension points exported contracts — how you extend this code

Manager (Interface)
Manager provides the interface for providing stack encryption. [14 implementers]
pkg/secrets/manager.go
SnapshotPersister (Interface)
SnapshotPersister is an interface implemented by our backends that implements snapshot persistence. In order to fit into [13 …
pkg/backend/snapshot.go
PolicyEnvironmentResolver (Interface)
PolicyEnvironmentResolver resolves ESC environment references for local policy packs. Backends that support ESC provide [6 …
pkg/engine/update.go
ProviderSource (Interface)
A ProviderSource allows a Source to lookup provider plugins. [18 implementers]
pkg/resource/deploy/source.go
ToolHandler (Interface)
ToolHandler executes a single named method on a Neo CLI-local tool. The method is the part of the agent's full tool name [73 …
pkg/cmd/pulumi/neo/session.go
NodeTokens (Interface)
NodeTokens is a closed interface that is used to represent arbitrary *Tokens types in this package. [18 implementers]
pkg/codegen/hcl2/syntax/tokens.go
BarInput (Interface)
BarInput is an input type that accepts BarArgs and BarOutput values. You can construct a concrete instance of `BarInput` [6 …
tests/integration/construct_component_output_values/testcomponent-go/pulumiTypes.go
ConfigMapInput (Interface)
ConfigMapInput is an input type that accepts ConfigMap and ConfigMapOutput values. You can construct a concrete instance [11 …
tests/testdata/codegen/simple-yaml-schema/go/example/pulumiTypes.go

Core symbols most depended-on inside this repo

get
called by 9789
sdk/nodejs/dynamic/index.ts
Equal
called by 7653
sdk/go/property/reference.go
Parallel
called by 7004
sdk/go/pulumi/context.go
set
called by 6306
sdk/nodejs/tests/runtime/testdata/closure-tests/cases/178-Serialize-minified-class-declaration/index.cjs
String
called by 4063
pkg/codegen/schema/schema.go
ApplyT
called by 3805
sdk/go/internal/types.go
Context
called by 3339
pkg/backend/backend.go
apply
called by 2661
sdk/nodejs/output.ts

Shape

Method 50,355
Function 30,875
Struct 9,986
Class 7,593
Interface 3,759
Route 3,490
TypeAlias 989
FuncType 489
Enum 25

Languages

Go62%
Python29%
TypeScript9%
Java1%

Modules by API surface

sdk/go/pulumi/types_builtins.go2,601 symbols
sdk/go/pulumi/types_builtins_test.go808 symbols
sdk/go/pulumi-language-go/testdata/published/sdks/config-grpc-1.0.0/configgrpc/pulumiTypes.go745 symbols
sdk/go/pulumi-language-go/testdata/local/projects/l2-provider-grpc-config/sdks/config-grpc-1.0.0/configgrpc/pulumiTypes.go745 symbols
sdk/go/pulumi-language-go/testdata/local/projects/l2-provider-grpc-config-secret/sdks/config-grpc-1.0.0/configgrpc/pulumiTypes.go745 symbols
sdk/go/pulumi-language-go/testdata/local/projects/l2-provider-grpc-config-schema-secret/sdks/config-grpc-1.0.0/configgrpc/pulumiTypes.go745 symbols
sdk/go/pulumi-language-go/testdata/extra-types/sdks/config-grpc-1.0.0/configgrpc/pulumiTypes.go745 symbols
sdk/proto/go/provider.pb.go555 symbols
tests/testdata/codegen/output-funcs-edgeorder/go/myedgeorder/pulumiTypes.go519 symbols
sdk/proto/go/resource.pb.go416 symbols
sdk/proto/go/language.pb.go336 symbols
pkg/codegen/hcl2/model/expression.go286 symbols

Dependencies from manifests, versioned

cel.dev/exprv0.25.1 · 1×
cloud.google.com/gov0.123.0 · 1×
cloud.google.com/go/auth/oauth2adaptv0.2.8 · 1×
cloud.google.com/go/compute/metadatav0.9.0 · 1×
cloud.google.com/go/kmsv1.26.0 · 1×
cloud.google.com/go/loggingv1.13.2 · 1×
cloud.google.com/go/longrunningv0.8.0 · 1×

Datastores touched

databaseNameDatabase · 1 repos
mydbDatabase · 1 repos
pulumiDatabase · 1 repos

For agents

$ claude mcp add pulumi \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact