Skip to content

PostgresRole

laktory.models.resources.databricks.PostgresRole ¤

Bases: PostgresRoleBase

Lakebase Autoscaling (Postgres) Role

Postgres role of a branch, mapped to a Databricks user, service principal or group, or authenticated with a password. An owner role is created implicitly with each branch for the identity that created it: set replace_existing: true to manage it. Removing a managed role from the configuration deletes it. spec.membership_roles replaces the role memberships on every apply. Can also be declared in the roles of a PostgresBranch.

Examples:

import io

from laktory import models

role_yaml = '''
parent: projects/app/branches/production
role_id: role-engineers
spec:
  postgres_role: role-engineers
  identity_type: GROUP
  auth_method: LAKEBASE_OAUTH_V1
'''
role = models.resources.databricks.PostgresRole.model_validate_yaml(
    io.StringIO(role_yaml)
)
References
BASE DESCRIPTION
parent

Branch of the role (projects/{project_id}/branches/{branch_id}). Set automatically when declared in the roles of a branch.

TYPE: str | VariableType DEFAULT: None

provider_config

Configure the provider for management through account provider

TYPE: PostgresRoleProviderConfig | None | VariableType DEFAULT: None

replace_existing

If true, update the role if it already exists instead of returning an error

TYPE: bool | None | VariableType DEFAULT: None

role_id

Part of the resource name

TYPE: str | None | VariableType DEFAULT: None

spec

The spec contains the role configuration, including identity type, authentication method, and role attributes

TYPE: PostgresRoleSpec | None | VariableType DEFAULT: None


laktory.models.resources.databricks.postgresrole.PostgresRoleProviderConfig ¤

Bases: BaseModel

PARAMETER DESCRIPTION
workspace_id

Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with

TYPE: str | None | VariableType DEFAULT: None


laktory.models.resources.databricks.postgresrole.PostgresRoleSpec ¤

Bases: BaseModel

PARAMETER DESCRIPTION
attributes

The PG role attributes associated with the role

TYPE: PostgresRoleSpecAttributes | None | VariableType DEFAULT: None

auth_method

Possible values are: LAKEBASE_OAUTH_V1, NO_LOGIN, PG_PASSWORD_SCRAM_SHA_256

TYPE: str | None | VariableType DEFAULT: None

identity_type

The type of the role. Possible values are: GROUP, SERVICE_PRINCIPAL, USER

TYPE: str | None | VariableType DEFAULT: None

membership_roles

An enum value for a standard role that this role is a member of

TYPE: list[str] | None | VariableType DEFAULT: None

postgres_role

The name of the Postgres role

TYPE: str | None | VariableType DEFAULT: None


laktory.models.resources.databricks.postgresrole.PostgresRoleSpecAttributes ¤

Bases: BaseModel

PARAMETER DESCRIPTION
bypassrls

TYPE: bool | None | VariableType DEFAULT: None

createdb

TYPE: bool | None | VariableType DEFAULT: None

createrole

TYPE: bool | None | VariableType DEFAULT: None