1. Packages
  2. Planetscale Provider
  3. API Docs
  4. getPassword
planetscale 0.5.0 published on Saturday, Apr 5, 2025 by planetscale

planetscale.getPassword

Explore with Pulumi AI

planetscale 0.5.0 published on Saturday, Apr 5, 2025 by planetscale

A PlanetScale database password.

Example Usage

Coming soon!
Coming soon!
Coming soon!
Coming soon!
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.planetscale.PlanetscaleFunctions;
import com.pulumi.planetscale.inputs.GetPasswordArgs;
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) {
        final var example = PlanetscaleFunctions.getPassword(GetPasswordArgs.builder()
            .organization("example")
            .database("example_db")
            .branch("main")
            .name("antoine-was-here")
            .build());

        ctx.export("password", example.applyValue(getPasswordResult -> getPasswordResult));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: planetscale:getPassword
      arguments:
        organization: example
        database: example_db
        branch: main
        name: antoine-was-here
outputs:
  password: ${example}
Copy

Using getPassword

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getPassword(args: GetPasswordArgs, opts?: InvokeOptions): Promise<GetPasswordResult>
function getPasswordOutput(args: GetPasswordOutputArgs, opts?: InvokeOptions): Output<GetPasswordResult>
Copy
def get_password(branch: Optional[str] = None,
                 database: Optional[str] = None,
                 id: Optional[str] = None,
                 organization: Optional[str] = None,
                 read_only_region_id: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetPasswordResult
def get_password_output(branch: Optional[pulumi.Input[str]] = None,
                 database: Optional[pulumi.Input[str]] = None,
                 id: Optional[pulumi.Input[str]] = None,
                 organization: Optional[pulumi.Input[str]] = None,
                 read_only_region_id: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetPasswordResult]
Copy
func LookupPassword(ctx *Context, args *LookupPasswordArgs, opts ...InvokeOption) (*LookupPasswordResult, error)
func LookupPasswordOutput(ctx *Context, args *LookupPasswordOutputArgs, opts ...InvokeOption) LookupPasswordResultOutput
Copy

> Note: This function is named LookupPassword in the Go SDK.

public static class GetPassword 
{
    public static Task<GetPasswordResult> InvokeAsync(GetPasswordArgs args, InvokeOptions? opts = null)
    public static Output<GetPasswordResult> Invoke(GetPasswordInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetPasswordResult> getPassword(GetPasswordArgs args, InvokeOptions options)
public static Output<GetPasswordResult> getPassword(GetPasswordArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: planetscale:index/getPassword:getPassword
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Branch This property is required. string
The branch this password belongs to..
Database This property is required. string
The database this branch password belongs to.
Id This property is required. string
The ID for the password.
Organization This property is required. string
The organization this database branch password belongs to.
ReadOnlyRegionId string
If the password is for a read-only region, the ID of the region.
Branch This property is required. string
The branch this password belongs to..
Database This property is required. string
The database this branch password belongs to.
Id This property is required. string
The ID for the password.
Organization This property is required. string
The organization this database branch password belongs to.
ReadOnlyRegionId string
If the password is for a read-only region, the ID of the region.
branch This property is required. String
The branch this password belongs to..
database This property is required. String
The database this branch password belongs to.
id This property is required. String
The ID for the password.
organization This property is required. String
The organization this database branch password belongs to.
readOnlyRegionId String
If the password is for a read-only region, the ID of the region.
branch This property is required. string
The branch this password belongs to..
database This property is required. string
The database this branch password belongs to.
id This property is required. string
The ID for the password.
organization This property is required. string
The organization this database branch password belongs to.
readOnlyRegionId string
If the password is for a read-only region, the ID of the region.
branch This property is required. str
The branch this password belongs to..
database This property is required. str
The database this branch password belongs to.
id This property is required. str
The ID for the password.
organization This property is required. str
The organization this database branch password belongs to.
read_only_region_id str
If the password is for a read-only region, the ID of the region.
branch This property is required. String
The branch this password belongs to..
database This property is required. String
The database this branch password belongs to.
id This property is required. String
The ID for the password.
organization This property is required. String
The organization this database branch password belongs to.
readOnlyRegionId String
If the password is for a read-only region, the ID of the region.

getPassword Result

The following output properties are available:

AccessHostUrl string
The host URL for the password.
Actor GetPasswordActor
The actor that created this branch.
Branch string
The branch this password belongs to..
CreatedAt string
When the password was created.
Database string
The database this branch password belongs to.
DatabaseBranch GetPasswordDatabaseBranch
The branch this password is allowed to access.
DeletedAt string
When the password was deleted.
ExpiresAt string
When the password will expire.
Id string
The ID for the password.
Name string
The display name for the password.
Organization string
The organization this database branch password belongs to.
Region GetPasswordRegion
The region in which this password can be used.
Renewable bool
Whether or not the password can be renewed.
Role string
The role for the password.
TtlSeconds double
Time to live (in seconds) for the password. The password will be invalid and unrenewable when TTL has passed.
Username string
The username for the password.
ReadOnlyRegionId string
If the password is for a read-only region, the ID of the region.
AccessHostUrl string
The host URL for the password.
Actor GetPasswordActor
The actor that created this branch.
Branch string
The branch this password belongs to..
CreatedAt string
When the password was created.
Database string
The database this branch password belongs to.
DatabaseBranch GetPasswordDatabaseBranch
The branch this password is allowed to access.
DeletedAt string
When the password was deleted.
ExpiresAt string
When the password will expire.
Id string
The ID for the password.
Name string
The display name for the password.
Organization string
The organization this database branch password belongs to.
Region GetPasswordRegion
The region in which this password can be used.
Renewable bool
Whether or not the password can be renewed.
Role string
The role for the password.
TtlSeconds float64
Time to live (in seconds) for the password. The password will be invalid and unrenewable when TTL has passed.
Username string
The username for the password.
ReadOnlyRegionId string
If the password is for a read-only region, the ID of the region.
accessHostUrl String
The host URL for the password.
actor GetPasswordActor
The actor that created this branch.
branch String
The branch this password belongs to..
createdAt String
When the password was created.
database String
The database this branch password belongs to.
databaseBranch GetPasswordDatabaseBranch
The branch this password is allowed to access.
deletedAt String
When the password was deleted.
expiresAt String
When the password will expire.
id String
The ID for the password.
name String
The display name for the password.
organization String
The organization this database branch password belongs to.
region GetPasswordRegion
The region in which this password can be used.
renewable Boolean
Whether or not the password can be renewed.
role String
The role for the password.
ttlSeconds Double
Time to live (in seconds) for the password. The password will be invalid and unrenewable when TTL has passed.
username String
The username for the password.
readOnlyRegionId String
If the password is for a read-only region, the ID of the region.
accessHostUrl string
The host URL for the password.
actor GetPasswordActor
The actor that created this branch.
branch string
The branch this password belongs to..
createdAt string
When the password was created.
database string
The database this branch password belongs to.
databaseBranch GetPasswordDatabaseBranch
The branch this password is allowed to access.
deletedAt string
When the password was deleted.
expiresAt string
When the password will expire.
id string
The ID for the password.
name string
The display name for the password.
organization string
The organization this database branch password belongs to.
region GetPasswordRegion
The region in which this password can be used.
renewable boolean
Whether or not the password can be renewed.
role string
The role for the password.
ttlSeconds number
Time to live (in seconds) for the password. The password will be invalid and unrenewable when TTL has passed.
username string
The username for the password.
readOnlyRegionId string
If the password is for a read-only region, the ID of the region.
access_host_url str
The host URL for the password.
actor GetPasswordActor
The actor that created this branch.
branch str
The branch this password belongs to..
created_at str
When the password was created.
database str
The database this branch password belongs to.
database_branch GetPasswordDatabaseBranch
The branch this password is allowed to access.
deleted_at str
When the password was deleted.
expires_at str
When the password will expire.
id str
The ID for the password.
name str
The display name for the password.
organization str
The organization this database branch password belongs to.
region GetPasswordRegion
The region in which this password can be used.
renewable bool
Whether or not the password can be renewed.
role str
The role for the password.
ttl_seconds float
Time to live (in seconds) for the password. The password will be invalid and unrenewable when TTL has passed.
username str
The username for the password.
read_only_region_id str
If the password is for a read-only region, the ID of the region.
accessHostUrl String
The host URL for the password.
actor Property Map
The actor that created this branch.
branch String
The branch this password belongs to..
createdAt String
When the password was created.
database String
The database this branch password belongs to.
databaseBranch Property Map
The branch this password is allowed to access.
deletedAt String
When the password was deleted.
expiresAt String
When the password will expire.
id String
The ID for the password.
name String
The display name for the password.
organization String
The organization this database branch password belongs to.
region Property Map
The region in which this password can be used.
renewable Boolean
Whether or not the password can be renewed.
role String
The role for the password.
ttlSeconds Number
Time to live (in seconds) for the password. The password will be invalid and unrenewable when TTL has passed.
username String
The username for the password.
readOnlyRegionId String
If the password is for a read-only region, the ID of the region.

Supporting Types

GetPasswordActor

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

GetPasswordDatabaseBranch

AccessHostUrl This property is required. string
Id This property is required. string
MysqlEdgeAddress This property is required. string
Name This property is required. string
Production This property is required. bool
AccessHostUrl This property is required. string
Id This property is required. string
MysqlEdgeAddress This property is required. string
Name This property is required. string
Production This property is required. bool
accessHostUrl This property is required. String
id This property is required. String
mysqlEdgeAddress This property is required. String
name This property is required. String
production This property is required. Boolean
accessHostUrl This property is required. string
id This property is required. string
mysqlEdgeAddress This property is required. string
name This property is required. string
production This property is required. boolean
access_host_url This property is required. str
id This property is required. str
mysql_edge_address This property is required. str
name This property is required. str
production This property is required. bool
accessHostUrl This property is required. String
id This property is required. String
mysqlEdgeAddress This property is required. String
name This property is required. String
production This property is required. Boolean

GetPasswordRegion

DisplayName This property is required. string
Name of the region.
Enabled This property is required. bool
Whether or not the region is currently active.
Id This property is required. string
The ID of the region.
Location This property is required. string
Location of the region.
Provider This property is required. string
Provider for the region (ex. AWS).
PublicIpAddresses This property is required. List<string>
Public IP addresses for the region.
Slug This property is required. string
The slug of the region.
DisplayName This property is required. string
Name of the region.
Enabled This property is required. bool
Whether or not the region is currently active.
Id This property is required. string
The ID of the region.
Location This property is required. string
Location of the region.
Provider This property is required. string
Provider for the region (ex. AWS).
PublicIpAddresses This property is required. []string
Public IP addresses for the region.
Slug This property is required. string
The slug of the region.
displayName This property is required. String
Name of the region.
enabled This property is required. Boolean
Whether or not the region is currently active.
id This property is required. String
The ID of the region.
location This property is required. String
Location of the region.
provider This property is required. String
Provider for the region (ex. AWS).
publicIpAddresses This property is required. List<String>
Public IP addresses for the region.
slug This property is required. String
The slug of the region.
displayName This property is required. string
Name of the region.
enabled This property is required. boolean
Whether or not the region is currently active.
id This property is required. string
The ID of the region.
location This property is required. string
Location of the region.
provider This property is required. string
Provider for the region (ex. AWS).
publicIpAddresses This property is required. string[]
Public IP addresses for the region.
slug This property is required. string
The slug of the region.
display_name This property is required. str
Name of the region.
enabled This property is required. bool
Whether or not the region is currently active.
id This property is required. str
The ID of the region.
location This property is required. str
Location of the region.
provider This property is required. str
Provider for the region (ex. AWS).
public_ip_addresses This property is required. Sequence[str]
Public IP addresses for the region.
slug This property is required. str
The slug of the region.
displayName This property is required. String
Name of the region.
enabled This property is required. Boolean
Whether or not the region is currently active.
id This property is required. String
The ID of the region.
location This property is required. String
Location of the region.
provider This property is required. String
Provider for the region (ex. AWS).
publicIpAddresses This property is required. List<String>
Public IP addresses for the region.
slug This property is required. String
The slug of the region.

Package Details

Repository
planetscale planetscale/terraform-provider-planetscale
License
Notes
This Pulumi package is based on the planetscale Terraform Provider.
planetscale 0.5.0 published on Saturday, Apr 5, 2025 by planetscale