1. Packages
  2. Databricks Provider
  3. API Docs
  4. PostgresRole
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

    Public Beta

    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.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}
    ProviderConfig PostgresRoleProviderConfig
    Configure the provider for management through account provider.
    RoleId 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 PostgresRoleSpec
    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}
    ProviderConfig PostgresRoleProviderConfigArgs
    Configure the provider for management through account provider.
    RoleId 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 PostgresRoleSpecArgs
    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}
    providerConfig PostgresRoleProviderConfig
    Configure the provider for management through account provider.
    roleId 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 PostgresRoleSpec
    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}
    providerConfig PostgresRoleProviderConfig
    Configure the provider for management through account provider.
    roleId 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 PostgresRoleSpec
    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 PostgresRoleProviderConfigArgs
    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 PostgresRoleSpecArgs
    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}
    providerConfig Property Map
    Configure the provider for management through account provider.
    roleId 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:

    CreateTime 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 PostgresRoleStatus
    (RoleRoleStatus) - Current status of the role, including its identity type, authentication method, and role attributes
    UpdateTime string
    (string)
    CreateTime 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 PostgresRoleStatus
    (RoleRoleStatus) - Current status of the role, including its identity type, authentication method, and role attributes
    UpdateTime string
    (string)
    createTime 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 PostgresRoleStatus
    (RoleRoleStatus) - Current status of the role, including its identity type, authentication method, and role attributes
    updateTime String
    (string)
    createTime 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 PostgresRoleStatus
    (RoleRoleStatus) - Current status of the role, including its identity type, authentication method, and role attributes
    updateTime 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 PostgresRoleStatus
    (RoleRoleStatus) - Current status of the role, including its identity type, authentication method, and role attributes
    update_time str
    (string)
    createTime 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
    updateTime 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) -> PostgresRole
    func 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.
    The following state arguments are supported:
    CreateTime 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}
    ProviderConfig PostgresRoleProviderConfig
    Configure the provider for management through account provider.
    RoleId 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 PostgresRoleSpec
    The spec contains the role configuration, including identity type, authentication method, and role attributes
    Status PostgresRoleStatus
    (RoleRoleStatus) - Current status of the role, including its identity type, authentication method, and role attributes
    UpdateTime string
    (string)
    CreateTime 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}
    ProviderConfig PostgresRoleProviderConfigArgs
    Configure the provider for management through account provider.
    RoleId 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 PostgresRoleSpecArgs
    The spec contains the role configuration, including identity type, authentication method, and role attributes
    Status PostgresRoleStatusArgs
    (RoleRoleStatus) - Current status of the role, including its identity type, authentication method, and role attributes
    UpdateTime string
    (string)
    createTime 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}
    providerConfig PostgresRoleProviderConfig
    Configure the provider for management through account provider.
    roleId 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 PostgresRoleSpec
    The spec contains the role configuration, including identity type, authentication method, and role attributes
    status PostgresRoleStatus
    (RoleRoleStatus) - Current status of the role, including its identity type, authentication method, and role attributes
    updateTime String
    (string)
    createTime 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}
    providerConfig PostgresRoleProviderConfig
    Configure the provider for management through account provider.
    roleId 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 PostgresRoleSpec
    The spec contains the role configuration, including identity type, authentication method, and role attributes
    status PostgresRoleStatus
    (RoleRoleStatus) - Current status of the role, including its identity type, authentication method, and role attributes
    updateTime 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 PostgresRoleProviderConfigArgs
    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 PostgresRoleSpecArgs
    The spec contains the role configuration, including identity type, authentication method, and role attributes
    status PostgresRoleStatusArgs
    (RoleRoleStatus) - Current status of the role, including its identity type, authentication method, and role attributes
    update_time str
    (string)
    createTime 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}
    providerConfig Property Map
    Configure the provider for management through account provider.
    roleId 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
    updateTime String
    (string)

    Supporting Types

    PostgresRoleProviderConfig, PostgresRoleProviderConfigArgs

    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.

    PostgresRoleSpec, PostgresRoleSpecArgs

    PostgresRoleSpecAttributes, PostgresRoleSpecAttributesArgs

    bypassrls Boolean
    createdb Boolean
    createrole Boolean
    bypassrls boolean
    createdb boolean
    createrole boolean
    bypassrls Boolean
    createdb Boolean
    createrole Boolean

    PostgresRoleStatus, PostgresRoleStatusArgs

    PostgresRoleStatusAttributes, PostgresRoleStatusAttributesArgs

    bypassrls Boolean
    createdb Boolean
    createrole Boolean
    bypassrls boolean
    createdb boolean
    createrole boolean
    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 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.