published on Thursday, Mar 19, 2026 by Pulumi
published on Thursday, Mar 19, 2026 by Pulumi
Create PostgresRole Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PostgresRole(name: string, args: PostgresRoleArgs, opts?: CustomResourceOptions);@overload
def PostgresRole(resource_name: str,
args: PostgresRoleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PostgresRole(resource_name: str,
opts: Optional[ResourceOptions] = None,
parent: Optional[str] = None,
provider_config: Optional[PostgresRoleProviderConfigArgs] = None,
role_id: Optional[str] = None,
spec: Optional[PostgresRoleSpecArgs] = None)func NewPostgresRole(ctx *Context, name string, args PostgresRoleArgs, opts ...ResourceOption) (*PostgresRole, error)public PostgresRole(string name, PostgresRoleArgs args, CustomResourceOptions? opts = null)
public PostgresRole(String name, PostgresRoleArgs args)
public PostgresRole(String name, PostgresRoleArgs args, CustomResourceOptions options)
type: databricks:PostgresRole
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 PostgresRoleArgs
- 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 PostgresRoleArgs
- 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 PostgresRoleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PostgresRoleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PostgresRoleArgs
- 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 postgresRoleResource = new Databricks.Index.PostgresRole("postgresRoleResource", new()
{
Parent = "string",
ProviderConfig = new Databricks.Inputs.PostgresRoleProviderConfigArgs
{
WorkspaceId = "string",
},
RoleId = "string",
Spec = new Databricks.Inputs.PostgresRoleSpecArgs
{
Attributes = new Databricks.Inputs.PostgresRoleSpecAttributesArgs
{
Bypassrls = false,
Createdb = false,
Createrole = false,
},
AuthMethod = "string",
IdentityType = "string",
MembershipRoles = new[]
{
"string",
},
PostgresRole = "string",
},
});
example, err := databricks.NewPostgresRole(ctx, "postgresRoleResource", &databricks.PostgresRoleArgs{
Parent: pulumi.String("string"),
ProviderConfig: &databricks.PostgresRoleProviderConfigArgs{
WorkspaceId: pulumi.String("string"),
},
RoleId: pulumi.String("string"),
Spec: &databricks.PostgresRoleSpecArgs{
Attributes: &databricks.PostgresRoleSpecAttributesArgs{
Bypassrls: pulumi.Bool(false),
Createdb: pulumi.Bool(false),
Createrole: pulumi.Bool(false),
},
AuthMethod: pulumi.String("string"),
IdentityType: pulumi.String("string"),
MembershipRoles: pulumi.StringArray{
pulumi.String("string"),
},
PostgresRole: pulumi.String("string"),
},
})
var postgresRoleResource = new PostgresRole("postgresRoleResource", PostgresRoleArgs.builder()
.parent("string")
.providerConfig(PostgresRoleProviderConfigArgs.builder()
.workspaceId("string")
.build())
.roleId("string")
.spec(PostgresRoleSpecArgs.builder()
.attributes(PostgresRoleSpecAttributesArgs.builder()
.bypassrls(false)
.createdb(false)
.createrole(false)
.build())
.authMethod("string")
.identityType("string")
.membershipRoles("string")
.postgresRole("string")
.build())
.build());
postgres_role_resource = databricks.PostgresRole("postgresRoleResource",
parent="string",
provider_config={
"workspace_id": "string",
},
role_id="string",
spec={
"attributes": {
"bypassrls": False,
"createdb": False,
"createrole": False,
},
"auth_method": "string",
"identity_type": "string",
"membership_roles": ["string"],
"postgres_role": "string",
})
const postgresRoleResource = new databricks.PostgresRole("postgresRoleResource", {
parent: "string",
providerConfig: {
workspaceId: "string",
},
roleId: "string",
spec: {
attributes: {
bypassrls: false,
createdb: false,
createrole: false,
},
authMethod: "string",
identityType: "string",
membershipRoles: ["string"],
postgresRole: "string",
},
});
type: databricks:PostgresRole
properties:
parent: string
providerConfig:
workspaceId: string
roleId: string
spec:
attributes:
bypassrls: false
createdb: false
createrole: false
authMethod: string
identityType: string
membershipRoles:
- string
postgresRole: string
PostgresRole 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 PostgresRole resource accepts the following input properties:
- Parent string
- The Branch where this Role exists. Format: projects/{project_id}/branches/{branch_id}
- Provider
Config PostgresRole Provider Config - Configure the provider for management through account provider.
- Role
Id string The ID to use for the Role, which will become the final component of the role's resource name. This ID becomes the role in Postgres.
This value should be 4-63 characters, and valid characters are lowercase letters, numbers, and hyphens, as defined by RFC 1123.
If role_id is not specified in the request, it is generated automatically
- Spec
Postgres
Role Spec - The spec contains the role configuration, including identity type, authentication method, and role attributes
- Parent string
- The Branch where this Role exists. Format: projects/{project_id}/branches/{branch_id}
- Provider
Config PostgresRole Provider Config Args - Configure the provider for management through account provider.
- Role
Id string The ID to use for the Role, which will become the final component of the role's resource name. This ID becomes the role in Postgres.
This value should be 4-63 characters, and valid characters are lowercase letters, numbers, and hyphens, as defined by RFC 1123.
If role_id is not specified in the request, it is generated automatically
- Spec
Postgres
Role Spec Args - The spec contains the role configuration, including identity type, authentication method, and role attributes
- parent String
- The Branch where this Role exists. Format: projects/{project_id}/branches/{branch_id}
- provider
Config PostgresRole Provider Config - Configure the provider for management through account provider.
- role
Id String The ID to use for the Role, which will become the final component of the role's resource name. This ID becomes the role in Postgres.
This value should be 4-63 characters, and valid characters are lowercase letters, numbers, and hyphens, as defined by RFC 1123.
If role_id is not specified in the request, it is generated automatically
- spec
Postgres
Role Spec - The spec contains the role configuration, including identity type, authentication method, and role attributes
- parent string
- The Branch where this Role exists. Format: projects/{project_id}/branches/{branch_id}
- provider
Config PostgresRole Provider Config - Configure the provider for management through account provider.
- role
Id string The ID to use for the Role, which will become the final component of the role's resource name. This ID becomes the role in Postgres.
This value should be 4-63 characters, and valid characters are lowercase letters, numbers, and hyphens, as defined by RFC 1123.
If role_id is not specified in the request, it is generated automatically
- spec
Postgres
Role Spec - The spec contains the role configuration, including identity type, authentication method, and role attributes
- parent str
- The Branch where this Role exists. Format: projects/{project_id}/branches/{branch_id}
- provider_
config PostgresRole Provider Config Args - Configure the provider for management through account provider.
- role_
id str The ID to use for the Role, which will become the final component of the role's resource name. This ID becomes the role in Postgres.
This value should be 4-63 characters, and valid characters are lowercase letters, numbers, and hyphens, as defined by RFC 1123.
If role_id is not specified in the request, it is generated automatically
- spec
Postgres
Role Spec Args - The spec contains the role configuration, including identity type, authentication method, and role attributes
- parent String
- The Branch where this Role exists. Format: projects/{project_id}/branches/{branch_id}
- provider
Config Property Map - Configure the provider for management through account provider.
- role
Id String The ID to use for the Role, which will become the final component of the role's resource name. This ID becomes the role in Postgres.
This value should be 4-63 characters, and valid characters are lowercase letters, numbers, and hyphens, as defined by RFC 1123.
If role_id is not specified in the request, it is generated automatically
- spec Property Map
- The spec contains the role configuration, including identity type, authentication method, and role attributes
Outputs
All input properties are implicitly available as output properties. Additionally, the PostgresRole resource produces the following output properties:
- Create
Time string - (string)
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- (string) - Output only. The full resource path of the role. Format: projects/{project_id}/branches/{branch_id}/roles/{role_id}
- Status
Postgres
Role Status - (RoleRoleStatus) - Current status of the role, including its identity type, authentication method, and role attributes
- Update
Time string - (string)
- Create
Time string - (string)
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- (string) - Output only. The full resource path of the role. Format: projects/{project_id}/branches/{branch_id}/roles/{role_id}
- Status
Postgres
Role Status - (RoleRoleStatus) - Current status of the role, including its identity type, authentication method, and role attributes
- Update
Time string - (string)
- create
Time String - (string)
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- (string) - Output only. The full resource path of the role. Format: projects/{project_id}/branches/{branch_id}/roles/{role_id}
- status
Postgres
Role Status - (RoleRoleStatus) - Current status of the role, including its identity type, authentication method, and role attributes
- update
Time String - (string)
- create
Time string - (string)
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- (string) - Output only. The full resource path of the role. Format: projects/{project_id}/branches/{branch_id}/roles/{role_id}
- status
Postgres
Role Status - (RoleRoleStatus) - Current status of the role, including its identity type, authentication method, and role attributes
- update
Time string - (string)
- create_
time str - (string)
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- (string) - Output only. The full resource path of the role. Format: projects/{project_id}/branches/{branch_id}/roles/{role_id}
- status
Postgres
Role Status - (RoleRoleStatus) - Current status of the role, including its identity type, authentication method, and role attributes
- update_
time str - (string)
- create
Time String - (string)
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- (string) - Output only. The full resource path of the role. Format: projects/{project_id}/branches/{branch_id}/roles/{role_id}
- status Property Map
- (RoleRoleStatus) - Current status of the role, including its identity type, authentication method, and role attributes
- update
Time String - (string)
Look up Existing PostgresRole Resource
Get an existing PostgresRole 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?: PostgresRoleState, opts?: CustomResourceOptions): PostgresRole@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
create_time: Optional[str] = None,
name: Optional[str] = None,
parent: Optional[str] = None,
provider_config: Optional[PostgresRoleProviderConfigArgs] = None,
role_id: Optional[str] = None,
spec: Optional[PostgresRoleSpecArgs] = None,
status: Optional[PostgresRoleStatusArgs] = None,
update_time: Optional[str] = None) -> PostgresRolefunc GetPostgresRole(ctx *Context, name string, id IDInput, state *PostgresRoleState, opts ...ResourceOption) (*PostgresRole, error)public static PostgresRole Get(string name, Input<string> id, PostgresRoleState? state, CustomResourceOptions? opts = null)public static PostgresRole get(String name, Output<String> id, PostgresRoleState state, CustomResourceOptions options)resources: _: type: databricks:PostgresRole 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)
- Name string
- (string) - Output only. The full resource path of the role. Format: projects/{project_id}/branches/{branch_id}/roles/{role_id}
- Parent string
- The Branch where this Role exists. Format: projects/{project_id}/branches/{branch_id}
- Provider
Config PostgresRole Provider Config - Configure the provider for management through account provider.
- Role
Id string The ID to use for the Role, which will become the final component of the role's resource name. This ID becomes the role in Postgres.
This value should be 4-63 characters, and valid characters are lowercase letters, numbers, and hyphens, as defined by RFC 1123.
If role_id is not specified in the request, it is generated automatically
- Spec
Postgres
Role Spec - The spec contains the role configuration, including identity type, authentication method, and role attributes
- Status
Postgres
Role Status - (RoleRoleStatus) - Current status of the role, including its identity type, authentication method, and role attributes
- Update
Time string - (string)
- Create
Time string - (string)
- Name string
- (string) - Output only. The full resource path of the role. Format: projects/{project_id}/branches/{branch_id}/roles/{role_id}
- Parent string
- The Branch where this Role exists. Format: projects/{project_id}/branches/{branch_id}
- Provider
Config PostgresRole Provider Config Args - Configure the provider for management through account provider.
- Role
Id string The ID to use for the Role, which will become the final component of the role's resource name. This ID becomes the role in Postgres.
This value should be 4-63 characters, and valid characters are lowercase letters, numbers, and hyphens, as defined by RFC 1123.
If role_id is not specified in the request, it is generated automatically
- Spec
Postgres
Role Spec Args - The spec contains the role configuration, including identity type, authentication method, and role attributes
- Status
Postgres
Role Status Args - (RoleRoleStatus) - Current status of the role, including its identity type, authentication method, and role attributes
- Update
Time string - (string)
- create
Time String - (string)
- name String
- (string) - Output only. The full resource path of the role. Format: projects/{project_id}/branches/{branch_id}/roles/{role_id}
- parent String
- The Branch where this Role exists. Format: projects/{project_id}/branches/{branch_id}
- provider
Config PostgresRole Provider Config - Configure the provider for management through account provider.
- role
Id String The ID to use for the Role, which will become the final component of the role's resource name. This ID becomes the role in Postgres.
This value should be 4-63 characters, and valid characters are lowercase letters, numbers, and hyphens, as defined by RFC 1123.
If role_id is not specified in the request, it is generated automatically
- spec
Postgres
Role Spec - The spec contains the role configuration, including identity type, authentication method, and role attributes
- status
Postgres
Role Status - (RoleRoleStatus) - Current status of the role, including its identity type, authentication method, and role attributes
- update
Time String - (string)
- create
Time string - (string)
- name string
- (string) - Output only. The full resource path of the role. Format: projects/{project_id}/branches/{branch_id}/roles/{role_id}
- parent string
- The Branch where this Role exists. Format: projects/{project_id}/branches/{branch_id}
- provider
Config PostgresRole Provider Config - Configure the provider for management through account provider.
- role
Id string The ID to use for the Role, which will become the final component of the role's resource name. This ID becomes the role in Postgres.
This value should be 4-63 characters, and valid characters are lowercase letters, numbers, and hyphens, as defined by RFC 1123.
If role_id is not specified in the request, it is generated automatically
- spec
Postgres
Role Spec - The spec contains the role configuration, including identity type, authentication method, and role attributes
- status
Postgres
Role Status - (RoleRoleStatus) - Current status of the role, including its identity type, authentication method, and role attributes
- update
Time string - (string)
- create_
time str - (string)
- name str
- (string) - Output only. The full resource path of the role. Format: projects/{project_id}/branches/{branch_id}/roles/{role_id}
- parent str
- The Branch where this Role exists. Format: projects/{project_id}/branches/{branch_id}
- provider_
config PostgresRole Provider Config Args - Configure the provider for management through account provider.
- role_
id str The ID to use for the Role, which will become the final component of the role's resource name. This ID becomes the role in Postgres.
This value should be 4-63 characters, and valid characters are lowercase letters, numbers, and hyphens, as defined by RFC 1123.
If role_id is not specified in the request, it is generated automatically
- spec
Postgres
Role Spec Args - The spec contains the role configuration, including identity type, authentication method, and role attributes
- status
Postgres
Role Status Args - (RoleRoleStatus) - Current status of the role, including its identity type, authentication method, and role attributes
- update_
time str - (string)
- create
Time String - (string)
- name String
- (string) - Output only. The full resource path of the role. Format: projects/{project_id}/branches/{branch_id}/roles/{role_id}
- parent String
- The Branch where this Role exists. Format: projects/{project_id}/branches/{branch_id}
- provider
Config Property Map - Configure the provider for management through account provider.
- role
Id String The ID to use for the Role, which will become the final component of the role's resource name. This ID becomes the role in Postgres.
This value should be 4-63 characters, and valid characters are lowercase letters, numbers, and hyphens, as defined by RFC 1123.
If role_id is not specified in the request, it is generated automatically
- spec Property Map
- The spec contains the role configuration, including identity type, authentication method, and role attributes
- status Property Map
- (RoleRoleStatus) - Current status of the role, including its identity type, authentication method, and role attributes
- update
Time String - (string)
Supporting Types
PostgresRoleProviderConfig, PostgresRoleProviderConfigArgs
- 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.
PostgresRoleSpec, PostgresRoleSpecArgs
- Attributes
Postgres
Role Spec Attributes - Auth
Method string - Identity
Type string - Membership
Roles List<string> - Postgres
Role string
- Attributes
Postgres
Role Spec Attributes - Auth
Method string - Identity
Type string - Membership
Roles []string - Postgres
Role string
- attributes
Postgres
Role Spec Attributes - auth
Method String - identity
Type String - membership
Roles List<String> - postgres
Role String
- attributes
Postgres
Role Spec Attributes - auth
Method string - identity
Type string - membership
Roles string[] - postgres
Role string
- attributes
Postgres
Role Spec Attributes - auth_
method str - identity_
type str - membership_
roles Sequence[str] - postgres_
role str
- attributes Property Map
- auth
Method String - identity
Type String - membership
Roles List<String> - postgres
Role String
PostgresRoleSpecAttributes, PostgresRoleSpecAttributesArgs
- Bypassrls bool
- Createdb bool
- Createrole bool
- Bypassrls bool
- Createdb bool
- Createrole bool
- bypassrls Boolean
- createdb Boolean
- createrole Boolean
- bypassrls boolean
- createdb boolean
- createrole boolean
- bypassrls bool
- createdb bool
- createrole bool
- bypassrls Boolean
- createdb Boolean
- createrole Boolean
PostgresRoleStatus, PostgresRoleStatusArgs
- Attributes
Postgres
Role Status Attributes - Auth
Method string - Identity
Type string - Membership
Roles List<string> - Postgres
Role string
- Attributes
Postgres
Role Status Attributes - Auth
Method string - Identity
Type string - Membership
Roles []string - Postgres
Role string
- attributes
Postgres
Role Status Attributes - auth
Method String - identity
Type String - membership
Roles List<String> - postgres
Role String
- attributes
Postgres
Role Status Attributes - auth
Method string - identity
Type string - membership
Roles string[] - postgres
Role string
- attributes
Postgres
Role Status Attributes - auth_
method str - identity_
type str - membership_
roles Sequence[str] - postgres_
role str
- attributes Property Map
- auth
Method String - identity
Type String - membership
Roles List<String> - postgres
Role String
PostgresRoleStatusAttributes, PostgresRoleStatusAttributesArgs
- Bypassrls bool
- Createdb bool
- Createrole bool
- Bypassrls bool
- Createdb bool
- Createrole bool
- bypassrls Boolean
- createdb Boolean
- createrole Boolean
- bypassrls boolean
- createdb boolean
- createrole boolean
- bypassrls bool
- createdb bool
- createrole bool
- bypassrls Boolean
- createdb Boolean
- createrole Boolean
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
