1. Registry
  2. Packages
  3. Planetscale Provider
  4. API Docs
  5. NekiRole
Viewing docs for planetscale 1.11.0
published on Friday, Sep 18, 2026 by planetscale
Viewing docs for planetscale 1.11.0
published on Friday, Sep 18, 2026 by planetscale

    NekiRole Resource

    Create NekiRole Resource

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

    Constructor syntax

    new NekiRole(name: string, args: NekiRoleArgs, opts?: CustomResourceOptions);
    @overload
    def NekiRole(resource_name: str,
                 args: NekiRoleArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def NekiRole(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 NewNekiRole(ctx *Context, name string, args NekiRoleArgs, opts ...ResourceOption) (*NekiRole, error)
    public NekiRole(string name, NekiRoleArgs args, CustomResourceOptions? opts = null)
    public NekiRole(String name, NekiRoleArgs args)
    public NekiRole(String name, NekiRoleArgs args, CustomResourceOptions options)
    
    type: planetscale:NekiRole
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "planetscale_neki_role" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args NekiRoleArgs
    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 NekiRoleArgs
    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 NekiRoleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NekiRoleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NekiRoleArgs
    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 nekiRoleResource = new Planetscale.NekiRole("nekiRoleResource", new()
    {
        Branch = "string",
        Database = "string",
        Organization = "string",
        InheritedRoles = new[]
        {
            "string",
        },
        Name = "string",
        Successor = "string",
        Ttl = 0.0,
        WithReplication = false,
    });
    
    example, err := planetscale.NewNekiRole(ctx, "nekiRoleResource", &planetscale.NekiRoleArgs{
    	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_neki_role" "nekiRoleResource" {
      lifecycle {
        create_before_destroy = true
      }
      branch           = "string"
      database         = "string"
      organization     = "string"
      inherited_roles  = ["string"]
      name             = "string"
      successor        = "string"
      ttl              = 0
      with_replication = false
    }
    
    var nekiRoleResource = new NekiRole("nekiRoleResource", NekiRoleArgs.builder()
        .branch("string")
        .database("string")
        .organization("string")
        .inheritedRoles("string")
        .name("string")
        .successor("string")
        .ttl(0.0)
        .withReplication(false)
        .build());
    
    neki_role_resource = planetscale.NekiRole("nekiRoleResource",
        branch="string",
        database="string",
        organization="string",
        inherited_roles=["string"],
        name="string",
        successor="string",
        ttl=float(0),
        with_replication=False)
    
    const nekiRoleResource = new planetscale.NekiRole("nekiRoleResource", {
        branch: "string",
        database: "string",
        organization: "string",
        inheritedRoles: ["string"],
        name: "string",
        successor: "string",
        ttl: 0,
        withReplication: false,
    });
    
    type: planetscale:NekiRole
    properties:
        branch: string
        database: string
        inheritedRoles:
            - string
        name: string
        organization: string
        successor: string
        ttl: 0
        withReplication: false
    

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

    Branch string
    Branch name from list_branches. Example: main. Requires replacement if changed.
    Database string
    Database name slug from list_databases. Example: app-db. Requires replacement if changed.
    Organization string
    Organization name slug from list_organizations. Example: acme. Requires replacement if changed.
    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. Accepts the role's ID, or its username with or without the branch ID suffix.
    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. Requires replacement if changed.
    Database string
    Database name slug from list_databases. Example: app-db. Requires replacement if changed.
    Organization string
    Organization name slug from list_organizations. Example: acme. Requires replacement if changed.
    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. Accepts the role's ID, or its username with or without the branch ID suffix.
    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. Requires replacement if changed.
    database string
    Database name slug from list_databases. Example: app-db. Requires replacement if changed.
    organization string
    Organization name slug from list_organizations. Example: acme. Requires replacement if changed.
    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. Accepts the role's ID, or its username with or without the branch ID suffix.
    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. Requires replacement if changed.
    database String
    Database name slug from list_databases. Example: app-db. Requires replacement if changed.
    organization String
    Organization name slug from list_organizations. Example: acme. Requires replacement if changed.
    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. Accepts the role's ID, or its username with or without the branch ID suffix.
    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. Requires replacement if changed.
    database string
    Database name slug from list_databases. Example: app-db. Requires replacement if changed.
    organization string
    Organization name slug from list_organizations. Example: acme. Requires replacement if changed.
    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. Accepts the role's ID, or its username with or without the branch ID suffix.
    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. Requires replacement if changed.
    database str
    Database name slug from list_databases. Example: app-db. Requires replacement if changed.
    organization str
    Organization name slug from list_organizations. Example: acme. Requires replacement if changed.
    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. Accepts the role's ID, or its username with or without the branch ID suffix.
    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. Requires replacement if changed.
    database String
    Database name slug from list_databases. Example: app-db. Requires replacement if changed.
    organization String
    Organization name slug from list_organizations. Example: acme. Requires replacement if changed.
    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. Accepts the role's ID, or its username with or without the branch ID suffix.
    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 NekiRole resource produces the following output properties:

    AccessHostUrl string
    The database connection string
    ExpiresAt string
    When the role expires
    Id string
    The provider-assigned unique ID for this managed resource.
    Password string
    The plaintext password, available only after create
    PrivateAccessHostUrl string
    The database connection string for private connections
    PrivateConnectionServiceName string
    The service name to set up private connectivity
    Username string
    The database user name
    AccessHostUrl string
    The database connection string
    ExpiresAt string
    When the role expires
    Id string
    The provider-assigned unique ID for this managed resource.
    Password string
    The plaintext password, available only after create
    PrivateAccessHostUrl string
    The database connection string for private connections
    PrivateConnectionServiceName string
    The service name to set up private connectivity
    Username string
    The database user name
    access_host_url string
    The database connection string
    expires_at string
    When the role expires
    id string
    The provider-assigned unique ID for this managed resource.
    password string
    The plaintext password, available only after create
    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
    username string
    The database user name
    accessHostUrl String
    The database connection string
    expiresAt String
    When the role expires
    id String
    The provider-assigned unique ID for this managed resource.
    password String
    The plaintext password, available only after create
    privateAccessHostUrl String
    The database connection string for private connections
    privateConnectionServiceName String
    The service name to set up private connectivity
    username String
    The database user name
    accessHostUrl string
    The database connection string
    expiresAt string
    When the role expires
    id string
    The provider-assigned unique ID for this managed resource.
    password string
    The plaintext password, available only after create
    privateAccessHostUrl string
    The database connection string for private connections
    privateConnectionServiceName string
    The service name to set up private connectivity
    username string
    The database user name
    access_host_url str
    The database connection string
    expires_at str
    When the role expires
    id str
    The provider-assigned unique ID for this managed resource.
    password str
    The plaintext 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
    username str
    The database user name
    accessHostUrl String
    The database connection string
    expiresAt String
    When the role expires
    id String
    The provider-assigned unique ID for this managed resource.
    password String
    The plaintext password, available only after create
    privateAccessHostUrl String
    The database connection string for private connections
    privateConnectionServiceName String
    The service name to set up private connectivity
    username String
    The database user name

    Look up Existing NekiRole Resource

    Get an existing NekiRole 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?: NekiRoleState, opts?: CustomResourceOptions): NekiRole
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            access_host_url: Optional[str] = None,
            branch: Optional[str] = None,
            database: Optional[str] = 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,
            username: Optional[str] = None,
            with_replication: Optional[bool] = None) -> NekiRole
    func GetNekiRole(ctx *Context, name string, id IDInput, state *NekiRoleState, opts ...ResourceOption) (*NekiRole, error)
    public static NekiRole Get(string name, Input<string> id, NekiRoleState? state, CustomResourceOptions? opts = null)
    public static NekiRole get(String name, Output<String> id, NekiRoleState state, CustomResourceOptions options)
    resources:  _:    type: planetscale:NekiRole    get:      id: ${id}
    import {
      to = planetscale_neki_role.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
    Branch string
    Branch name from list_branches. Example: main. Requires replacement if changed.
    Database string
    Database name slug from list_databases. Example: app-db. Requires replacement if changed.
    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. Requires replacement if changed.
    Password string
    The plaintext 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. Accepts the role's ID, or its username with or without the branch ID suffix.
    Ttl double
    Time to live in seconds. Requires replacement if changed.
    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
    Branch string
    Branch name from list_branches. Example: main. Requires replacement if changed.
    Database string
    Database name slug from list_databases. Example: app-db. Requires replacement if changed.
    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. Requires replacement if changed.
    Password string
    The plaintext 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. Accepts the role's ID, or its username with or without the branch ID suffix.
    Ttl float64
    Time to live in seconds. Requires replacement if changed.
    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
    branch string
    Branch name from list_branches. Example: main. Requires replacement if changed.
    database string
    Database name slug from list_databases. Example: app-db. Requires replacement if changed.
    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. Requires replacement if changed.
    password string
    The plaintext password, available only after create
    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
    successor string
    The optional role to reassign ownership to before dropping. Accepts the role's ID, or its username with or without the branch ID suffix.
    ttl number
    Time to live in seconds. Requires replacement if changed.
    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
    branch String
    Branch name from list_branches. Example: main. Requires replacement if changed.
    database String
    Database name slug from list_databases. Example: app-db. Requires replacement if changed.
    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. Requires replacement if changed.
    password String
    The plaintext 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. Accepts the role's ID, or its username with or without the branch ID suffix.
    ttl Double
    Time to live in seconds. Requires replacement if changed.
    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
    branch string
    Branch name from list_branches. Example: main. Requires replacement if changed.
    database string
    Database name slug from list_databases. Example: app-db. Requires replacement if changed.
    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. Requires replacement if changed.
    password string
    The plaintext 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. Accepts the role's ID, or its username with or without the branch ID suffix.
    ttl number
    Time to live in seconds. Requires replacement if changed.
    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
    branch str
    Branch name from list_branches. Example: main. Requires replacement if changed.
    database str
    Database name slug from list_databases. Example: app-db. Requires replacement if changed.
    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. Requires replacement if changed.
    password str
    The plaintext 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. Accepts the role's ID, or its username with or without the branch ID suffix.
    ttl float
    Time to live in seconds. Requires replacement if changed.
    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
    branch String
    Branch name from list_branches. Example: main. Requires replacement if changed.
    database String
    Database name slug from list_databases. Example: app-db. Requires replacement if changed.
    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. Requires replacement if changed.
    password String
    The plaintext 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. Accepts the role's ID, or its username with or without the branch ID suffix.
    ttl Number
    Time to live in seconds. Requires replacement if changed.
    username String
    The database user name
    withReplication Boolean
    Whether the role should have the REPLICATION attribute. Requires replacement if changed.

    Import

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

    terraform

    import {

    to = planetscale_neki_role.my_planetscale_neki_role

    id = jsonencode({

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

    })

    }

    The pulumi import command can be used, for example:

    $ pulumi import planetscale:index/nekiRole:NekiRole my_planetscale_neki_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.11.0
    published on Friday, Sep 18, 2026 by planetscale

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial