1. Packages
  2. Packages
  3. Planetscale Provider
  4. API Docs
  5. PostgresRedactedBranchRole
Viewing docs for planetscale 1.4.0
published on Thursday, Jul 9, 2026 by planetscale
Viewing docs for planetscale 1.4.0
published on Thursday, Jul 9, 2026 by planetscale

    PostgresRedactedBranchRole Resource

    Create PostgresRedactedBranchRole Resource

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

    Constructor syntax

    new PostgresRedactedBranchRole(name: string, args: PostgresRedactedBranchRoleArgs, opts?: CustomResourceOptions);
    @overload
    def PostgresRedactedBranchRole(resource_name: str,
                                   args: PostgresRedactedBranchRoleArgs,
                                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def PostgresRedactedBranchRole(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   branch: Optional[str] = None,
                                   database: Optional[str] = None,
                                   organization: Optional[str] = None,
                                   inherited_roles: Optional[Sequence[str]] = None,
                                   name: Optional[str] = None,
                                   successor: Optional[str] = None,
                                   ttl: Optional[float] = None,
                                   with_replication: Optional[bool] = None)
    func NewPostgresRedactedBranchRole(ctx *Context, name string, args PostgresRedactedBranchRoleArgs, opts ...ResourceOption) (*PostgresRedactedBranchRole, error)
    public PostgresRedactedBranchRole(string name, PostgresRedactedBranchRoleArgs args, CustomResourceOptions? opts = null)
    public PostgresRedactedBranchRole(String name, PostgresRedactedBranchRoleArgs args)
    public PostgresRedactedBranchRole(String name, PostgresRedactedBranchRoleArgs args, CustomResourceOptions options)
    
    type: planetscale:PostgresRedactedBranchRole
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "planetscale_postgresredactedbranchrole" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args PostgresRedactedBranchRoleArgs
    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 PostgresRedactedBranchRoleArgs
    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 PostgresRedactedBranchRoleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PostgresRedactedBranchRoleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PostgresRedactedBranchRoleArgs
    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 postgresRedactedBranchRoleResource = new Planetscale.PostgresRedactedBranchRole("postgresRedactedBranchRoleResource", new()
    {
        Branch = "string",
        Database = "string",
        Organization = "string",
        InheritedRoles = new[]
        {
            "string",
        },
        Name = "string",
        Successor = "string",
        Ttl = 0,
        WithReplication = false,
    });
    
    example, err := planetscale.NewPostgresRedactedBranchRole(ctx, "postgresRedactedBranchRoleResource", &planetscale.PostgresRedactedBranchRoleArgs{
    	Branch:       pulumi.String("string"),
    	Database:     pulumi.String("string"),
    	Organization: pulumi.String("string"),
    	InheritedRoles: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Name:            pulumi.String("string"),
    	Successor:       pulumi.String("string"),
    	Ttl:             pulumi.Float64(0),
    	WithReplication: pulumi.Bool(false),
    })
    
    resource "planetscale_postgresredactedbranchrole" "postgresRedactedBranchRoleResource" {
      branch           = "string"
      database         = "string"
      organization     = "string"
      inherited_roles  = ["string"]
      name             = "string"
      successor        = "string"
      ttl              = 0
      with_replication = false
    }
    
    var postgresRedactedBranchRoleResource = new PostgresRedactedBranchRole("postgresRedactedBranchRoleResource", PostgresRedactedBranchRoleArgs.builder()
        .branch("string")
        .database("string")
        .organization("string")
        .inheritedRoles("string")
        .name("string")
        .successor("string")
        .ttl(0.0)
        .withReplication(false)
        .build());
    
    postgres_redacted_branch_role_resource = planetscale.PostgresRedactedBranchRole("postgresRedactedBranchRoleResource",
        branch="string",
        database="string",
        organization="string",
        inherited_roles=["string"],
        name="string",
        successor="string",
        ttl=float(0),
        with_replication=False)
    
    const postgresRedactedBranchRoleResource = new planetscale.PostgresRedactedBranchRole("postgresRedactedBranchRoleResource", {
        branch: "string",
        database: "string",
        organization: "string",
        inheritedRoles: ["string"],
        name: "string",
        successor: "string",
        ttl: 0,
        withReplication: false,
    });
    
    type: planetscale:PostgresRedactedBranchRole
    properties:
        branch: string
        database: string
        inheritedRoles:
            - string
        name: string
        organization: string
        successor: string
        ttl: 0
        withReplication: false
    

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

    Branch string
    Branch name from list_branches. Example: main.
    Database string
    Database name slug from list_databases. Example: app-db.
    Organization string
    Organization name slug from list_organizations. Example: acme.
    InheritedRoles List<string>
    Roles to inherit from. Requires replacement if changed.
    Name string
    The name of the role
    Successor string
    The optional role to reassign ownership to before dropping
    Ttl double
    Time to live in seconds. Requires replacement if changed.
    WithReplication bool
    Whether the role should have the REPLICATION attribute. Requires replacement if changed.
    Branch string
    Branch name from list_branches. Example: main.
    Database string
    Database name slug from list_databases. Example: app-db.
    Organization string
    Organization name slug from list_organizations. Example: acme.
    InheritedRoles []string
    Roles to inherit from. Requires replacement if changed.
    Name string
    The name of the role
    Successor string
    The optional role to reassign ownership to before dropping
    Ttl float64
    Time to live in seconds. Requires replacement if changed.
    WithReplication bool
    Whether the role should have the REPLICATION attribute. Requires replacement if changed.
    branch string
    Branch name from list_branches. Example: main.
    database string
    Database name slug from list_databases. Example: app-db.
    organization string
    Organization name slug from list_organizations. Example: acme.
    inherited_roles list(string)
    Roles to inherit from. Requires replacement if changed.
    name string
    The name of the role
    successor string
    The optional role to reassign ownership to before dropping
    ttl number
    Time to live in seconds. Requires replacement if changed.
    with_replication bool
    Whether the role should have the REPLICATION attribute. Requires replacement if changed.
    branch String
    Branch name from list_branches. Example: main.
    database String
    Database name slug from list_databases. Example: app-db.
    organization String
    Organization name slug from list_organizations. Example: acme.
    inheritedRoles List<String>
    Roles to inherit from. Requires replacement if changed.
    name String
    The name of the role
    successor String
    The optional role to reassign ownership to before dropping
    ttl Double
    Time to live in seconds. Requires replacement if changed.
    withReplication Boolean
    Whether the role should have the REPLICATION attribute. Requires replacement if changed.
    branch string
    Branch name from list_branches. Example: main.
    database string
    Database name slug from list_databases. Example: app-db.
    organization string
    Organization name slug from list_organizations. Example: acme.
    inheritedRoles string[]
    Roles to inherit from. Requires replacement if changed.
    name string
    The name of the role
    successor string
    The optional role to reassign ownership to before dropping
    ttl number
    Time to live in seconds. Requires replacement if changed.
    withReplication boolean
    Whether the role should have the REPLICATION attribute. Requires replacement if changed.
    branch str
    Branch name from list_branches. Example: main.
    database str
    Database name slug from list_databases. Example: app-db.
    organization str
    Organization name slug from list_organizations. Example: acme.
    inherited_roles Sequence[str]
    Roles to inherit from. Requires replacement if changed.
    name str
    The name of the role
    successor str
    The optional role to reassign ownership to before dropping
    ttl float
    Time to live in seconds. Requires replacement if changed.
    with_replication bool
    Whether the role should have the REPLICATION attribute. Requires replacement if changed.
    branch String
    Branch name from list_branches. Example: main.
    database String
    Database name slug from list_databases. Example: app-db.
    organization String
    Organization name slug from list_organizations. Example: acme.
    inheritedRoles List<String>
    Roles to inherit from. Requires replacement if changed.
    name String
    The name of the role
    successor String
    The optional role to reassign ownership to before dropping
    ttl Number
    Time to live in seconds. Requires replacement if changed.
    withReplication Boolean
    Whether the role should have the REPLICATION attribute. Requires replacement if changed.

    Outputs

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

    AccessHostUrl string
    The database connection string
    ActorData PostgresRedactedBranchRoleActorData
    BaseUsername string
    The base username without branch routing suffix
    BranchData PostgresRedactedBranchRoleBranchData
    CreatedAt string
    When the role was created
    DatabaseName string
    The database name
    Default bool
    Whether the role is the default postgres user
    DeletedAt string
    When the role was deleted
    DisabledAt string
    When the role was disabled
    DropFailed string
    Error message available when dropping the role fails
    DroppedAt string
    When the role was dropped
    Expired bool
    True if the credentials are expired
    ExpiresAt string
    When the role expires
    Id string
    The provider-assigned unique ID for this managed resource.
    PrivateAccessHostUrl string
    The database connection string for private connections
    PrivateConnectionServiceName string
    The service name to set up private connectivity
    QuerySafetySettings PostgresRedactedBranchRoleQuerySafetySettings
    UpdatedAt string
    When the role was updated
    Username string
    The database user name
    AccessHostUrl string
    The database connection string
    ActorData PostgresRedactedBranchRoleActorData
    BaseUsername string
    The base username without branch routing suffix
    BranchData PostgresRedactedBranchRoleBranchData
    CreatedAt string
    When the role was created
    DatabaseName string
    The database name
    Default bool
    Whether the role is the default postgres user
    DeletedAt string
    When the role was deleted
    DisabledAt string
    When the role was disabled
    DropFailed string
    Error message available when dropping the role fails
    DroppedAt string
    When the role was dropped
    Expired bool
    True if the credentials are expired
    ExpiresAt string
    When the role expires
    Id string
    The provider-assigned unique ID for this managed resource.
    PrivateAccessHostUrl string
    The database connection string for private connections
    PrivateConnectionServiceName string
    The service name to set up private connectivity
    QuerySafetySettings PostgresRedactedBranchRoleQuerySafetySettings
    UpdatedAt string
    When the role was updated
    Username string
    The database user name
    access_host_url string
    The database connection string
    actor_data object
    base_username string
    The base username without branch routing suffix
    branch_data object
    created_at string
    When the role was created
    database_name string
    The database name
    default bool
    Whether the role is the default postgres user
    deleted_at string
    When the role was deleted
    disabled_at string
    When the role was disabled
    drop_failed string
    Error message available when dropping the role fails
    dropped_at string
    When the role was dropped
    expired bool
    True if the credentials are expired
    expires_at string
    When the role expires
    id string
    The provider-assigned unique ID for this managed resource.
    private_access_host_url string
    The database connection string for private connections
    private_connection_service_name string
    The service name to set up private connectivity
    query_safety_settings object
    updated_at string
    When the role was updated
    username string
    The database user name
    accessHostUrl String
    The database connection string
    actorData PostgresRedactedBranchRoleActorData
    baseUsername String
    The base username without branch routing suffix
    branchData PostgresRedactedBranchRoleBranchData
    createdAt String
    When the role was created
    databaseName String
    The database name
    default_ Boolean
    Whether the role is the default postgres user
    deletedAt String
    When the role was deleted
    disabledAt String
    When the role was disabled
    dropFailed String
    Error message available when dropping the role fails
    droppedAt String
    When the role was dropped
    expired Boolean
    True if the credentials are expired
    expiresAt String
    When the role expires
    id String
    The provider-assigned unique ID for this managed resource.
    privateAccessHostUrl String
    The database connection string for private connections
    privateConnectionServiceName String
    The service name to set up private connectivity
    querySafetySettings PostgresRedactedBranchRoleQuerySafetySettings
    updatedAt String
    When the role was updated
    username String
    The database user name
    accessHostUrl string
    The database connection string
    actorData PostgresRedactedBranchRoleActorData
    baseUsername string
    The base username without branch routing suffix
    branchData PostgresRedactedBranchRoleBranchData
    createdAt string
    When the role was created
    databaseName string
    The database name
    default boolean
    Whether the role is the default postgres user
    deletedAt string
    When the role was deleted
    disabledAt string
    When the role was disabled
    dropFailed string
    Error message available when dropping the role fails
    droppedAt string
    When the role was dropped
    expired boolean
    True if the credentials are expired
    expiresAt string
    When the role expires
    id string
    The provider-assigned unique ID for this managed resource.
    privateAccessHostUrl string
    The database connection string for private connections
    privateConnectionServiceName string
    The service name to set up private connectivity
    querySafetySettings PostgresRedactedBranchRoleQuerySafetySettings
    updatedAt string
    When the role was updated
    username string
    The database user name
    access_host_url str
    The database connection string
    actor_data PostgresRedactedBranchRoleActorData
    base_username str
    The base username without branch routing suffix
    branch_data PostgresRedactedBranchRoleBranchData
    created_at str
    When the role was created
    database_name str
    The database name
    default bool
    Whether the role is the default postgres user
    deleted_at str
    When the role was deleted
    disabled_at str
    When the role was disabled
    drop_failed str
    Error message available when dropping the role fails
    dropped_at str
    When the role was dropped
    expired bool
    True if the credentials are expired
    expires_at str
    When the role expires
    id str
    The provider-assigned unique ID for this managed resource.
    private_access_host_url str
    The database connection string for private connections
    private_connection_service_name str
    The service name to set up private connectivity
    query_safety_settings PostgresRedactedBranchRoleQuerySafetySettings
    updated_at str
    When the role was updated
    username str
    The database user name
    accessHostUrl String
    The database connection string
    actorData Property Map
    baseUsername String
    The base username without branch routing suffix
    branchData Property Map
    createdAt String
    When the role was created
    databaseName String
    The database name
    default Boolean
    Whether the role is the default postgres user
    deletedAt String
    When the role was deleted
    disabledAt String
    When the role was disabled
    dropFailed String
    Error message available when dropping the role fails
    droppedAt String
    When the role was dropped
    expired Boolean
    True if the credentials are expired
    expiresAt String
    When the role expires
    id String
    The provider-assigned unique ID for this managed resource.
    privateAccessHostUrl String
    The database connection string for private connections
    privateConnectionServiceName String
    The service name to set up private connectivity
    querySafetySettings Property Map
    updatedAt String
    When the role was updated
    username String
    The database user name

    Look up Existing PostgresRedactedBranchRole Resource

    Get an existing PostgresRedactedBranchRole 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?: PostgresRedactedBranchRoleState, opts?: CustomResourceOptions): PostgresRedactedBranchRole
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            access_host_url: Optional[str] = None,
            actor_data: Optional[PostgresRedactedBranchRoleActorDataArgs] = None,
            base_username: Optional[str] = None,
            branch: Optional[str] = None,
            branch_data: Optional[PostgresRedactedBranchRoleBranchDataArgs] = None,
            created_at: Optional[str] = None,
            database: Optional[str] = None,
            database_name: Optional[str] = None,
            default: Optional[bool] = None,
            deleted_at: Optional[str] = None,
            disabled_at: Optional[str] = None,
            drop_failed: Optional[str] = None,
            dropped_at: Optional[str] = None,
            expired: Optional[bool] = None,
            expires_at: Optional[str] = None,
            inherited_roles: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            organization: Optional[str] = None,
            private_access_host_url: Optional[str] = None,
            private_connection_service_name: Optional[str] = None,
            query_safety_settings: Optional[PostgresRedactedBranchRoleQuerySafetySettingsArgs] = None,
            successor: Optional[str] = None,
            ttl: Optional[float] = None,
            updated_at: Optional[str] = None,
            username: Optional[str] = None,
            with_replication: Optional[bool] = None) -> PostgresRedactedBranchRole
    func GetPostgresRedactedBranchRole(ctx *Context, name string, id IDInput, state *PostgresRedactedBranchRoleState, opts ...ResourceOption) (*PostgresRedactedBranchRole, error)
    public static PostgresRedactedBranchRole Get(string name, Input<string> id, PostgresRedactedBranchRoleState? state, CustomResourceOptions? opts = null)
    public static PostgresRedactedBranchRole get(String name, Output<String> id, PostgresRedactedBranchRoleState state, CustomResourceOptions options)
    resources:  _:    type: planetscale:PostgresRedactedBranchRole    get:      id: ${id}
    import {
      to = planetscale_postgresredactedbranchrole.example
      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:
    AccessHostUrl string
    The database connection string
    ActorData PostgresRedactedBranchRoleActorData
    BaseUsername string
    The base username without branch routing suffix
    Branch string
    Branch name from list_branches. Example: main.
    BranchData PostgresRedactedBranchRoleBranchData
    CreatedAt string
    When the role was created
    Database string
    Database name slug from list_databases. Example: app-db.
    DatabaseName string
    The database name
    Default bool
    Whether the role is the default postgres user
    DeletedAt string
    When the role was deleted
    DisabledAt string
    When the role was disabled
    DropFailed string
    Error message available when dropping the role fails
    DroppedAt string
    When the role was dropped
    Expired bool
    True if the credentials are expired
    ExpiresAt string
    When the role expires
    InheritedRoles List<string>
    Roles to inherit from. Requires replacement if changed.
    Name string
    The name of the role
    Organization string
    Organization name slug from list_organizations. Example: acme.
    PrivateAccessHostUrl string
    The database connection string for private connections
    PrivateConnectionServiceName string
    The service name to set up private connectivity
    QuerySafetySettings PostgresRedactedBranchRoleQuerySafetySettings
    Successor string
    The optional role to reassign ownership to before dropping
    Ttl double
    Time to live in seconds. Requires replacement if changed.
    UpdatedAt string
    When the role was updated
    Username string
    The database user name
    WithReplication bool
    Whether the role should have the REPLICATION attribute. Requires replacement if changed.
    AccessHostUrl string
    The database connection string
    ActorData PostgresRedactedBranchRoleActorDataArgs
    BaseUsername string
    The base username without branch routing suffix
    Branch string
    Branch name from list_branches. Example: main.
    BranchData PostgresRedactedBranchRoleBranchDataArgs
    CreatedAt string
    When the role was created
    Database string
    Database name slug from list_databases. Example: app-db.
    DatabaseName string
    The database name
    Default bool
    Whether the role is the default postgres user
    DeletedAt string
    When the role was deleted
    DisabledAt string
    When the role was disabled
    DropFailed string
    Error message available when dropping the role fails
    DroppedAt string
    When the role was dropped
    Expired bool
    True if the credentials are expired
    ExpiresAt string
    When the role expires
    InheritedRoles []string
    Roles to inherit from. Requires replacement if changed.
    Name string
    The name of the role
    Organization string
    Organization name slug from list_organizations. Example: acme.
    PrivateAccessHostUrl string
    The database connection string for private connections
    PrivateConnectionServiceName string
    The service name to set up private connectivity
    QuerySafetySettings PostgresRedactedBranchRoleQuerySafetySettingsArgs
    Successor string
    The optional role to reassign ownership to before dropping
    Ttl float64
    Time to live in seconds. Requires replacement if changed.
    UpdatedAt string
    When the role was updated
    Username string
    The database user name
    WithReplication bool
    Whether the role should have the REPLICATION attribute. Requires replacement if changed.
    access_host_url string
    The database connection string
    actor_data object
    base_username string
    The base username without branch routing suffix
    branch string
    Branch name from list_branches. Example: main.
    branch_data object
    created_at string
    When the role was created
    database string
    Database name slug from list_databases. Example: app-db.
    database_name string
    The database name
    default bool
    Whether the role is the default postgres user
    deleted_at string
    When the role was deleted
    disabled_at string
    When the role was disabled
    drop_failed string
    Error message available when dropping the role fails
    dropped_at string
    When the role was dropped
    expired bool
    True if the credentials are expired
    expires_at string
    When the role expires
    inherited_roles list(string)
    Roles to inherit from. Requires replacement if changed.
    name string
    The name of the role
    organization string
    Organization name slug from list_organizations. Example: acme.
    private_access_host_url string
    The database connection string for private connections
    private_connection_service_name string
    The service name to set up private connectivity
    query_safety_settings object
    successor string
    The optional role to reassign ownership to before dropping
    ttl number
    Time to live in seconds. Requires replacement if changed.
    updated_at string
    When the role was updated
    username string
    The database user name
    with_replication bool
    Whether the role should have the REPLICATION attribute. Requires replacement if changed.
    accessHostUrl String
    The database connection string
    actorData PostgresRedactedBranchRoleActorData
    baseUsername String
    The base username without branch routing suffix
    branch String
    Branch name from list_branches. Example: main.
    branchData PostgresRedactedBranchRoleBranchData
    createdAt String
    When the role was created
    database String
    Database name slug from list_databases. Example: app-db.
    databaseName String
    The database name
    default_ Boolean
    Whether the role is the default postgres user
    deletedAt String
    When the role was deleted
    disabledAt String
    When the role was disabled
    dropFailed String
    Error message available when dropping the role fails
    droppedAt String
    When the role was dropped
    expired Boolean
    True if the credentials are expired
    expiresAt String
    When the role expires
    inheritedRoles List<String>
    Roles to inherit from. Requires replacement if changed.
    name String
    The name of the role
    organization String
    Organization name slug from list_organizations. Example: acme.
    privateAccessHostUrl String
    The database connection string for private connections
    privateConnectionServiceName String
    The service name to set up private connectivity
    querySafetySettings PostgresRedactedBranchRoleQuerySafetySettings
    successor String
    The optional role to reassign ownership to before dropping
    ttl Double
    Time to live in seconds. Requires replacement if changed.
    updatedAt String
    When the role was updated
    username String
    The database user name
    withReplication Boolean
    Whether the role should have the REPLICATION attribute. Requires replacement if changed.
    accessHostUrl string
    The database connection string
    actorData PostgresRedactedBranchRoleActorData
    baseUsername string
    The base username without branch routing suffix
    branch string
    Branch name from list_branches. Example: main.
    branchData PostgresRedactedBranchRoleBranchData
    createdAt string
    When the role was created
    database string
    Database name slug from list_databases. Example: app-db.
    databaseName string
    The database name
    default boolean
    Whether the role is the default postgres user
    deletedAt string
    When the role was deleted
    disabledAt string
    When the role was disabled
    dropFailed string
    Error message available when dropping the role fails
    droppedAt string
    When the role was dropped
    expired boolean
    True if the credentials are expired
    expiresAt string
    When the role expires
    inheritedRoles string[]
    Roles to inherit from. Requires replacement if changed.
    name string
    The name of the role
    organization string
    Organization name slug from list_organizations. Example: acme.
    privateAccessHostUrl string
    The database connection string for private connections
    privateConnectionServiceName string
    The service name to set up private connectivity
    querySafetySettings PostgresRedactedBranchRoleQuerySafetySettings
    successor string
    The optional role to reassign ownership to before dropping
    ttl number
    Time to live in seconds. Requires replacement if changed.
    updatedAt string
    When the role was updated
    username string
    The database user name
    withReplication boolean
    Whether the role should have the REPLICATION attribute. Requires replacement if changed.
    access_host_url str
    The database connection string
    actor_data PostgresRedactedBranchRoleActorDataArgs
    base_username str
    The base username without branch routing suffix
    branch str
    Branch name from list_branches. Example: main.
    branch_data PostgresRedactedBranchRoleBranchDataArgs
    created_at str
    When the role was created
    database str
    Database name slug from list_databases. Example: app-db.
    database_name str
    The database name
    default bool
    Whether the role is the default postgres user
    deleted_at str
    When the role was deleted
    disabled_at str
    When the role was disabled
    drop_failed str
    Error message available when dropping the role fails
    dropped_at str
    When the role was dropped
    expired bool
    True if the credentials are expired
    expires_at str
    When the role expires
    inherited_roles Sequence[str]
    Roles to inherit from. Requires replacement if changed.
    name str
    The name of the role
    organization str
    Organization name slug from list_organizations. Example: acme.
    private_access_host_url str
    The database connection string for private connections
    private_connection_service_name str
    The service name to set up private connectivity
    query_safety_settings PostgresRedactedBranchRoleQuerySafetySettingsArgs
    successor str
    The optional role to reassign ownership to before dropping
    ttl float
    Time to live in seconds. Requires replacement if changed.
    updated_at str
    When the role was updated
    username str
    The database user name
    with_replication bool
    Whether the role should have the REPLICATION attribute. Requires replacement if changed.
    accessHostUrl String
    The database connection string
    actorData Property Map
    baseUsername String
    The base username without branch routing suffix
    branch String
    Branch name from list_branches. Example: main.
    branchData Property Map
    createdAt String
    When the role was created
    database String
    Database name slug from list_databases. Example: app-db.
    databaseName String
    The database name
    default Boolean
    Whether the role is the default postgres user
    deletedAt String
    When the role was deleted
    disabledAt String
    When the role was disabled
    dropFailed String
    Error message available when dropping the role fails
    droppedAt String
    When the role was dropped
    expired Boolean
    True if the credentials are expired
    expiresAt String
    When the role expires
    inheritedRoles List<String>
    Roles to inherit from. Requires replacement if changed.
    name String
    The name of the role
    organization String
    Organization name slug from list_organizations. Example: acme.
    privateAccessHostUrl String
    The database connection string for private connections
    privateConnectionServiceName String
    The service name to set up private connectivity
    querySafetySettings Property Map
    successor String
    The optional role to reassign ownership to before dropping
    ttl Number
    Time to live in seconds. Requires replacement if changed.
    updatedAt String
    When the role was updated
    username String
    The database user name
    withReplication Boolean
    Whether the role should have the REPLICATION attribute. Requires replacement if changed.

    Supporting Types

    PostgresRedactedBranchRoleActorData, PostgresRedactedBranchRoleActorDataArgs

    AvatarUrl string
    The URL of the actor's avatar
    DisplayName string
    The name of the actor
    Id string
    The ID of the actor
    AvatarUrl string
    The URL of the actor's avatar
    DisplayName string
    The name of the actor
    Id string
    The ID of the actor
    avatar_url string
    The URL of the actor's avatar
    display_name string
    The name of the actor
    id string
    The ID of the actor
    avatarUrl String
    The URL of the actor's avatar
    displayName String
    The name of the actor
    id String
    The ID of the actor
    avatarUrl string
    The URL of the actor's avatar
    displayName string
    The name of the actor
    id string
    The ID of the actor
    avatar_url str
    The URL of the actor's avatar
    display_name str
    The name of the actor
    id str
    The ID of the actor
    avatarUrl String
    The URL of the actor's avatar
    displayName String
    The name of the actor
    id String
    The ID of the actor

    PostgresRedactedBranchRoleBranchData, PostgresRedactedBranchRoleBranchDataArgs

    DeletedAt string
    When the resource was deleted, if deleted
    Id string
    The ID for the resource
    Name string
    The name for the resource
    DeletedAt string
    When the resource was deleted, if deleted
    Id string
    The ID for the resource
    Name string
    The name for the resource
    deleted_at string
    When the resource was deleted, if deleted
    id string
    The ID for the resource
    name string
    The name for the resource
    deletedAt String
    When the resource was deleted, if deleted
    id String
    The ID for the resource
    name String
    The name for the resource
    deletedAt string
    When the resource was deleted, if deleted
    id string
    The ID for the resource
    name string
    The name for the resource
    deleted_at str
    When the resource was deleted, if deleted
    id str
    The ID for the resource
    name str
    The name for the resource
    deletedAt String
    When the resource was deleted, if deleted
    id String
    The ID for the resource
    name String
    The name for the resource

    PostgresRedactedBranchRoleQuerySafetySettings, PostgresRedactedBranchRoleQuerySafetySettingsArgs

    RequireWhereOnDelete string
    Require WHERE clause on DELETE statements
    RequireWhereOnUpdate string
    Require WHERE clause on UPDATE statements
    RequireWhereOnDelete string
    Require WHERE clause on DELETE statements
    RequireWhereOnUpdate string
    Require WHERE clause on UPDATE statements
    require_where_on_delete string
    Require WHERE clause on DELETE statements
    require_where_on_update string
    Require WHERE clause on UPDATE statements
    requireWhereOnDelete String
    Require WHERE clause on DELETE statements
    requireWhereOnUpdate String
    Require WHERE clause on UPDATE statements
    requireWhereOnDelete string
    Require WHERE clause on DELETE statements
    requireWhereOnUpdate string
    Require WHERE clause on UPDATE statements
    require_where_on_delete str
    Require WHERE clause on DELETE statements
    require_where_on_update str
    Require WHERE clause on UPDATE statements
    requireWhereOnDelete String
    Require WHERE clause on DELETE statements
    requireWhereOnUpdate String
    Require WHERE clause on UPDATE statements

    Import

    In Terraform v1.5.0 and later, the import block can be used with the id attribute, for example:

    terraform

    import {

    to = planetscale_postgres_redacted_branch_role.my_planetscale_postgres_redacted_branch_role

    id = jsonencode({

    branch       = "..."
    
    database     = "..."
    
    id           = "..."
    
    organization = "..."
    

    })

    }

    The pulumi import command can be used, for example:

    $ pulumi import planetscale:index/postgresRedactedBranchRole:PostgresRedactedBranchRole my_planetscale_postgres_redacted_branch_role '{"branch": "...", "database": "...", "id": "...", "organization": "..."}'
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    planetscale planetscale/terraform-provider-planetscale
    License
    Notes
    This Pulumi package is based on the planetscale Terraform Provider.
    Viewing docs for planetscale 1.4.0
    published on Thursday, Jul 9, 2026 by planetscale

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial