1. Packages
  2. Planetscale Provider
  3. API Docs
  4. PostgresBranchRole
planetscale 1.0.0-rc1 published on Friday, Jan 30, 2026 by planetscale
planetscale logo
planetscale 1.0.0-rc1 published on Friday, Jan 30, 2026 by planetscale

    PostgresBranchRole Resource

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as planetscale from "@pulumi/planetscale";
    
    const myPostgresbranchrole = new planetscale.PostgresBranchRole("my_postgresbranchrole", {
        organization: "my-organization",
        database: "ru00w3vqvfr9",
        branch: "2474dzfubrf3",
        name: "application-role",
        inheritedRoles: [
            "pg_read_all_data",
            "pg_write_all_data",
        ],
    });
    
    import pulumi
    import pulumi_planetscale as planetscale
    
    my_postgresbranchrole = planetscale.PostgresBranchRole("my_postgresbranchrole",
        organization="my-organization",
        database="ru00w3vqvfr9",
        branch="2474dzfubrf3",
        name="application-role",
        inherited_roles=[
            "pg_read_all_data",
            "pg_write_all_data",
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/planetscale/planetscale"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := planetscale.NewPostgresBranchRole(ctx, "my_postgresbranchrole", &planetscale.PostgresBranchRoleArgs{
    			Organization: pulumi.String("my-organization"),
    			Database:     pulumi.String("ru00w3vqvfr9"),
    			Branch:       pulumi.String("2474dzfubrf3"),
    			Name:         pulumi.String("application-role"),
    			InheritedRoles: pulumi.StringArray{
    				pulumi.String("pg_read_all_data"),
    				pulumi.String("pg_write_all_data"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Planetscale = Pulumi.Planetscale;
    
    return await Deployment.RunAsync(() => 
    {
        var myPostgresbranchrole = new Planetscale.PostgresBranchRole("my_postgresbranchrole", new()
        {
            Organization = "my-organization",
            Database = "ru00w3vqvfr9",
            Branch = "2474dzfubrf3",
            Name = "application-role",
            InheritedRoles = new[]
            {
                "pg_read_all_data",
                "pg_write_all_data",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.planetscale.PostgresBranchRole;
    import com.pulumi.planetscale.PostgresBranchRoleArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var myPostgresbranchrole = new PostgresBranchRole("myPostgresbranchrole", PostgresBranchRoleArgs.builder()
                .organization("my-organization")
                .database("ru00w3vqvfr9")
                .branch("2474dzfubrf3")
                .name("application-role")
                .inheritedRoles(            
                    "pg_read_all_data",
                    "pg_write_all_data")
                .build());
    
        }
    }
    
    resources:
      myPostgresbranchrole:
        type: planetscale:PostgresBranchRole
        name: my_postgresbranchrole
        properties:
          organization: my-organization
          database: ru00w3vqvfr9
          branch: 2474dzfubrf3
          name: application-role
          inheritedRoles:
            - pg_read_all_data
            - pg_write_all_data
    

    Create PostgresBranchRole Resource

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

    Constructor syntax

    new PostgresBranchRole(name: string, args: PostgresBranchRoleArgs, opts?: CustomResourceOptions);
    @overload
    def PostgresBranchRole(resource_name: str,
                           args: PostgresBranchRoleArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def PostgresBranchRole(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)
    func NewPostgresBranchRole(ctx *Context, name string, args PostgresBranchRoleArgs, opts ...ResourceOption) (*PostgresBranchRole, error)
    public PostgresBranchRole(string name, PostgresBranchRoleArgs args, CustomResourceOptions? opts = null)
    public PostgresBranchRole(String name, PostgresBranchRoleArgs args)
    public PostgresBranchRole(String name, PostgresBranchRoleArgs args, CustomResourceOptions options)
    
    type: planetscale:PostgresBranchRole
    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 PostgresBranchRoleArgs
    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 PostgresBranchRoleArgs
    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 PostgresBranchRoleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PostgresBranchRoleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PostgresBranchRoleArgs
    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 postgresBranchRoleResource = new Planetscale.PostgresBranchRole("postgresBranchRoleResource", new()
    {
        Branch = "string",
        Database = "string",
        Organization = "string",
        InheritedRoles = new[]
        {
            "string",
        },
        Name = "string",
        Successor = "string",
        Ttl = 0,
    });
    
    example, err := planetscale.NewPostgresBranchRole(ctx, "postgresBranchRoleResource", &planetscale.PostgresBranchRoleArgs{
    	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),
    })
    
    var postgresBranchRoleResource = new PostgresBranchRole("postgresBranchRoleResource", PostgresBranchRoleArgs.builder()
        .branch("string")
        .database("string")
        .organization("string")
        .inheritedRoles("string")
        .name("string")
        .successor("string")
        .ttl(0.0)
        .build());
    
    postgres_branch_role_resource = planetscale.PostgresBranchRole("postgresBranchRoleResource",
        branch="string",
        database="string",
        organization="string",
        inherited_roles=["string"],
        name="string",
        successor="string",
        ttl=0)
    
    const postgresBranchRoleResource = new planetscale.PostgresBranchRole("postgresBranchRoleResource", {
        branch: "string",
        database: "string",
        organization: "string",
        inheritedRoles: ["string"],
        name: "string",
        successor: "string",
        ttl: 0,
    });
    
    type: planetscale:PostgresBranchRole
    properties:
        branch: string
        database: string
        inheritedRoles:
            - string
        name: string
        organization: string
        successor: string
        ttl: 0
    

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

    Branch string
    The name of the branch that owns this resource
    Database string
    The name of the database that owns this resource
    Organization string
    The name of the organization that owns this resource
    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.
    Branch string
    The name of the branch that owns this resource
    Database string
    The name of the database that owns this resource
    Organization string
    The name of the organization that owns this resource
    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.
    branch String
    The name of the branch that owns this resource
    database String
    The name of the database that owns this resource
    organization String
    The name of the organization that owns this resource
    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.
    branch string
    The name of the branch that owns this resource
    database string
    The name of the database that owns this resource
    organization string
    The name of the organization that owns this resource
    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.
    branch str
    The name of the branch that owns this resource
    database str
    The name of the database that owns this resource
    organization str
    The name of the organization that owns this resource
    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.
    branch String
    The name of the branch that owns this resource
    database String
    The name of the database that owns this resource
    organization String
    The name of the organization that owns this resource
    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.

    Outputs

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

    AccessHostUrl string
    The database connection string
    ActorData PostgresBranchRoleActorData
    BranchData PostgresBranchRoleBranchData
    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.
    Password string
    The plain text password, available only after create
    PrivateAccessHostUrl string
    The database connection string for private connections
    PrivateConnectionServiceName string
    The service name to set up private connectivity
    UpdatedAt string
    When the role was updated
    Username string
    The database user name
    AccessHostUrl string
    The database connection string
    ActorData PostgresBranchRoleActorData
    BranchData PostgresBranchRoleBranchData
    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.
    Password string
    The plain text password, available only after create
    PrivateAccessHostUrl string
    The database connection string for private connections
    PrivateConnectionServiceName string
    The service name to set up private connectivity
    UpdatedAt string
    When the role was updated
    Username string
    The database user name
    accessHostUrl String
    The database connection string
    actorData PostgresBranchRoleActorData
    branchData PostgresBranchRoleBranchData
    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.
    password String
    The plain text password, available only after create
    privateAccessHostUrl String
    The database connection string for private connections
    privateConnectionServiceName String
    The service name to set up private connectivity
    updatedAt String
    When the role was updated
    username String
    The database user name
    accessHostUrl string
    The database connection string
    actorData PostgresBranchRoleActorData
    branchData PostgresBranchRoleBranchData
    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.
    password string
    The plain text password, available only after create
    privateAccessHostUrl string
    The database connection string for private connections
    privateConnectionServiceName string
    The service name to set up private connectivity
    updatedAt string
    When the role was updated
    username string
    The database user name
    access_host_url str
    The database connection string
    actor_data PostgresBranchRoleActorData
    branch_data PostgresBranchRoleBranchData
    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.
    password str
    The plain text password, available only after create
    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
    updated_at str
    When the role was updated
    username str
    The database user name
    accessHostUrl String
    The database connection string
    actorData Property Map
    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.
    password String
    The plain text password, available only after create
    privateAccessHostUrl String
    The database connection string for private connections
    privateConnectionServiceName String
    The service name to set up private connectivity
    updatedAt String
    When the role was updated
    username String
    The database user name

    Look up Existing PostgresBranchRole Resource

    Get an existing PostgresBranchRole 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?: PostgresBranchRoleState, opts?: CustomResourceOptions): PostgresBranchRole
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            access_host_url: Optional[str] = None,
            actor_data: Optional[PostgresBranchRoleActorDataArgs] = None,
            branch: Optional[str] = None,
            branch_data: Optional[PostgresBranchRoleBranchDataArgs] = 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,
            password: Optional[str] = None,
            private_access_host_url: Optional[str] = None,
            private_connection_service_name: Optional[str] = None,
            successor: Optional[str] = None,
            ttl: Optional[float] = None,
            updated_at: Optional[str] = None,
            username: Optional[str] = None) -> PostgresBranchRole
    func GetPostgresBranchRole(ctx *Context, name string, id IDInput, state *PostgresBranchRoleState, opts ...ResourceOption) (*PostgresBranchRole, error)
    public static PostgresBranchRole Get(string name, Input<string> id, PostgresBranchRoleState? state, CustomResourceOptions? opts = null)
    public static PostgresBranchRole get(String name, Output<String> id, PostgresBranchRoleState state, CustomResourceOptions options)
    resources:  _:    type: planetscale:PostgresBranchRole    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:
    AccessHostUrl string
    The database connection string
    ActorData PostgresBranchRoleActorData
    Branch string
    The name of the branch that owns this resource
    BranchData PostgresBranchRoleBranchData
    CreatedAt string
    When the role was created
    Database string
    The name of the database that owns this resource
    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
    The name of the organization that owns this resource
    Password string
    The plain text password, available only after create
    PrivateAccessHostUrl string
    The database connection string for private connections
    PrivateConnectionServiceName string
    The service name to set up private connectivity
    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
    AccessHostUrl string
    The database connection string
    ActorData PostgresBranchRoleActorDataArgs
    Branch string
    The name of the branch that owns this resource
    BranchData PostgresBranchRoleBranchDataArgs
    CreatedAt string
    When the role was created
    Database string
    The name of the database that owns this resource
    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
    The name of the organization that owns this resource
    Password string
    The plain text password, available only after create
    PrivateAccessHostUrl string
    The database connection string for private connections
    PrivateConnectionServiceName string
    The service name to set up private connectivity
    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
    accessHostUrl String
    The database connection string
    actorData PostgresBranchRoleActorData
    branch String
    The name of the branch that owns this resource
    branchData PostgresBranchRoleBranchData
    createdAt String
    When the role was created
    database String
    The name of the database that owns this resource
    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
    The name of the organization that owns this resource
    password String
    The plain text password, available only after create
    privateAccessHostUrl String
    The database connection string for private connections
    privateConnectionServiceName String
    The service name to set up private connectivity
    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
    accessHostUrl string
    The database connection string
    actorData PostgresBranchRoleActorData
    branch string
    The name of the branch that owns this resource
    branchData PostgresBranchRoleBranchData
    createdAt string
    When the role was created
    database string
    The name of the database that owns this resource
    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
    The name of the organization that owns this resource
    password string
    The plain text password, available only after create
    privateAccessHostUrl string
    The database connection string for private connections
    privateConnectionServiceName string
    The service name to set up private connectivity
    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
    access_host_url str
    The database connection string
    actor_data PostgresBranchRoleActorDataArgs
    branch str
    The name of the branch that owns this resource
    branch_data PostgresBranchRoleBranchDataArgs
    created_at str
    When the role was created
    database str
    The name of the database that owns this resource
    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
    The name of the organization that owns this resource
    password str
    The plain text password, available only after create
    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
    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
    accessHostUrl String
    The database connection string
    actorData Property Map
    branch String
    The name of the branch that owns this resource
    branchData Property Map
    createdAt String
    When the role was created
    database String
    The name of the database that owns this resource
    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
    The name of the organization that owns this resource
    password String
    The plain text password, available only after create
    privateAccessHostUrl String
    The database connection string for private connections
    privateConnectionServiceName String
    The service name to set up private connectivity
    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

    Supporting Types

    PostgresBranchRoleActorData, PostgresBranchRoleActorDataArgs

    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
    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

    PostgresBranchRoleBranchData, PostgresBranchRoleBranchDataArgs

    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
    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

    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_branch_role.my_planetscale_postgres_branch_role

    id = jsonencode({

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

    })

    }

    The pulumi import command can be used, for example:

    $ pulumi import planetscale:index/postgresBranchRole:PostgresBranchRole my_planetscale_postgres_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.
    planetscale logo
    planetscale 1.0.0-rc1 published on Friday, Jan 30, 2026 by planetscale
      Meet Neo: Your AI Platform Teammate