published on Friday, Sep 18, 2026 by planetscale
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. - 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 double
- 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. - Inherited
Roles []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.
- 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. - 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. - 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 Double
- Time to live in seconds. Requires replacement if changed.
- with
Replication 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. - inherited
Roles 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 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. - 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 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:
- Access
Host stringUrl - 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 stringHost Url - The database connection string for private connections
- Private
Connection stringService Name - The service name to set up private connectivity
- Username string
- The database user name
- Access
Host stringUrl - 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 stringHost Url - The database connection string for private connections
- Private
Connection stringService Name - The service name to set up private connectivity
- Username string
- The database user name
- access_
host_ stringurl - 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_ stringhost_ url - The database connection string for private connections
- private_
connection_ stringservice_ name - The service name to set up private connectivity
- username string
- The database user name
- access
Host StringUrl - 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 StringHost Url - The database connection string for private connections
- private
Connection StringService Name - The service name to set up private connectivity
- username String
- The database user name
- access
Host stringUrl - 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 stringHost Url - The database connection string for private connections
- private
Connection stringService Name - The service name to set up private connectivity
- username string
- The database user name
- access_
host_ strurl - 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_ strhost_ url - The database connection string for private connections
- private_
connection_ strservice_ name - The service name to set up private connectivity
- username str
- The database user name
- access
Host StringUrl - 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 StringHost Url - The database connection string for private connections
- private
Connection StringService Name - 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) -> NekiRolefunc 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.
- Access
Host stringUrl - 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 stringHost Url - The database connection string for private connections
- Private
Connection stringService Name - 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
- With
Replication bool - Whether the role should have the REPLICATION attribute. Requires replacement if changed.
- Access
Host stringUrl - 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 []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 stringHost Url - The database connection string for private connections
- Private
Connection stringService Name - 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
- With
Replication bool - Whether the role should have the REPLICATION attribute. Requires replacement if changed.
- access_
host_ stringurl - 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_ stringhost_ url - The database connection string for private connections
- private_
connection_ stringservice_ name - 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.
- access
Host StringUrl - 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 StringHost Url - The database connection string for private connections
- private
Connection StringService Name - 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
- with
Replication Boolean - Whether the role should have the REPLICATION attribute. Requires replacement if changed.
- access
Host stringUrl - 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 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 stringHost Url - The database connection string for private connections
- private
Connection stringService Name - 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 boolean - Whether the role should have the REPLICATION attribute. Requires replacement if changed.
- access_
host_ strurl - 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_ strhost_ url - The database connection string for private connections
- private_
connection_ strservice_ name - 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.
- access
Host StringUrl - 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 StringHost Url - The database connection string for private connections
- private
Connection StringService Name - 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 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
planetscaleTerraform Provider.
published on Friday, Sep 18, 2026 by planetscale