pulumi-postgresql
A Pulumi package for creating and managing postgresql cloud resources.
What it is and what it does
pulumi-postgresql is a Pulumi resource provider that lets you define PostgreSQL infrastructure—databases, users, roles, permissions, and other objects—using Python code instead of manual SQL or imperative scripts. It integrates with Pulumi's state management and deployment workflow, so you can version-control your database schema and apply changes consistently across environments.
The provider connects to a PostgreSQL server using standard connection parameters (host, port, username, password) supplied via environment variables or Pulumi configuration. It supports SSL connections, connection pooling, and superuser-level operations. You write Python code to declare the resources you want, and Pulumi handles creating, updating, and destroying them on your PostgreSQL instance.
Use it for:
- Define and version-control database schemas and user permissions as part of your infrastructure-as-code stack.
- Automate PostgreSQL setup in CI/CD pipelines without writing raw SQL scripts.
- Manage multiple PostgreSQL environments (dev, staging, production) with consistent, reproducible configurations.
- Provision database users and roles with specific permissions as part of application deployment.
- Coordinate PostgreSQL resource creation with application infrastructure defined in the same Pulumi program.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Pulumi resource provider for declaring and managing PostgreSQL databases, users, roles, and other database objects as infrastructure code.
Yes, if you are already using Pulumi and need to manage PostgreSQL resources as code. The provider is actively maintained, has no known vulnerabilities, and integrates cleanly with Pulumi's workflow. Install only if you have Pulumi CLI set up and a PostgreSQL server you can connect to.
Install
pulumi-postgresql on PyPI
pip
pip install pulumi-postgresqluv
uv add pulumi-postgresqlpoetry
poetry add pulumi-postgresqlInstalling pulumi-postgresql
Before you install
Low install friction; a pure Python wheel with four lightweight runtime dependencies. Actively maintained as of 2026-08-14 with recent releases.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions.
Quickstart
pip install pulumi_postgresql
import pulumi
import pulumi_postgresql as postgresql
db = postgresql.Database("my_db", name="mydb")
Requires Pulumi CLI to be installed first and a running PostgreSQL server with network access configured via environment variables or Pulumi config (PGHOST, PGUSER, PGPASSWORD, etc.).
Verify before relying
- Whether all PostgreSQL resource types (tables, schemas, extensions, etc.) are fully supported or if some are limited.
- Performance characteristics when managing large numbers of PostgreSQL objects.
- Compatibility with PostgreSQL versions older than 9.0.0 mentioned in the configuration docs.
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 — 29 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 491,966/month — #6,363 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pulumi_postgresql-3.18.0-py3-none-any.whl
Keywords: pulumi, postgresql
Tags
More Database packages
psycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
redisPython client library for connecting to and…
permissive · top 1,000 on PyPI
ydbYDB Python SDK is the official client library…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
sqlparsesqlparse tokenizes SQL text into a tree of…
permissive · top 1,000 on PyPI
dbt-adaptersProvides base adapter protocols and shared…
permissive · top 1,000 on PyPI
pulumi-dockerPulumi provider for managing Docker resources…
permissive · top 5,000 on PyPI
pulumi-snowflakeA Pulumi resource provider that lets you…
permissive · top 15,000 on PyPI
pulumi-tlsPulumi resource provider for creating and…
permissive · top 5,000 on PyPI
pulumi-vaultPulumi resource provider for HashiCorp Vault…
permissive · top 15,000 on PyPI
pulumi-datadogPulumi provider for declaring and managing…
permissive · top 5,000 on PyPI
pulumi-gcpPulumi resource provider for Google Cloud…
permissive · top 5,000 on PyPI
pulumi-githubPulumi provider for GitHub that lets you define…
permissive · top 15,000 on PyPI
pulumi-gitlabPulumi provider for GitLab that lets you define…
permissive · top 15,000 on PyPI
pulumiverse-grafanaA Pulumi resource provider that lets you create…
permissive · top 15,000 on PyPI
pgclipgcli is a command-line interface for…
permissive · top 15,000 on PyPI