--- id: pulumi-random version: "4.21.1" license: Apache-2.0 license_treatment: permissive maintenance: active --- # pulumi-random — A Pulumi package to safely use randomness in Pulumi programs. License: permissive · Maintenance: active · Downloads: 1.6M/mo ## 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 above — 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 pip install pulumi-random uv add pulumi-random poetry add pulumi-random ## Installing 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_current - Install friction: low - Maintenance: active - Downloads: 1.6M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags pulumi random password generator, infrastructure randomness pulumi, pulumi random string resource, safe randomness infrastructure code, pulumi random id generator, deterministic random values pulumi, pulumi random provider, infrastructure-as-code, pulumi-provider, randomness [View on SkillFed](https://skillfed.io/packages/pulumi-random) · [View on PyPI](https://pypi.org/project/pulumi-random/)