Registry / devops / pulumi

pulumi

JSON →
library3.259.0pypypi✓ verified 11d ago

Infrastructure as Code SDK for Python. Current version: 3.227.0 (Mar 2026). Requires Pulumi CLI installed separately — 'pip install pulumi' alone does nothing useful. All resource properties return Output[T] not plain values — cannot use them directly as strings/ints. Must use .apply() or Output.all() to work with output values. pulumi.export() must be at top level, not inside apply(). CLI and SDK versions should be kept in sync.

pip install pulumi
INSTALL
IMPORT
SIG · PULUMI
P
pulumi
devopspythonv3.259.0
Install
6.7s avg
Import
1111ms
Disk
77MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.259.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 1.434s · 85.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 6.7s · import 0.788s · 72MB
77MB installed
● package 77MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pulumi
import pulumi

Pulumi Python — S3 bucket and security group with stack exports.

# 1. Install CLI: curl -fsSL https://get.pulumi.com | sh # 2. pip install pulumi pulumi-aws # 3. pulumi new aws-python # 4. Edit __main__.py: import pulumi import pulumi_aws as aws # Create an S3 bucket bucket = aws.s3.Bucket( 'my-bucket', acl='private', tags={'Environment': 'dev'} ) # Create an EC2 security group sg = aws.ec2.SecurityGroup( 'web-sg', description='Allow HTTP', ingress=[aws.ec2.SecurityGroupIngressArgs( protocol='tcp', from_port=80, to_port=80, cidr_blocks=['0.0.0.0/0'] )] ) # Stack exports — must be at top level pulumi.export('bucket_name', bucket.bucket) pulumi.export('bucket_arn', bucket.arn) pulumi.export('sg_id', sg.id) # 5. pulumi up
pulumi --version
Debug
Known issues
breaking'pip install pulumi' installs the SDK but does NOT install the CLI. Running Python files directly does nothing. Must install Pulumi CLI separately and run via 'pulumi up'.
fix
Install CLI: curl -fsSL https://get.pulumi.com | sh. Then: pulumi new <template> && pulumi up.
affects: all
breakingAll resource properties (bucket.bucket, instance.id, etc.) return Output[T] — not plain values. Printing them shows '<pulumi.output.Output object>'. Cannot concatenate or format directly.
fix
Use .apply(lambda val: ...) to access the inner value. Or use Output.all() to combine multiple outputs.
affects: all
breakingpulumi.export() called inside .apply() callbacks or functions is silently ignored. Stack outputs must be registered at the top level of __main__.py.
fix
Call pulumi.export('key', output) at the top level — not inside apply(), functions, or conditionals.
affects: all
gotchaCLI version and SDK version should be kept in sync. Using CLI v3.114+ with SDK < v3.114 breaks --continue-on-error and other features added in that release.
fix
Keep pulumi CLI and pip install pulumi at the same major.minor version. Check: pulumi version && pip show pulumi.
affects: all
gotchaProvider packages (pulumi-aws, pulumi-azure-native, pulumi-gcp) must be installed separately. 'pip install pulumi' alone gives you no cloud resources.
fix
pip install pulumi pulumi-aws for AWS. pip install pulumi pulumi-azure-native for Azure.
affects: all
gotchahasattr() does not work on Pulumi resource objects. Python output lifting overrides __getattr__ — hasattr will always return True for resource outputs even for non-existent properties.
fix
Don't use hasattr() on Pulumi resources. Check the resource type's documented properties instead.
affects: all
gotchaPulumi programs must be run via 'pulumi up' or 'pulumi preview' — not 'python __main__.py'. Running directly produces no output and doesn't register resources.
fix
Always use the Pulumi CLI: pulumi up, pulumi preview, pulumi destroy.
affects: all
Upgrade
Version history
3.259.0latest on PyPI · released Aug 19, 2026
Audit
Dependencies
pulumi-awsoptionalRequired for AWS resources. Install separately: pip install pulumi-aws
pulumi-azure-nativeoptionalRequired for Azure resources. Install separately: pip install pulumi-azure-native
pulumi-gcpoptionalRequired for GCP resources. Install separately: pip install pulumi-gcp
Agent activity
15 hits · last 30 days
node
14
Resources