
Pulumi Automation Api
Embed Pulumi stack up/down and multi-stack orchestration in application code instead of brittle shell scripts.
Overview
pulumi-automation-api is an agent skill most often used in Operate (also Build, Ship) that embeds Pulumi stack operations and multi-stack orchestration via the Automation API.
Install
npx skills add https://github.com/pulumi/agent-skills --skill pulumi-automation-apiWhat is this skill?
- Programmatic Pulumi up/down via LocalWorkspace and createOrSelectStack
- Inline Pulumi programs embedded in TypeScript or other host languages
- Multi-stack sequencing, parallel deployments, and output handoff in code
- Replace Bash/Make orchestration with typed Automation API flows
- Self-service infrastructure portals and custom CLIs for teams
Adoption & trust: 748 installs on skills.sh; 56 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You are stitching multiple Pulumi stacks with fragile shell scripts and need reliable programmatic up, output passing, and portal-friendly infra control.
Who is it for?
Builders shipping self-service infra tools, custom deployment CLIs, or app-embedded provisioning with Pulumi already in the repo.
Skip if: First-time IaC learners who only need a single manual pulumi up from the terminal, or teams standardized on Terraform-only workflows.
When should I use this skill?
Load when users ask how to run Pulumi programmatically, embed Pulumi in an app, orchestrate multiple stacks, build self-service infra portals, replace CLI shell scripts, or use LocalWorkspace and createOrSelectStack.
What do I get? / Deliverables
After applying this skill, you can implement LocalWorkspace-based stack runs, inline programs, and coded multi-stack sequences that replace ad-hoc CLI scripts.
- Automation API orchestration code
- Multi-stack deployment or portal integration snippet
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Operate/infra is the canonical shelf because Automation API shines when you run, sequence, and wire stacks in production portals and custom CLIs, though you adopt it during build and ship integration work. Infra covers programmatic provisioning, stack selection, and output passing between environments.
Where it fits
Embed stack preview and up calls inside your SaaS admin so staging environments spin up on button click.
Sequence app and data plane stacks in one typed script for a repeatable release night.
Run parallel stack updates and pass outputs between networking and app stacks without Bash glue.
Iterate a custom infra CLI that wraps createOrSelectStack for dev and prod without teaching every teammate the raw Pulumi CLI.
How it compares
Use for in-process Pulumi orchestration code, not marketing screenshots or Word document generation.
Common Questions / FAQ
Who is pulumi-automation-api for?
Solo and indie developers embedding Pulumi in applications, internal portals, or custom CLIs who need multi-stack orchestration beyond one-shot terminal commands.
When should I use pulumi-automation-api?
During Build when wiring backend deploy hooks, at Ship when automating release pipelines, and in Operate when running sequenced stack updates or self-service infra from your own code.
Is pulumi-automation-api safe to install?
It guides powerful infra operations—review the Security Audits panel on this Prism page, lock down cloud credentials, and audit any generated Automation API code before production runs.
SKILL.md
READMESKILL.md - Pulumi Automation Api
# Pulumi Automation API ## When to Use This Skill Invoke this skill when: - Orchestrating deployments across multiple Pulumi stacks - Embedding Pulumi operations in custom applications - Building self-service infrastructure platforms - Replacing fragile Bash/Makefile orchestration scripts - Creating custom CLIs for infrastructure management - Building web applications that provision infrastructure ## What is Automation API Automation API provides programmatic access to Pulumi operations. Instead of running `pulumi up` from the CLI, you call functions in your code that perform the same operations. ```typescript import * as automation from "@pulumi/pulumi/automation"; // Create or select a stack const stack = await automation.LocalWorkspace.createOrSelectStack({ stackName: "dev", projectName: "my-project", program: async () => { // Your Pulumi program here }, }); // Run pulumi up programmatically const upResult = await stack.up({ onOutput: console.log }); console.log(`Update summary: ${JSON.stringify(upResult.summary)}`); ``` ## When to Use Automation API ### Good Use Cases **Multi-stack orchestration:** When you split infrastructure into multiple focused projects, Automation API helps offset the added complexity by orchestrating operations across stacks: ```text infrastructure → platform → application ↓ ↓ ↓ (VPC) (Kubernetes) (Services) ``` Automation API ensures correct sequencing without manual intervention. **Self-service platforms:** Build internal tools where developers request infrastructure without learning Pulumi: - Web portals for environment provisioning - Slack bots that create/destroy resources - Custom CLIs tailored to your organization **Embedded infrastructure:** Applications that provision their own infrastructure: - SaaS platforms creating per-tenant resources - Testing frameworks spinning up test environments - CI/CD systems with dynamic infrastructure needs **Replacing fragile scripts:** If you have Bash scripts or Makefiles stitching together multiple `pulumi` commands, Automation API provides: - Proper error handling - Type safety - Programmatic access to outputs ### When NOT to Use - Single project with standard deployment needs - When you don't need programmatic control over operations ## Architecture Choices ### Local Source vs Inline Source **Local Source** - Pulumi program in separate files: ```typescript const stack = await automation.LocalWorkspace.createOrSelectStack({ stackName: "dev", workDir: "./infrastructure", // Points to existing Pulumi project }); ``` **When to use:** - Different teams maintain orchestrator vs Pulumi programs - Pulumi programs already exist - Want independent version control and release cycles - Platform team orchestrating application team's infrastructure **Inline Source** - Pulumi program embedded in orchestrator: ```typescript import * as aws from "@pulumi/aws"; const stack = await automation.LocalWorkspace.createOrSelectStack({ stackName: "dev", projectName: "my-project", program: async () => { const bucket = new aws.s3.Bucket("my-bucket"); return { bucketName: bucket.id }; }, }); ``` **When to use:** - Single team owns everything - Tight coupling between orchestration and infrastructure is desired - Distributing as compiled binary (no source files needed) - Simpler deployment artifact ### Language Independence The Automation API program can