1. Packages
  2. Databricks Provider
  3. API Docs
  4. PostgresDatabase
Viewing docs for Databricks v1.90.0
published on Thursday, Mar 19, 2026 by Pulumi
databricks logo
Viewing docs for Databricks v1.90.0
published on Thursday, Mar 19, 2026 by Pulumi

    Private Preview

    Create PostgresDatabase Resource

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

    Constructor syntax

    new PostgresDatabase(name: string, args: PostgresDatabaseArgs, opts?: CustomResourceOptions);
    @overload
    def PostgresDatabase(resource_name: str,
                         args: PostgresDatabaseArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def PostgresDatabase(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         parent: Optional[str] = None,
                         database_id: Optional[str] = None,
                         provider_config: Optional[PostgresDatabaseProviderConfigArgs] = None,
                         spec: Optional[PostgresDatabaseSpecArgs] = None)
    func NewPostgresDatabase(ctx *Context, name string, args PostgresDatabaseArgs, opts ...ResourceOption) (*PostgresDatabase, error)
    public PostgresDatabase(string name, PostgresDatabaseArgs args, CustomResourceOptions? opts = null)
    public PostgresDatabase(String name, PostgresDatabaseArgs args)
    public PostgresDatabase(String name, PostgresDatabaseArgs args, CustomResourceOptions options)
    
    type: databricks:PostgresDatabase
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args PostgresDatabaseArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args PostgresDatabaseArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args PostgresDatabaseArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PostgresDatabaseArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PostgresDatabaseArgs
    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 postgresDatabaseResource = new Databricks.Index.PostgresDatabase("postgresDatabaseResource", new()
    {
        Parent = "string",
        DatabaseId = "string",
        ProviderConfig = new Databricks.Inputs.PostgresDatabaseProviderConfigArgs
        {
            WorkspaceId = "string",
        },
        Spec = new Databricks.Inputs.PostgresDatabaseSpecArgs
        {
            PostgresDatabase = "string",
            Role = "string",
        },
    });
    
    example, err := databricks.NewPostgresDatabase(ctx, "postgresDatabaseResource", &databricks.PostgresDatabaseArgs{
    	Parent:     pulumi.String("string"),
    	DatabaseId: pulumi.String("string"),
    	ProviderConfig: &databricks.PostgresDatabaseProviderConfigArgs{
    		WorkspaceId: pulumi.String("string"),
    	},
    	Spec: &databricks.PostgresDatabaseSpecArgs{
    		PostgresDatabase: pulumi.String("string"),
    		Role:             pulumi.String("string"),
    	},
    })
    
    var postgresDatabaseResource = new PostgresDatabase("postgresDatabaseResource", PostgresDatabaseArgs.builder()
        .parent("string")
        .databaseId("string")
        .providerConfig(PostgresDatabaseProviderConfigArgs.builder()
            .workspaceId("string")
            .build())
        .spec(PostgresDatabaseSpecArgs.builder()
            .postgresDatabase("string")
            .role("string")
            .build())
        .build());
    
    postgres_database_resource = databricks.PostgresDatabase("postgresDatabaseResource",
        parent="string",
        database_id="string",
        provider_config={
            "workspace_id": "string",
        },
        spec={
            "postgres_database": "string",
            "role": "string",
        })
    
    const postgresDatabaseResource = new databricks.PostgresDatabase("postgresDatabaseResource", {
        parent: "string",
        databaseId: "string",
        providerConfig: {
            workspaceId: "string",
        },
        spec: {
            postgresDatabase: "string",
            role: "string",
        },
    });
    
    type: databricks:PostgresDatabase
    properties:
        databaseId: string
        parent: string
        providerConfig:
            workspaceId: string
        spec:
            postgresDatabase: string
            role: string
    

    PostgresDatabase 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 PostgresDatabase resource accepts the following input properties:

    Parent string
    The branch containing this database. Format: projects/{project_id}/branches/{branch_id}
    DatabaseId string

    The ID to use for the Database, which will become the final component of the database's resource name. This ID becomes the database name in postgres.

    This value should be 4-63 characters, and only use characters available in DNS names, as defined by RFC-1123

    If database_id is not specified in the request, it is generated automatically

    ProviderConfig PostgresDatabaseProviderConfig
    Configure the provider for management through account provider.
    Spec PostgresDatabaseSpec
    The desired state of the Database
    Parent string
    The branch containing this database. Format: projects/{project_id}/branches/{branch_id}
    DatabaseId string

    The ID to use for the Database, which will become the final component of the database's resource name. This ID becomes the database name in postgres.

    This value should be 4-63 characters, and only use characters available in DNS names, as defined by RFC-1123

    If database_id is not specified in the request, it is generated automatically

    ProviderConfig PostgresDatabaseProviderConfigArgs
    Configure the provider for management through account provider.
    Spec PostgresDatabaseSpecArgs
    The desired state of the Database
    parent String
    The branch containing this database. Format: projects/{project_id}/branches/{branch_id}
    databaseId String

    The ID to use for the Database, which will become the final component of the database's resource name. This ID becomes the database name in postgres.

    This value should be 4-63 characters, and only use characters available in DNS names, as defined by RFC-1123

    If database_id is not specified in the request, it is generated automatically

    providerConfig PostgresDatabaseProviderConfig
    Configure the provider for management through account provider.
    spec PostgresDatabaseSpec
    The desired state of the Database
    parent string
    The branch containing this database. Format: projects/{project_id}/branches/{branch_id}
    databaseId string

    The ID to use for the Database, which will become the final component of the database's resource name. This ID becomes the database name in postgres.

    This value should be 4-63 characters, and only use characters available in DNS names, as defined by RFC-1123

    If database_id is not specified in the request, it is generated automatically

    providerConfig PostgresDatabaseProviderConfig
    Configure the provider for management through account provider.
    spec PostgresDatabaseSpec
    The desired state of the Database
    parent str
    The branch containing this database. Format: projects/{project_id}/branches/{branch_id}
    database_id str

    The ID to use for the Database, which will become the final component of the database's resource name. This ID becomes the database name in postgres.

    This value should be 4-63 characters, and only use characters available in DNS names, as defined by RFC-1123

    If database_id is not specified in the request, it is generated automatically

    provider_config PostgresDatabaseProviderConfigArgs
    Configure the provider for management through account provider.
    spec PostgresDatabaseSpecArgs
    The desired state of the Database
    parent String
    The branch containing this database. Format: projects/{project_id}/branches/{branch_id}
    databaseId String

    The ID to use for the Database, which will become the final component of the database's resource name. This ID becomes the database name in postgres.

    This value should be 4-63 characters, and only use characters available in DNS names, as defined by RFC-1123

    If database_id is not specified in the request, it is generated automatically

    providerConfig Property Map
    Configure the provider for management through account provider.
    spec Property Map
    The desired state of the Database

    Outputs

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

    CreateTime string
    (string) - A timestamp indicating when the database was created
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    (string) - The resource name of the database. Format: projects/{project_id}/branches/{branch_id}/databases/{database_id}
    Status PostgresDatabaseStatus
    (DatabaseDatabaseStatus) - The observed state of the Database
    UpdateTime string
    (string) - A timestamp indicating when the database was last updated
    CreateTime string
    (string) - A timestamp indicating when the database was created
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    (string) - The resource name of the database. Format: projects/{project_id}/branches/{branch_id}/databases/{database_id}
    Status PostgresDatabaseStatus
    (DatabaseDatabaseStatus) - The observed state of the Database
    UpdateTime string
    (string) - A timestamp indicating when the database was last updated
    createTime String
    (string) - A timestamp indicating when the database was created
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    (string) - The resource name of the database. Format: projects/{project_id}/branches/{branch_id}/databases/{database_id}
    status PostgresDatabaseStatus
    (DatabaseDatabaseStatus) - The observed state of the Database
    updateTime String
    (string) - A timestamp indicating when the database was last updated
    createTime string
    (string) - A timestamp indicating when the database was created
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    (string) - The resource name of the database. Format: projects/{project_id}/branches/{branch_id}/databases/{database_id}
    status PostgresDatabaseStatus
    (DatabaseDatabaseStatus) - The observed state of the Database
    updateTime string
    (string) - A timestamp indicating when the database was last updated
    create_time str
    (string) - A timestamp indicating when the database was created
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    (string) - The resource name of the database. Format: projects/{project_id}/branches/{branch_id}/databases/{database_id}
    status PostgresDatabaseStatus
    (DatabaseDatabaseStatus) - The observed state of the Database
    update_time str
    (string) - A timestamp indicating when the database was last updated
    createTime String
    (string) - A timestamp indicating when the database was created
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    (string) - The resource name of the database. Format: projects/{project_id}/branches/{branch_id}/databases/{database_id}
    status Property Map
    (DatabaseDatabaseStatus) - The observed state of the Database
    updateTime String
    (string) - A timestamp indicating when the database was last updated

    Look up Existing PostgresDatabase Resource

    Get an existing PostgresDatabase 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?: PostgresDatabaseState, opts?: CustomResourceOptions): PostgresDatabase
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            create_time: Optional[str] = None,
            database_id: Optional[str] = None,
            name: Optional[str] = None,
            parent: Optional[str] = None,
            provider_config: Optional[PostgresDatabaseProviderConfigArgs] = None,
            spec: Optional[PostgresDatabaseSpecArgs] = None,
            status: Optional[PostgresDatabaseStatusArgs] = None,
            update_time: Optional[str] = None) -> PostgresDatabase
    func GetPostgresDatabase(ctx *Context, name string, id IDInput, state *PostgresDatabaseState, opts ...ResourceOption) (*PostgresDatabase, error)
    public static PostgresDatabase Get(string name, Input<string> id, PostgresDatabaseState? state, CustomResourceOptions? opts = null)
    public static PostgresDatabase get(String name, Output<String> id, PostgresDatabaseState state, CustomResourceOptions options)
    resources:  _:    type: databricks:PostgresDatabase    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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:
    CreateTime string
    (string) - A timestamp indicating when the database was created
    DatabaseId string

    The ID to use for the Database, which will become the final component of the database's resource name. This ID becomes the database name in postgres.

    This value should be 4-63 characters, and only use characters available in DNS names, as defined by RFC-1123

    If database_id is not specified in the request, it is generated automatically

    Name string
    (string) - The resource name of the database. Format: projects/{project_id}/branches/{branch_id}/databases/{database_id}
    Parent string
    The branch containing this database. Format: projects/{project_id}/branches/{branch_id}
    ProviderConfig PostgresDatabaseProviderConfig
    Configure the provider for management through account provider.
    Spec PostgresDatabaseSpec
    The desired state of the Database
    Status PostgresDatabaseStatus
    (DatabaseDatabaseStatus) - The observed state of the Database
    UpdateTime string
    (string) - A timestamp indicating when the database was last updated
    CreateTime string
    (string) - A timestamp indicating when the database was created
    DatabaseId string

    The ID to use for the Database, which will become the final component of the database's resource name. This ID becomes the database name in postgres.

    This value should be 4-63 characters, and only use characters available in DNS names, as defined by RFC-1123

    If database_id is not specified in the request, it is generated automatically

    Name string
    (string) - The resource name of the database. Format: projects/{project_id}/branches/{branch_id}/databases/{database_id}
    Parent string
    The branch containing this database. Format: projects/{project_id}/branches/{branch_id}
    ProviderConfig PostgresDatabaseProviderConfigArgs
    Configure the provider for management through account provider.
    Spec PostgresDatabaseSpecArgs
    The desired state of the Database
    Status PostgresDatabaseStatusArgs
    (DatabaseDatabaseStatus) - The observed state of the Database
    UpdateTime string
    (string) - A timestamp indicating when the database was last updated
    createTime String
    (string) - A timestamp indicating when the database was created
    databaseId String

    The ID to use for the Database, which will become the final component of the database's resource name. This ID becomes the database name in postgres.

    This value should be 4-63 characters, and only use characters available in DNS names, as defined by RFC-1123

    If database_id is not specified in the request, it is generated automatically

    name String
    (string) - The resource name of the database. Format: projects/{project_id}/branches/{branch_id}/databases/{database_id}
    parent String
    The branch containing this database. Format: projects/{project_id}/branches/{branch_id}
    providerConfig PostgresDatabaseProviderConfig
    Configure the provider for management through account provider.
    spec PostgresDatabaseSpec
    The desired state of the Database
    status PostgresDatabaseStatus
    (DatabaseDatabaseStatus) - The observed state of the Database
    updateTime String
    (string) - A timestamp indicating when the database was last updated
    createTime string
    (string) - A timestamp indicating when the database was created
    databaseId string

    The ID to use for the Database, which will become the final component of the database's resource name. This ID becomes the database name in postgres.

    This value should be 4-63 characters, and only use characters available in DNS names, as defined by RFC-1123

    If database_id is not specified in the request, it is generated automatically

    name string
    (string) - The resource name of the database. Format: projects/{project_id}/branches/{branch_id}/databases/{database_id}
    parent string
    The branch containing this database. Format: projects/{project_id}/branches/{branch_id}
    providerConfig PostgresDatabaseProviderConfig
    Configure the provider for management through account provider.
    spec PostgresDatabaseSpec
    The desired state of the Database
    status PostgresDatabaseStatus
    (DatabaseDatabaseStatus) - The observed state of the Database
    updateTime string
    (string) - A timestamp indicating when the database was last updated
    create_time str
    (string) - A timestamp indicating when the database was created
    database_id str

    The ID to use for the Database, which will become the final component of the database's resource name. This ID becomes the database name in postgres.

    This value should be 4-63 characters, and only use characters available in DNS names, as defined by RFC-1123

    If database_id is not specified in the request, it is generated automatically

    name str
    (string) - The resource name of the database. Format: projects/{project_id}/branches/{branch_id}/databases/{database_id}
    parent str
    The branch containing this database. Format: projects/{project_id}/branches/{branch_id}
    provider_config PostgresDatabaseProviderConfigArgs
    Configure the provider for management through account provider.
    spec PostgresDatabaseSpecArgs
    The desired state of the Database
    status PostgresDatabaseStatusArgs
    (DatabaseDatabaseStatus) - The observed state of the Database
    update_time str
    (string) - A timestamp indicating when the database was last updated
    createTime String
    (string) - A timestamp indicating when the database was created
    databaseId String

    The ID to use for the Database, which will become the final component of the database's resource name. This ID becomes the database name in postgres.

    This value should be 4-63 characters, and only use characters available in DNS names, as defined by RFC-1123

    If database_id is not specified in the request, it is generated automatically

    name String
    (string) - The resource name of the database. Format: projects/{project_id}/branches/{branch_id}/databases/{database_id}
    parent String
    The branch containing this database. Format: projects/{project_id}/branches/{branch_id}
    providerConfig Property Map
    Configure the provider for management through account provider.
    spec Property Map
    The desired state of the Database
    status Property Map
    (DatabaseDatabaseStatus) - The observed state of the Database
    updateTime String
    (string) - A timestamp indicating when the database was last updated

    Supporting Types

    PostgresDatabaseProviderConfig, PostgresDatabaseProviderConfigArgs

    WorkspaceId string
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
    WorkspaceId string
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
    workspaceId String
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
    workspaceId string
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
    workspace_id str
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
    workspaceId String
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.

    PostgresDatabaseSpec, PostgresDatabaseSpecArgs

    PostgresDatabase string
    Role string
    PostgresDatabase string
    Role string
    postgresDatabase String
    role String
    postgresDatabase string
    role string
    postgresDatabase String
    role String

    PostgresDatabaseStatus, PostgresDatabaseStatusArgs

    PostgresDatabase string
    Role string
    PostgresDatabase string
    Role string
    postgresDatabase String
    role String
    postgresDatabase string
    role string
    postgresDatabase String
    role String

    Package Details

    Repository
    databricks pulumi/pulumi-databricks
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the databricks Terraform Provider.
    databricks logo
    Viewing docs for Databricks v1.90.0
    published on Thursday, Mar 19, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.