1. Packages
  2. Postgresql Provider
  3. Installation & Configuration
PostgreSQL v3.14.0 published on Friday, Dec 6, 2024 by Pulumi

Postgresql Provider: Installation & Configuration

postgresql logo
PostgreSQL v3.14.0 published on Friday, Dec 6, 2024 by Pulumi

    The Pulumi PostgreSQL provider uses the PostgreSQL SDK to manage and provision resources.

    Installation

    The PostgreSQL provider is available as a package in all Pulumi languages:

    Configuring Credentials

    Pulumi relies on the PostgreSQL SDK to authenticate requests from your computer to PostgreSQL. Your credentials are never sent to pulumi.com. The Pulumi PostgreSQL Provider needs to be configured with PostgreSQL credentials before it can be used to manage resources.

    In order to communicate your configuration details to Pulumi:

    1. Set the environment variables PGHOST and PGUSER:

      $ export PGHOST=XXXXXXXXXXXXXX
      $ export PGUSER=YYYYYYYYYYYYYY
      
    2. Set them using configuration, if you prefer that they be stored alongside your Pulumi stack for easy multi-user access:

      $ pulumi config set postgresql:host XXXXXXXXXXXXXX
      $ pulumi config set postgresql:username YYYYYYYYYYYYYY
      

    If you are going to set postgresql:password, please remember to pass --secret so that it is properly encrypted. The complete list of configuration parameters is in the PostgreSQL provider README.

    postgresql logo
    PostgreSQL v3.14.0 published on Friday, Dec 6, 2024 by Pulumi