Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

Provider

The provider type for the postgresql package. By default, resources use package-wide configuration settings, however an explicit Provider instance may be created and passed during resource construction to achieve fine-grained programmatic control over provider settings. See the documentation for more information.

Create a Provider Resource

new Provider(name: string, args?: ProviderArgs, opts?: CustomResourceOptions);
def Provider(resource_name: str, opts: Optional[ResourceOptions] = None, clientcert: Optional[ProviderClientcertArgs] = None, connect_timeout: Optional[int] = None, database: Optional[str] = None, database_username: Optional[str] = None, expected_version: Optional[str] = None, host: Optional[str] = None, max_connections: Optional[int] = None, password: Optional[str] = None, port: Optional[int] = None, scheme: Optional[str] = None, ssl_mode: Optional[str] = None, sslmode: Optional[str] = None, sslrootcert: Optional[str] = None, superuser: Optional[bool] = None, username: Optional[str] = None)
func NewProvider(ctx *Context, name string, args *ProviderArgs, opts ...ResourceOption) (*Provider, error)
public Provider(string name, ProviderArgs? args = null, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args ProviderArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ProviderArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ProviderArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Provider Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Provider resource accepts the following input properties:

Clientcert Pulumi.PostgreSql.Inputs.ProviderClientcertArgs

SSL client certificate if required by the database.

ConnectTimeout int

Maximum wait for connection, in seconds. Zero or not specified means wait indefinitely. It can also be sourced from the following environment variable: PGCONNECT_TIMEOUT

Database string

The name of the database to connect to in order to conenct to (defaults to postgres).

DatabaseUsername string

Database username associated to the connected user (for user name maps)

ExpectedVersion string

Specify the expected version of PostgreSQL.

Host string

Name of PostgreSQL server address to connect to

MaxConnections int

Maximum number of connections to establish to the database. Zero means unlimited.

Password string

Password to be used if the PostgreSQL server demands password authentication

Port int

The PostgreSQL port number to connect to at the server host, or socket file name extension for Unix-domain connections

Scheme string
SslMode string

Deprecated: Rename PostgreSQL provider ssl_mode attribute to sslmode

Sslmode string

This option determines whether or with what priority a secure SSL TCP/IP connection will be negotiated with the PostgreSQL server It can also be sourced from the following environment variable: PGSSLMODE

Sslrootcert string

The SSL server root certificate file path. The file must contain PEM encoded data.

Superuser bool

Specify if the user to connect as is a Postgres superuser or not.If not, some feature might be disabled (e.g.: Refreshing state password from Postgres)

Username string

PostgreSQL user name to connect as

Clientcert ProviderClientcert

SSL client certificate if required by the database.

ConnectTimeout int

Maximum wait for connection, in seconds. Zero or not specified means wait indefinitely. It can also be sourced from the following environment variable: PGCONNECT_TIMEOUT

Database string

The name of the database to connect to in order to conenct to (defaults to postgres).

DatabaseUsername string

Database username associated to the connected user (for user name maps)

ExpectedVersion string

Specify the expected version of PostgreSQL.

Host string

Name of PostgreSQL server address to connect to

MaxConnections int

Maximum number of connections to establish to the database. Zero means unlimited.

Password string

Password to be used if the PostgreSQL server demands password authentication

Port int

The PostgreSQL port number to connect to at the server host, or socket file name extension for Unix-domain connections

Scheme string
SslMode string

Deprecated: Rename PostgreSQL provider ssl_mode attribute to sslmode

Sslmode string

This option determines whether or with what priority a secure SSL TCP/IP connection will be negotiated with the PostgreSQL server It can also be sourced from the following environment variable: PGSSLMODE

Sslrootcert string

The SSL server root certificate file path. The file must contain PEM encoded data.

Superuser bool

Specify if the user to connect as is a Postgres superuser or not.If not, some feature might be disabled (e.g.: Refreshing state password from Postgres)

Username string

PostgreSQL user name to connect as

clientcert ProviderClientcert

SSL client certificate if required by the database.

connectTimeout number

Maximum wait for connection, in seconds. Zero or not specified means wait indefinitely. It can also be sourced from the following environment variable: PGCONNECT_TIMEOUT

database string

The name of the database to connect to in order to conenct to (defaults to postgres).

databaseUsername string

Database username associated to the connected user (for user name maps)

expectedVersion string

Specify the expected version of PostgreSQL.

host string

Name of PostgreSQL server address to connect to

maxConnections number

Maximum number of connections to establish to the database. Zero means unlimited.

password string

Password to be used if the PostgreSQL server demands password authentication

port number

The PostgreSQL port number to connect to at the server host, or socket file name extension for Unix-domain connections

scheme string
sslMode string

Deprecated: Rename PostgreSQL provider ssl_mode attribute to sslmode

sslmode string

This option determines whether or with what priority a secure SSL TCP/IP connection will be negotiated with the PostgreSQL server It can also be sourced from the following environment variable: PGSSLMODE

sslrootcert string

The SSL server root certificate file path. The file must contain PEM encoded data.

superuser boolean

Specify if the user to connect as is a Postgres superuser or not.If not, some feature might be disabled (e.g.: Refreshing state password from Postgres)

username string

PostgreSQL user name to connect as

clientcert ProviderClientcertArgs

SSL client certificate if required by the database.

connect_timeout int

Maximum wait for connection, in seconds. Zero or not specified means wait indefinitely. It can also be sourced from the following environment variable: PGCONNECT_TIMEOUT

database str

The name of the database to connect to in order to conenct to (defaults to postgres).

database_username str

Database username associated to the connected user (for user name maps)

expected_version str

Specify the expected version of PostgreSQL.

host str

Name of PostgreSQL server address to connect to

max_connections int

Maximum number of connections to establish to the database. Zero means unlimited.

password str

Password to be used if the PostgreSQL server demands password authentication

port int

The PostgreSQL port number to connect to at the server host, or socket file name extension for Unix-domain connections

scheme str
ssl_mode str

Deprecated: Rename PostgreSQL provider ssl_mode attribute to sslmode

sslmode str

This option determines whether or with what priority a secure SSL TCP/IP connection will be negotiated with the PostgreSQL server It can also be sourced from the following environment variable: PGSSLMODE

sslrootcert str

The SSL server root certificate file path. The file must contain PEM encoded data.

superuser bool

Specify if the user to connect as is a Postgres superuser or not.If not, some feature might be disabled (e.g.: Refreshing state password from Postgres)

username str

PostgreSQL user name to connect as

Outputs

All input properties are implicitly available as output properties. Additionally, the Provider resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Supporting Types

ProviderClientcert

Cert string
Key string
Cert string
Key string
cert string
key string
cert str
key str

Package Details

Repository
https://github.com/pulumi/pulumi-postgresql
License
Apache-2.0
Notes
This Pulumi package is based on the postgresql Terraform Provider.