
Pulumi Best Practices
pulumi/agent-skillsOfficial
Practice-based guide for Pulumi TypeScript and Python programs covering outputs, components, parenting, and secrets.
- skills.sh installs
- 2.7K
- GitHub stars
- 80
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers five practices for writing and reviewing Pulumi programs, including output handling, component design, and resource hierarchy
- Includes wrong-versus-right code examples for
apply()misuse, direct output passing,pulumi.interpolate, andComponentResourceclasses - Enforces that resources are never created inside
apply()and that child resources in components setparent: this - Designed for developers writing, refactoring, or debugging Pulumi infrastructure code and configuring secrets or CI workflows
Install
$ npx -y skills add pulumi/agent-skills --skill pulumi-best-practices -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Pulumi Best Practices
When to Use This Skill
Invoke this skill when:
- Writing new Pulumi programs or components
- Reviewing Pulumi code for correctness
- Refactoring existing Pulumi infrastructure
- Debugging resource dependency issues
- Setting up configuration and secrets
Practices
1. Never Create Resources Inside apply()
Why: Resources created inside apply() don't appear in pulumi preview, making changes unpredictable. Pulumi cannot properly track dependencies, leading to race conditions and deployment failures.
Detection signals:
new aws.or other resource constructors inside.apply()callbacks- Resource creation inside
pulumi.all([...]).apply() - Dynamic resource counts determined at runtime inside apply
Wrong:
const bucket = new aws.s3.Bucket("bucket");
bucket.id.apply(bucketId => {
// WRONG: This resource won't appear in preview
new aws.s3.BucketObject("object", {
bucket: bucketId,
content: "hello",
});
});
Right:
const bucket = new aws.s3.Bucket("bucket");
Details
- Repository
- github.com/pulumi/agent-skills
- Categories
- DevOps & Cloud, Backend & APIs
More from pulumi/agent-skills
All 12Similar to Pulumi Best Practices
More DevOps & Cloud
pulumi-componentSkillpulumi/agent-skills1.5K installsGuide for authoring reusable Pulumi ComponentResource classes with multi-language support and distribution.
pulumiSkillpproenca/dot-skills317 installsPulumi infrastructure-as-code guidance that prioritizes state, resource graph, and secrets reliability for agents writing or reviewing code.
pulumi-escSkillpulumi/agent-skills1.5K installsReference guide for Pulumi ESC that covers environment composition, secrets, and dynamic cloud credentials.
jutsu-pulumiPluginTheBushidoCollective/han201 starsPulumi infrastructure-as-code validation and best practices
aws-cdk-developmentSkillzxkane/aws-skills1.2K installsReusable AWS CDK guidance for TypeScript and Python stacks, constructs, and synth/deploy workflows, with multi-layer validation.
aws-cdkSkillaws/agent-toolkit-for-aws10.5K installsFull-stack AWS CDK skill for authoring, deploying, and troubleshooting infrastructure in TypeScript or Python.