- Home
- Skills
- Pulumi
- Agent Skills
- Pulumi Automation Api
pulumi-automation-api_skill
25
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill pulumi/agent-skills --skill pulumi-automation-api- SKILL.md8.4 KB
Overview
This skill documents best practices for using the Pulumi Automation API to programmatically orchestrate infrastructure operations. It focuses on multi-stack orchestration, embedding Pulumi programs in applications, architecture tradeoffs, and common patterns to replace brittle scripts. The guidance targets platform teams, application owners, and engineers building self-service or embedded provisioning workflows.
How this skill works
Automation API lets you run Pulumi operations (create, update, destroy, export outputs) from code instead of the CLI. It supports both LocalWorkspace (pointing to existing project files) and inline programs (embedded program functions), and exposes stack lifecycle methods such as createOrSelectStack, up, destroy, setConfig, and outputs. Use the API to sequence stacks, run independent stacks in parallel, stream real-time logs, and handle errors programmatically.
When to use it
- Orchestrating deployments across multiple dependent Pulumi stacks
- Embedding Pulumi into applications, CLIs, or web portals
- Building self-service infrastructure platforms and internal tooling
- Replacing fragile Bash/Makefile orchestration scripts
- Creating per-tenant or test environments programmatically
Best practices
- Separate configuration from code — load deploy manifests or env vars so compiled binaries don’t leak source-specific settings
- Choose LocalSource when teams and lifecycle need independence; choose InlineSource for tight coupling or single-binary distribution
- Stream output with onOutput for real-time feedback to logs, UIs, or CLIs during long operations
- Handle failures explicitly: check up result summaries and catch exceptions to provide clear remediation steps
- Orchestrate stacks sequentially when there are dependencies; use parallel execution only for independent stacks
Example use cases
- Sequentially deploy infrastructure → platform → application stacks with correct ordering and rollback behavior
- Build a web portal or Slack bot that provisions environments via Automation API and returns stack outputs
- Embed Pulumi in a SaaS control plane to create per-tenant resources at signup
- Replace Makefile orchestration with a typed program that sets config, runs up, reads outputs, and reports status
- Run test suites that spin up ephemeral environments via inline programs and destroy them after tests
FAQ
Use inline when a single team owns orchestrator and infra or when distributing a compiled binary. Use local workDir when teams need independent version control, separate release cycles, or when existing Pulumi projects already exist.
Can I run stacks in parallel?
Yes. Run independent stacks in parallel (Promise.all or equivalent) to speed deployments. Avoid parallelism for stacks with resource or output dependencies; sequence those deployments instead.