published on Thursday, Mar 19, 2026 by Pulumi
published on Thursday, Mar 19, 2026 by Pulumi
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}
- Database
Id 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
- Provider
Config PostgresDatabase Provider Config - Configure the provider for management through account provider.
- Spec
Postgres
Database Spec - The desired state of the Database
- Parent string
- The branch containing this database. Format: projects/{project_id}/branches/{branch_id}
- Database
Id 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
- Provider
Config PostgresDatabase Provider Config Args - Configure the provider for management through account provider.
- Spec
Postgres
Database Spec Args - The desired state of the Database
- parent String
- The branch containing this database. Format: projects/{project_id}/branches/{branch_id}
- database
Id 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
- provider
Config PostgresDatabase Provider Config - Configure the provider for management through account provider.
- spec
Postgres
Database Spec - The desired state of the Database
- parent string
- The branch containing this database. Format: projects/{project_id}/branches/{branch_id}
- database
Id 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
- provider
Config PostgresDatabase Provider Config - Configure the provider for management through account provider.
- spec
Postgres
Database Spec - 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 PostgresDatabase Provider Config Args - Configure the provider for management through account provider.
- spec
Postgres
Database Spec Args - The desired state of the Database
- parent String
- The branch containing this database. Format: projects/{project_id}/branches/{branch_id}
- database
Id 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
- provider
Config 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:
- Create
Time 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
Postgres
Database Status - (DatabaseDatabaseStatus) - The observed state of the Database
- Update
Time string - (string) - A timestamp indicating when the database was last updated
- Create
Time 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
Postgres
Database Status - (DatabaseDatabaseStatus) - The observed state of the Database
- Update
Time string - (string) - A timestamp indicating when the database was last updated
- create
Time 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
Postgres
Database Status - (DatabaseDatabaseStatus) - The observed state of the Database
- update
Time String - (string) - A timestamp indicating when the database was last updated
- create
Time 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
Postgres
Database Status - (DatabaseDatabaseStatus) - The observed state of the Database
- update
Time 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
Postgres
Database Status - (DatabaseDatabaseStatus) - The observed state of the Database
- update_
time str - (string) - A timestamp indicating when the database was last updated
- create
Time 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
- update
Time 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) -> PostgresDatabasefunc 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.
- Create
Time string - (string) - A timestamp indicating when the database was created
- Database
Id 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}
- Provider
Config PostgresDatabase Provider Config - Configure the provider for management through account provider.
- Spec
Postgres
Database Spec - The desired state of the Database
- Status
Postgres
Database Status - (DatabaseDatabaseStatus) - The observed state of the Database
- Update
Time string - (string) - A timestamp indicating when the database was last updated
- Create
Time string - (string) - A timestamp indicating when the database was created
- Database
Id 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}
- Provider
Config PostgresDatabase Provider Config Args - Configure the provider for management through account provider.
- Spec
Postgres
Database Spec Args - The desired state of the Database
- Status
Postgres
Database Status Args - (DatabaseDatabaseStatus) - The observed state of the Database
- Update
Time string - (string) - A timestamp indicating when the database was last updated
- create
Time String - (string) - A timestamp indicating when the database was created
- database
Id 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}
- provider
Config PostgresDatabase Provider Config - Configure the provider for management through account provider.
- spec
Postgres
Database Spec - The desired state of the Database
- status
Postgres
Database Status - (DatabaseDatabaseStatus) - The observed state of the Database
- update
Time String - (string) - A timestamp indicating when the database was last updated
- create
Time string - (string) - A timestamp indicating when the database was created
- database
Id 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}
- provider
Config PostgresDatabase Provider Config - Configure the provider for management through account provider.
- spec
Postgres
Database Spec - The desired state of the Database
- status
Postgres
Database Status - (DatabaseDatabaseStatus) - The observed state of the Database
- update
Time 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 PostgresDatabase Provider Config Args - Configure the provider for management through account provider.
- spec
Postgres
Database Spec Args - The desired state of the Database
- status
Postgres
Database Status Args - (DatabaseDatabaseStatus) - The observed state of the Database
- update_
time str - (string) - A timestamp indicating when the database was last updated
- create
Time String - (string) - A timestamp indicating when the database was created
- database
Id 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}
- provider
Config 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
- update
Time String - (string) - A timestamp indicating when the database was last updated
Supporting Types
PostgresDatabaseProviderConfig, PostgresDatabaseProviderConfigArgs
- Workspace
Id string - Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
- Workspace
Id string - Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
- workspace
Id String - Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
- workspace
Id 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.
- workspace
Id String - Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
PostgresDatabaseSpec, PostgresDatabaseSpecArgs
- Postgres
Database string - Role string
- Postgres
Database string - Role string
- postgres
Database String - role String
- postgres
Database string - role string
- postgres_
database str - role str
- postgres
Database String - role String
PostgresDatabaseStatus, PostgresDatabaseStatusArgs
- Postgres
Database string - Role string
- Postgres
Database string - Role string
- postgres
Database String - role String
- postgres
Database string - role string
- postgres_
database str - role str
- postgres
Database String - role String
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
databricksTerraform Provider.
published on Thursday, Mar 19, 2026 by Pulumi
