planetscalevitessbranch_password (Resource)
June 1, 2026 ยท View on GitHub
VitessBranchPassword Resource
Example Usage
resource "planetscale_vitess_branch_password" "my_vitessbranchpassword" {
organization = "my-organization"
database = "ru00w3vqvfr9"
branch = "2474dzfubrf3"
role = "admin"
}
Schema
Required
branch(String) The name of the branch the password belongs todatabase(String) The name of the database the password belongs toorganization(String) The name of the organization the password belongs to
Optional
cidrs(List of String) List of IP addresses or CIDR ranges that can use this passworddirect_vtgate(Boolean) Whether the password connects directly to a VTGate. Requires replacement if changed.name(String) Optional name of the passwordreplica(Boolean) Whether the password is for a read replica. Requires replacement if changed.role(String) The database role of the password (i.e. admin). must be one of ["reader", "writer", "admin", "readwriter"]; Requires replacement if changed.ttl(Number) Time to live (in seconds) for the password. The password will be invalid when TTL has passed. Requires replacement if changed.
Read-Only
access_host_regional_url(String) The regional host URLaccess_host_regional_urls(List of String) The read-only replica host URLsaccess_host_url(String) The host URL for the passwordactor(Attributes) (see below for nested schema)created_at(String) When the password was createddatabase_branch(Attributes) (see below for nested schema)deleted_at(String) When the password was deleteddirect_vtgate_addresses(List of String) The list of hosts in each availability zone providing direct access to a vtgateexpired(Boolean) True if the credentials are expiredexpires_at(String) When the password will expireid(String) The ID of the passwordlast_used_at(String) When the password was last used to execute a queryplain_text(String, Sensitive) The plain text password. Null except in the response from the create endpoint.region(Attributes) (see below for nested schema)renewable(Boolean) Whether or not the password can be renewedttl_seconds(Number) Time to live (in seconds) for the password. The password will be invalid when TTL has passedusername(String) The username for the password
Nested Schema for actor
Read-Only:
avatar_url(String) The URL of the actor's avatardisplay_name(String) The name of the actorid(String) The ID of the actor
Nested Schema for database_branch
Read-Only:
id(String) The ID for the branchmysql_edge_address(String) The address of the MySQL provider for the branchname(String) The name for the branchprivate_edge_connectivity(Boolean) True if private connectivity is enabledproduction(Boolean) Whether or not the branch is a production branch
Nested Schema for region
Read-Only:
current_default(Boolean) True if the region is the default for new branch creationdisplay_name(String) Name of the regionenabled(Boolean) Whether or not the region is currently activeid(String) The ID of the regionlocation(String) Location of the regionmysql_supported(Boolean) Whether the region supports MySQL/Vitess databasespostgresql_supported(Boolean) Whether the region supports PostgreSQL databasesprovider(String) Provider for the region (ex. AWS)public_ip_addresses(List of String) Public IP addresses for the regionslug(String) The slug of the region
Import
Import is supported using the following syntax:
In Terraform v1.5.0 and later, the import block can be used with the id attribute, for example:
import {
to = planetscale_vitess_branch_password.my_planetscale_vitess_branch_password
id = jsonencode({
branch = "..."
database = "..."
id = "..."
organization = "..."
})
}
The terraform import command can be used, for example:
terraform import planetscale_vitess_branch_password.my_planetscale_vitess_branch_password '{"branch": "...", "database": "...", "id": "...", "organization": "..."}'