Skip to content
Development
Skill

/infra-iac-pulumi

TypeScript-native Infrastructure as Code with Pulumi

From plugin
skills
26200 skills

Claude Code

$ npx -y skills add agents-inc/skills --skill infra-iac-pulumi --agent claude-code

SKILL.md

infra-iac-pulumi.SKILL.md
name: infra-iac-pulumi
description: TypeScript-native Infrastructure as Code with Pulumi

Pulumi Infrastructure as Code

> **Quick Guide:** Define cloud infrastructure in TypeScript with full type safety. Use `ComponentResource` to encapsulate reusable infrastructure patterns. Pass `{ parent: this }` to all child resources inside components. Use `pulumi.interpolate` for string building with Outputs (not string concatenation). Never create resources inside `.apply()`. Use `Config.requireSecret()` for sensitive values. Prefer `transforms` over deprecated `transformations`. Always call `this.registerOutputs()` at the end of component constructors.

---

<critical_requirements>

CRITICAL: Before Using This Skill

**(You MUST pass `{ parent: this }` to ALL child resources inside a ComponentResource -- omitting it breaks the resource tree and state tracking)**

**(You MUST use `pulumi.interpolate` for string building with Outputs -- string concatenation silently produces `[object Object]`)**

**(You MUST NEVER create resources inside `.apply()` -- they will not appear in `pulumi preview` and cause ordering issues)**

**(You MUST use `Config.requireSecret()` for sensitive values -- `Config.require()` stores values as plaintext in state)**

**(You MUST call `this.registerOutputs()` at the end of every ComponentResource constructor -- omitting it prevents output tracking)**

</critical_requirements>

---

**Detailed Resources:**

  • [examples/core.md](examples/core.md) - Resource definitions, component resources, naming, Outputs, config/secrets
  • [examples/advanced.md](examples/advanced.md) - Stack references, transforms, dynamic providers, Automation API, policy packs
  • [reference.md](reference.md) - Decision frameworks, resource options table, API reference, CLI commands

---

**Auto-detection:** Pulumi, @pulumi/pulumi, @pulumi/aws, @pulumi/gcp, @pulumi/azure, @pulumi/kubernetes, pulumi.ComponentResource, pulumi.CustomResource, pulumi.Output, pulumi.Config, pulumi.interpolate, pulumi.all, registerOutputs, StackReference, ComponentResourceOptions, CustomResourceOptions, dynamic.Resource, dynamic.ResourceProvider, LocalWorkspace, InlineProgramArgs, Automation API, CrossGuard, PolicyPack

**When to use:**

  • Defining cloud infrastructure in TypeScript with type-safe resource APIs
  • Creating reusable infrastructure components with `ComponentResource`
  • Managing multi-stack architectures with stack references
  • Handling secrets and environment-specific configuration
  • Building self-service infrastructure platforms with the Automation API
  • Writing compliance policies with CrossGuard policy packs

**When NOT to use:**

  • One-off shell scripts that create a single resource (use the cloud CLI directly)
  • Projects where the team has no TypeScript experience (consider other IaC language options)

**Key patterns covered:**

  • Resource definitions with typed inputs and auto-naming
  • ComponentResource encapsulation (parent, naming, registerOutputs)
  • Outputs: `apply`, `all`, `interpolate`, and lifting
  • Config and secrets management (`Config.require`, `Config.requireSecret`, `pulumi.secret`)
  • Stack references for cross-stack data sharing
  • Resource options (`dependsOn`, `protect`, `aliases`, `ignoreChanges`, `transforms`)
  • Dynamic providers for custom CRUD resources
  • Automation API for programmatic stack management
  • CrossGuard policy packs for compliance enforcement

---

<philosophy>

Philosophy

Pulumi treats infrastructure as real code, not configuration files. TypeScript gives you type safety, IDE autocompletion, refactoring tools, and the full Node.js ecosystem. Resources are objects, dependencies are automatic, and reuse happens through functions and classes -- not a custom module language.

**Core principles:**

  • **Resources are objects**: Every cloud resource is a TypeScript class instance with typed inputs and outputs
  • **Dependencies are automatic**: When you pass one resource's output as another's input, Pulumi infers the dependency graph
  • **Reuse through components**: `ComponentResource` encapsulates multiple resources into a single logical unit with its own inputs and outputs
  • **Outputs are promises**: `Output<T>` represents a value that may not be known until after deployment -- use `apply`, `all`, or `interpolate` to work with them, never unwrap manually
  • **State is managed**: Pulumi tracks every resource in state -- changing a logical name or moving a resource between files triggers a delete-and-recreate unless you use `aliases`

</philosophy>

---

<patterns>

Core Patterns

Pattern 1: Resource Definitions

Every resource takes a logical name (used for state tracking), an args bag (typed inputs), and optional resource options.

const bucket = new aws.s3.Bucket(
  "data-bucket",
  {
    versioning: { enabled: true },
    lifecycleRules: [
      { enabled: true, expiration: { days: BUCKET_EXPIRY_DAYS } },
    ],
  },
  { protect: true },
); // Prevent accidental deletion

**Key points:** Logical names must be unique per type within a stack. Pulumi auto-appends a random suffix to the physical name to prevent collisions. Use `protect: true` on critical resources. Export outputs for cross-stack consumption.

See [examples/core.md](examples/core.md) for resource naming, auto-naming configuration, and provider options.

---

Pattern 2: ComponentResource Encapsulation

Wrap related resources in a `ComponentResource` to create reusable infrastructure units.

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

interface StaticSiteArgs {
  indexDocument?: string;
  errorDocument?: string;
}

class StaticSite extends pulumi.ComponentResource {
  public readonly bucketName: pulumi.Output<string>;
  public readonly websiteUrl: pulumi.Output<string>;

  constructor(
    name: string,
    args: StaticSiteArgs,
    opts?: pulumi.ComponentResourceOptions,
  ) {
    super("myinfra:web:StaticSite", name, args, opts);
Read more
@agents-inc
Ships withskills

The official skills marketplace for Agents Inc. 230+ skills covering everything from React and Prisma to Redis, ElevenLabs, and infrastructure tooling. Pick the skills that match your stack and install them via Claude Code. Need more control?

Stars on GitHub

Momentum

stars in total
26
Star history of agents-inc/skills on GitHub, a chart by star-history.com

Other skills on skills.

ai-infrastructure-litellm

ai-infrastructure-lite…

LiteLLM proxy server setup, TypeScript client patterns via OpenAI SDK, model routing, fallbacks, load balancing, spend tracking,…

@agents-inc@agents-incInstall Skill
ai-infrastructure-modal

ai-infrastructure-moda…

Serverless GPU compute platform for AI model deployment — web endpoints, GPU functions, model serving, and TypeScript client…

@agents-inc@agents-incInstall Skill
ai-infrastructure-ollama

ai-infrastructure-olla…

Local LLM inference with the Ollama JavaScript client -- chat, streaming, tool calling, vision, embeddings, structured output,…

@agents-inc@agents-incInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about infra-iac-pulumi.

Which coding agents can use infra-iac-pulumi?
infra-iac-pulumi installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.