1. Packages
  2. Postgresql Provider
  3. API Docs
  4. Database
PostgreSQL v3.15.1 published on Saturday, Mar 15, 2025 by Pulumi

postgresql.Database

Explore with Pulumi AI

Create Database Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Database(name: string, args?: DatabaseArgs, opts?: CustomResourceOptions);
@overload
def Database(resource_name: str,
             args: Optional[DatabaseArgs] = None,
             opts: Optional[ResourceOptions] = None)

@overload
def Database(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             allow_connections: Optional[bool] = None,
             alter_object_ownership: Optional[bool] = None,
             connection_limit: Optional[int] = None,
             encoding: Optional[str] = None,
             is_template: Optional[bool] = None,
             lc_collate: Optional[str] = None,
             lc_ctype: Optional[str] = None,
             name: Optional[str] = None,
             owner: Optional[str] = None,
             tablespace_name: Optional[str] = None,
             template: Optional[str] = None)
func NewDatabase(ctx *Context, name string, args *DatabaseArgs, opts ...ResourceOption) (*Database, error)
public Database(string name, DatabaseArgs? args = null, CustomResourceOptions? opts = null)
public Database(String name, DatabaseArgs args)
public Database(String name, DatabaseArgs args, CustomResourceOptions options)
type: postgresql:Database
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args DatabaseArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args DatabaseArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args DatabaseArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args DatabaseArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. DatabaseArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var databaseResource = new PostgreSql.Database("databaseResource", new()
{
    AllowConnections = false,
    AlterObjectOwnership = false,
    ConnectionLimit = 0,
    Encoding = "string",
    IsTemplate = false,
    LcCollate = "string",
    LcCtype = "string",
    Name = "string",
    Owner = "string",
    TablespaceName = "string",
    Template = "string",
});
Copy
example, err := postgresql.NewDatabase(ctx, "databaseResource", &postgresql.DatabaseArgs{
	AllowConnections:     pulumi.Bool(false),
	AlterObjectOwnership: pulumi.Bool(false),
	ConnectionLimit:      pulumi.Int(0),
	Encoding:             pulumi.String("string"),
	IsTemplate:           pulumi.Bool(false),
	LcCollate:            pulumi.String("string"),
	LcCtype:              pulumi.String("string"),
	Name:                 pulumi.String("string"),
	Owner:                pulumi.String("string"),
	TablespaceName:       pulumi.String("string"),
	Template:             pulumi.String("string"),
})
Copy
var databaseResource = new Database("databaseResource", DatabaseArgs.builder()
    .allowConnections(false)
    .alterObjectOwnership(false)
    .connectionLimit(0)
    .encoding("string")
    .isTemplate(false)
    .lcCollate("string")
    .lcCtype("string")
    .name("string")
    .owner("string")
    .tablespaceName("string")
    .template("string")
    .build());
Copy
database_resource = postgresql.Database("databaseResource",
    allow_connections=False,
    alter_object_ownership=False,
    connection_limit=0,
    encoding="string",
    is_template=False,
    lc_collate="string",
    lc_ctype="string",
    name="string",
    owner="string",
    tablespace_name="string",
    template="string")
Copy
const databaseResource = new postgresql.Database("databaseResource", {
    allowConnections: false,
    alterObjectOwnership: false,
    connectionLimit: 0,
    encoding: "string",
    isTemplate: false,
    lcCollate: "string",
    lcCtype: "string",
    name: "string",
    owner: "string",
    tablespaceName: "string",
    template: "string",
});
Copy
type: postgresql:Database
properties:
    allowConnections: false
    alterObjectOwnership: false
    connectionLimit: 0
    encoding: string
    isTemplate: false
    lcCollate: string
    lcCtype: string
    name: string
    owner: string
    tablespaceName: string
    template: string
Copy

Database Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Database resource accepts the following input properties:

AllowConnections bool
If false then no one can connect to this database. The default is true, allowing connections (except as restricted by other mechanisms, such as GRANT or REVOKE CONNECT).
AlterObjectOwnership bool
If true, the change of the database owner will also include a reassignment of the ownership of preexisting objects like tables or sequences from the previous owner to the new one. If set to false (the default), then the previous database owner will still hold the ownership of the objects in that database. To alter existing objects in the database, you must be a direct or indirect member of the specified role, or the username in the provider must be superuser.
ConnectionLimit int
How many concurrent connections can be established to this database. -1 (the default) means no limit.
Encoding Changes to this property will trigger replacement. string
Character set encoding to use in the new database
IsTemplate bool
If true, then this database can be cloned by any user with CREATEDB privileges; if false (the default), then only superusers or the owner of the database can clone it.
LcCollate Changes to this property will trigger replacement. string
Collation order (LC_COLLATE) to use in the new database
LcCtype Changes to this property will trigger replacement. string
Character classification (LC_CTYPE) to use in the new database
Name string
The name of the database. Must be unique on the PostgreSQL server instance where it is configured.
Owner string
The role name of the user who will own the database, or DEFAULT to use the default (namely, the user executing the command). To create a database owned by another role or to change the owner of an existing database, you must be a direct or indirect member of the specified role, or the username in the provider is a superuser.
TablespaceName string
The name of the tablespace that will be associated with the database, or DEFAULT to use the template database's tablespace. This tablespace will be the default tablespace used for objects created in this database.
Template Changes to this property will trigger replacement. string
The name of the template from which to create the new database
AllowConnections bool
If false then no one can connect to this database. The default is true, allowing connections (except as restricted by other mechanisms, such as GRANT or REVOKE CONNECT).
AlterObjectOwnership bool
If true, the change of the database owner will also include a reassignment of the ownership of preexisting objects like tables or sequences from the previous owner to the new one. If set to false (the default), then the previous database owner will still hold the ownership of the objects in that database. To alter existing objects in the database, you must be a direct or indirect member of the specified role, or the username in the provider must be superuser.
ConnectionLimit int
How many concurrent connections can be established to this database. -1 (the default) means no limit.
Encoding Changes to this property will trigger replacement. string
Character set encoding to use in the new database
IsTemplate bool
If true, then this database can be cloned by any user with CREATEDB privileges; if false (the default), then only superusers or the owner of the database can clone it.
LcCollate Changes to this property will trigger replacement. string
Collation order (LC_COLLATE) to use in the new database
LcCtype Changes to this property will trigger replacement. string
Character classification (LC_CTYPE) to use in the new database
Name string
The name of the database. Must be unique on the PostgreSQL server instance where it is configured.
Owner string
The role name of the user who will own the database, or DEFAULT to use the default (namely, the user executing the command). To create a database owned by another role or to change the owner of an existing database, you must be a direct or indirect member of the specified role, or the username in the provider is a superuser.
TablespaceName string
The name of the tablespace that will be associated with the database, or DEFAULT to use the template database's tablespace. This tablespace will be the default tablespace used for objects created in this database.
Template Changes to this property will trigger replacement. string
The name of the template from which to create the new database
allowConnections Boolean
If false then no one can connect to this database. The default is true, allowing connections (except as restricted by other mechanisms, such as GRANT or REVOKE CONNECT).
alterObjectOwnership Boolean
If true, the change of the database owner will also include a reassignment of the ownership of preexisting objects like tables or sequences from the previous owner to the new one. If set to false (the default), then the previous database owner will still hold the ownership of the objects in that database. To alter existing objects in the database, you must be a direct or indirect member of the specified role, or the username in the provider must be superuser.
connectionLimit Integer
How many concurrent connections can be established to this database. -1 (the default) means no limit.
encoding Changes to this property will trigger replacement. String
Character set encoding to use in the new database
isTemplate Boolean
If true, then this database can be cloned by any user with CREATEDB privileges; if false (the default), then only superusers or the owner of the database can clone it.
lcCollate Changes to this property will trigger replacement. String
Collation order (LC_COLLATE) to use in the new database
lcCtype Changes to this property will trigger replacement. String
Character classification (LC_CTYPE) to use in the new database
name String
The name of the database. Must be unique on the PostgreSQL server instance where it is configured.
owner String
The role name of the user who will own the database, or DEFAULT to use the default (namely, the user executing the command). To create a database owned by another role or to change the owner of an existing database, you must be a direct or indirect member of the specified role, or the username in the provider is a superuser.
tablespaceName String
The name of the tablespace that will be associated with the database, or DEFAULT to use the template database's tablespace. This tablespace will be the default tablespace used for objects created in this database.
template Changes to this property will trigger replacement. String
The name of the template from which to create the new database
allowConnections boolean
If false then no one can connect to this database. The default is true, allowing connections (except as restricted by other mechanisms, such as GRANT or REVOKE CONNECT).
alterObjectOwnership boolean
If true, the change of the database owner will also include a reassignment of the ownership of preexisting objects like tables or sequences from the previous owner to the new one. If set to false (the default), then the previous database owner will still hold the ownership of the objects in that database. To alter existing objects in the database, you must be a direct or indirect member of the specified role, or the username in the provider must be superuser.
connectionLimit number
How many concurrent connections can be established to this database. -1 (the default) means no limit.
encoding Changes to this property will trigger replacement. string
Character set encoding to use in the new database
isTemplate boolean
If true, then this database can be cloned by any user with CREATEDB privileges; if false (the default), then only superusers or the owner of the database can clone it.
lcCollate Changes to this property will trigger replacement. string
Collation order (LC_COLLATE) to use in the new database
lcCtype Changes to this property will trigger replacement. string
Character classification (LC_CTYPE) to use in the new database
name string
The name of the database. Must be unique on the PostgreSQL server instance where it is configured.
owner string
The role name of the user who will own the database, or DEFAULT to use the default (namely, the user executing the command). To create a database owned by another role or to change the owner of an existing database, you must be a direct or indirect member of the specified role, or the username in the provider is a superuser.
tablespaceName string
The name of the tablespace that will be associated with the database, or DEFAULT to use the template database's tablespace. This tablespace will be the default tablespace used for objects created in this database.
template Changes to this property will trigger replacement. string
The name of the template from which to create the new database
allow_connections bool
If false then no one can connect to this database. The default is true, allowing connections (except as restricted by other mechanisms, such as GRANT or REVOKE CONNECT).
alter_object_ownership bool
If true, the change of the database owner will also include a reassignment of the ownership of preexisting objects like tables or sequences from the previous owner to the new one. If set to false (the default), then the previous database owner will still hold the ownership of the objects in that database. To alter existing objects in the database, you must be a direct or indirect member of the specified role, or the username in the provider must be superuser.
connection_limit int
How many concurrent connections can be established to this database. -1 (the default) means no limit.
encoding Changes to this property will trigger replacement. str
Character set encoding to use in the new database
is_template bool
If true, then this database can be cloned by any user with CREATEDB privileges; if false (the default), then only superusers or the owner of the database can clone it.
lc_collate Changes to this property will trigger replacement. str
Collation order (LC_COLLATE) to use in the new database
lc_ctype Changes to this property will trigger replacement. str
Character classification (LC_CTYPE) to use in the new database
name str
The name of the database. Must be unique on the PostgreSQL server instance where it is configured.
owner str
The role name of the user who will own the database, or DEFAULT to use the default (namely, the user executing the command). To create a database owned by another role or to change the owner of an existing database, you must be a direct or indirect member of the specified role, or the username in the provider is a superuser.
tablespace_name str
The name of the tablespace that will be associated with the database, or DEFAULT to use the template database's tablespace. This tablespace will be the default tablespace used for objects created in this database.
template Changes to this property will trigger replacement. str
The name of the template from which to create the new database
allowConnections Boolean
If false then no one can connect to this database. The default is true, allowing connections (except as restricted by other mechanisms, such as GRANT or REVOKE CONNECT).
alterObjectOwnership Boolean
If true, the change of the database owner will also include a reassignment of the ownership of preexisting objects like tables or sequences from the previous owner to the new one. If set to false (the default), then the previous database owner will still hold the ownership of the objects in that database. To alter existing objects in the database, you must be a direct or indirect member of the specified role, or the username in the provider must be superuser.
connectionLimit Number
How many concurrent connections can be established to this database. -1 (the default) means no limit.
encoding Changes to this property will trigger replacement. String
Character set encoding to use in the new database
isTemplate Boolean
If true, then this database can be cloned by any user with CREATEDB privileges; if false (the default), then only superusers or the owner of the database can clone it.
lcCollate Changes to this property will trigger replacement. String
Collation order (LC_COLLATE) to use in the new database
lcCtype Changes to this property will trigger replacement. String
Character classification (LC_CTYPE) to use in the new database
name String
The name of the database. Must be unique on the PostgreSQL server instance where it is configured.
owner String
The role name of the user who will own the database, or DEFAULT to use the default (namely, the user executing the command). To create a database owned by another role or to change the owner of an existing database, you must be a direct or indirect member of the specified role, or the username in the provider is a superuser.
tablespaceName String
The name of the tablespace that will be associated with the database, or DEFAULT to use the template database's tablespace. This tablespace will be the default tablespace used for objects created in this database.
template Changes to this property will trigger replacement. String
The name of the template from which to create the new database

Outputs

All input properties are implicitly available as output properties. Additionally, the Database 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 string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing Database Resource

Get an existing Database resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: DatabaseState, opts?: CustomResourceOptions): Database
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        allow_connections: Optional[bool] = None,
        alter_object_ownership: Optional[bool] = None,
        connection_limit: Optional[int] = None,
        encoding: Optional[str] = None,
        is_template: Optional[bool] = None,
        lc_collate: Optional[str] = None,
        lc_ctype: Optional[str] = None,
        name: Optional[str] = None,
        owner: Optional[str] = None,
        tablespace_name: Optional[str] = None,
        template: Optional[str] = None) -> Database
func GetDatabase(ctx *Context, name string, id IDInput, state *DatabaseState, opts ...ResourceOption) (*Database, error)
public static Database Get(string name, Input<string> id, DatabaseState? state, CustomResourceOptions? opts = null)
public static Database get(String name, Output<String> id, DatabaseState state, CustomResourceOptions options)
resources:  _:    type: postgresql:Database    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AllowConnections bool
If false then no one can connect to this database. The default is true, allowing connections (except as restricted by other mechanisms, such as GRANT or REVOKE CONNECT).
AlterObjectOwnership bool
If true, the change of the database owner will also include a reassignment of the ownership of preexisting objects like tables or sequences from the previous owner to the new one. If set to false (the default), then the previous database owner will still hold the ownership of the objects in that database. To alter existing objects in the database, you must be a direct or indirect member of the specified role, or the username in the provider must be superuser.
ConnectionLimit int
How many concurrent connections can be established to this database. -1 (the default) means no limit.
Encoding Changes to this property will trigger replacement. string
Character set encoding to use in the new database
IsTemplate bool
If true, then this database can be cloned by any user with CREATEDB privileges; if false (the default), then only superusers or the owner of the database can clone it.
LcCollate Changes to this property will trigger replacement. string
Collation order (LC_COLLATE) to use in the new database
LcCtype Changes to this property will trigger replacement. string
Character classification (LC_CTYPE) to use in the new database
Name string
The name of the database. Must be unique on the PostgreSQL server instance where it is configured.
Owner string
The role name of the user who will own the database, or DEFAULT to use the default (namely, the user executing the command). To create a database owned by another role or to change the owner of an existing database, you must be a direct or indirect member of the specified role, or the username in the provider is a superuser.
TablespaceName string
The name of the tablespace that will be associated with the database, or DEFAULT to use the template database's tablespace. This tablespace will be the default tablespace used for objects created in this database.
Template Changes to this property will trigger replacement. string
The name of the template from which to create the new database
AllowConnections bool
If false then no one can connect to this database. The default is true, allowing connections (except as restricted by other mechanisms, such as GRANT or REVOKE CONNECT).
AlterObjectOwnership bool
If true, the change of the database owner will also include a reassignment of the ownership of preexisting objects like tables or sequences from the previous owner to the new one. If set to false (the default), then the previous database owner will still hold the ownership of the objects in that database. To alter existing objects in the database, you must be a direct or indirect member of the specified role, or the username in the provider must be superuser.
ConnectionLimit int
How many concurrent connections can be established to this database. -1 (the default) means no limit.
Encoding Changes to this property will trigger replacement. string
Character set encoding to use in the new database
IsTemplate bool
If true, then this database can be cloned by any user with CREATEDB privileges; if false (the default), then only superusers or the owner of the database can clone it.
LcCollate Changes to this property will trigger replacement. string
Collation order (LC_COLLATE) to use in the new database
LcCtype Changes to this property will trigger replacement. string
Character classification (LC_CTYPE) to use in the new database
Name string
The name of the database. Must be unique on the PostgreSQL server instance where it is configured.
Owner string
The role name of the user who will own the database, or DEFAULT to use the default (namely, the user executing the command). To create a database owned by another role or to change the owner of an existing database, you must be a direct or indirect member of the specified role, or the username in the provider is a superuser.
TablespaceName string
The name of the tablespace that will be associated with the database, or DEFAULT to use the template database's tablespace. This tablespace will be the default tablespace used for objects created in this database.
Template Changes to this property will trigger replacement. string
The name of the template from which to create the new database
allowConnections Boolean
If false then no one can connect to this database. The default is true, allowing connections (except as restricted by other mechanisms, such as GRANT or REVOKE CONNECT).
alterObjectOwnership Boolean
If true, the change of the database owner will also include a reassignment of the ownership of preexisting objects like tables or sequences from the previous owner to the new one. If set to false (the default), then the previous database owner will still hold the ownership of the objects in that database. To alter existing objects in the database, you must be a direct or indirect member of the specified role, or the username in the provider must be superuser.
connectionLimit Integer
How many concurrent connections can be established to this database. -1 (the default) means no limit.
encoding Changes to this property will trigger replacement. String
Character set encoding to use in the new database
isTemplate Boolean
If true, then this database can be cloned by any user with CREATEDB privileges; if false (the default), then only superusers or the owner of the database can clone it.
lcCollate Changes to this property will trigger replacement. String
Collation order (LC_COLLATE) to use in the new database
lcCtype Changes to this property will trigger replacement. String
Character classification (LC_CTYPE) to use in the new database
name String
The name of the database. Must be unique on the PostgreSQL server instance where it is configured.
owner String
The role name of the user who will own the database, or DEFAULT to use the default (namely, the user executing the command). To create a database owned by another role or to change the owner of an existing database, you must be a direct or indirect member of the specified role, or the username in the provider is a superuser.
tablespaceName String
The name of the tablespace that will be associated with the database, or DEFAULT to use the template database's tablespace. This tablespace will be the default tablespace used for objects created in this database.
template Changes to this property will trigger replacement. String
The name of the template from which to create the new database
allowConnections boolean
If false then no one can connect to this database. The default is true, allowing connections (except as restricted by other mechanisms, such as GRANT or REVOKE CONNECT).
alterObjectOwnership boolean
If true, the change of the database owner will also include a reassignment of the ownership of preexisting objects like tables or sequences from the previous owner to the new one. If set to false (the default), then the previous database owner will still hold the ownership of the objects in that database. To alter existing objects in the database, you must be a direct or indirect member of the specified role, or the username in the provider must be superuser.
connectionLimit number
How many concurrent connections can be established to this database. -1 (the default) means no limit.
encoding Changes to this property will trigger replacement. string
Character set encoding to use in the new database
isTemplate boolean
If true, then this database can be cloned by any user with CREATEDB privileges; if false (the default), then only superusers or the owner of the database can clone it.
lcCollate Changes to this property will trigger replacement. string
Collation order (LC_COLLATE) to use in the new database
lcCtype Changes to this property will trigger replacement. string
Character classification (LC_CTYPE) to use in the new database
name string
The name of the database. Must be unique on the PostgreSQL server instance where it is configured.
owner string
The role name of the user who will own the database, or DEFAULT to use the default (namely, the user executing the command). To create a database owned by another role or to change the owner of an existing database, you must be a direct or indirect member of the specified role, or the username in the provider is a superuser.
tablespaceName string
The name of the tablespace that will be associated with the database, or DEFAULT to use the template database's tablespace. This tablespace will be the default tablespace used for objects created in this database.
template Changes to this property will trigger replacement. string
The name of the template from which to create the new database
allow_connections bool
If false then no one can connect to this database. The default is true, allowing connections (except as restricted by other mechanisms, such as GRANT or REVOKE CONNECT).
alter_object_ownership bool
If true, the change of the database owner will also include a reassignment of the ownership of preexisting objects like tables or sequences from the previous owner to the new one. If set to false (the default), then the previous database owner will still hold the ownership of the objects in that database. To alter existing objects in the database, you must be a direct or indirect member of the specified role, or the username in the provider must be superuser.
connection_limit int
How many concurrent connections can be established to this database. -1 (the default) means no limit.
encoding Changes to this property will trigger replacement. str
Character set encoding to use in the new database
is_template bool
If true, then this database can be cloned by any user with CREATEDB privileges; if false (the default), then only superusers or the owner of the database can clone it.
lc_collate Changes to this property will trigger replacement. str
Collation order (LC_COLLATE) to use in the new database
lc_ctype Changes to this property will trigger replacement. str
Character classification (LC_CTYPE) to use in the new database
name str
The name of the database. Must be unique on the PostgreSQL server instance where it is configured.
owner str
The role name of the user who will own the database, or DEFAULT to use the default (namely, the user executing the command). To create a database owned by another role or to change the owner of an existing database, you must be a direct or indirect member of the specified role, or the username in the provider is a superuser.
tablespace_name str
The name of the tablespace that will be associated with the database, or DEFAULT to use the template database's tablespace. This tablespace will be the default tablespace used for objects created in this database.
template Changes to this property will trigger replacement. str
The name of the template from which to create the new database
allowConnections Boolean
If false then no one can connect to this database. The default is true, allowing connections (except as restricted by other mechanisms, such as GRANT or REVOKE CONNECT).
alterObjectOwnership Boolean
If true, the change of the database owner will also include a reassignment of the ownership of preexisting objects like tables or sequences from the previous owner to the new one. If set to false (the default), then the previous database owner will still hold the ownership of the objects in that database. To alter existing objects in the database, you must be a direct or indirect member of the specified role, or the username in the provider must be superuser.
connectionLimit Number
How many concurrent connections can be established to this database. -1 (the default) means no limit.
encoding Changes to this property will trigger replacement. String
Character set encoding to use in the new database
isTemplate Boolean
If true, then this database can be cloned by any user with CREATEDB privileges; if false (the default), then only superusers or the owner of the database can clone it.
lcCollate Changes to this property will trigger replacement. String
Collation order (LC_COLLATE) to use in the new database
lcCtype Changes to this property will trigger replacement. String
Character classification (LC_CTYPE) to use in the new database
name String
The name of the database. Must be unique on the PostgreSQL server instance where it is configured.
owner String
The role name of the user who will own the database, or DEFAULT to use the default (namely, the user executing the command). To create a database owned by another role or to change the owner of an existing database, you must be a direct or indirect member of the specified role, or the username in the provider is a superuser.
tablespaceName String
The name of the tablespace that will be associated with the database, or DEFAULT to use the template database's tablespace. This tablespace will be the default tablespace used for objects created in this database.
template Changes to this property will trigger replacement. String
The name of the template from which to create the new database

Package Details

Repository
PostgreSQL pulumi/pulumi-postgresql
License
Apache-2.0
Notes
This Pulumi package is based on the postgresql Terraform Provider.