pulumi-random
A Pulumi package to safely use randomness in Pulumi programs.
What it is and what it does
pulumi-random is a Pulumi provider that enables safe, deterministic use of randomness in infrastructure-as-code programs. Unlike calling random functions directly—which would produce different values on every program evaluation and break Pulumi's goal-state model—this provider integrates randomness into Pulumi's resource lifecycle so that generated values remain stable across updates unless explicitly refreshed.
The package exposes resource types like RandomPassword, RandomId, and RandomString that generate random values as first-class Pulumi outputs. These outputs can be passed to other resources (e.g., an RDS password, a resource name suffix) while respecting Pulumi's convergence semantics. It depends on pulumi as its core runtime and uses parver and semver for version handling.
Use it for:
- Generate random database passwords and pass them to RDS or other managed database resources without re-convergence on every run.
- Create unique resource names with random suffixes to avoid naming collisions in multi-environment deployments.
- Produce random IDs for tagging or identifying infrastructure components while maintaining deterministic state.
- Seed random strings for API keys, tokens, or other secrets that need to be stable across stack updates.
- Combine randomness with Pulumi's automation API to provision infrastructure with deterministic but unpredictable identifiers.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides safe, deterministic randomness for Pulumi infrastructure-as-code programs by generating random resource properties that integrate with Pulumi's state-oriented lifecycle.
Yes. This is an actively maintained, low-friction Pulumi provider with no known vulnerabilities, permissive licensing, and a clear use case for anyone building infrastructure-as-code with Pulumi who needs randomness. Install it if you are using Pulumi and need to safely incorporate random values into your resource definitions.
Install
pulumi-random on PyPI
pip
pip install pulumi-randomuv
uv add pulumi-randompoetry
poetry add pulumi-randomInstalling pulumi-random
Before you install
Low install friction with a pure Python wheel. Actively maintained as of 23 days ago with recent commits. Depends on pulumi, parver, semver, and typing-extensions—all standard, lightweight dependencies.
License in practice
Licensed under Apache-2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions.
Quickstart
pip install pulumi_random
import pulumi
import pulumi_random as random
password = random.RandomPassword("db_password", length=16, special=True)
pulumi.export("password", password.result)
Requires Python 3.9 or later and a Pulumi project context to function.
Verify before relying
- Whether random values persist correctly across Pulumi stack updates and state refreshes in practice.
- Performance characteristics when generating many random resources in a single program.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — parver, pulumi, semver, typing-extensions |
| Maintenance | actively maintained — 23 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,645,693/month — #3,691 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pulumi_random-4.21.1-py3-none-any.whl
Keywords: pulumi, random
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
pulumi-tlsPulumi resource provider for creating and…
permissive · top 5,000 on PyPI
pyudorandomGenerates pseudorandom numbers using algebraic…
unclear · top 15,000 on PyPI
pulumi-dockerPulumi provider for managing Docker resources…
permissive · top 5,000 on PyPI
pulumi-datadogPulumi provider for declaring and managing…
permissive · top 5,000 on PyPI
pulumi-pagerdutyA Pulumi resource provider that lets you…
permissive · top 15,000 on PyPI
pulumiverse-grafanaA Pulumi resource provider that lets you create…
permissive · top 15,000 on PyPI
pulumi-pulumiservicePulumi Service Provider enables programmatic…
permissive · top 15,000 on PyPI
pulumi-githubPulumi provider for GitHub that lets you define…
permissive · top 15,000 on PyPI
dicewarediceware generates memorable passphrases by…
copyleft · top 5,000 on PyPI
pulumi-vaultPulumi resource provider for HashiCorp Vault…
permissive · top 15,000 on PyPI