skillfed

pulumi-postgresql

A Pulumi package for creating and managing postgresql cloud resources.

pulumi-postgresql v3.18.0 492.0K downloads/30d#6,363 on PyPI40
Permissive license Apache-2.0 Active released

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-postgresql

uv

uv add pulumi-postgresql

poetry

poetry add pulumi-postgresql

Installing 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

pulumi postgresql providerinfrastructure as code postgresqlmanage postgresql with pulumipostgresql resource providerdatabase infrastructure automationpulumi database managementpostgresql iac
infrastructure-as-codepostgresqlpulumi-plugin

More Database packages