1. Packages
  2. Planetscale Provider
  3. API Docs
  4. getPasswords
planetscale 0.6.0 published on Sunday, Apr 27, 2025 by planetscale

planetscale.getPasswords

Explore with Pulumi AI

A list of PlanetScale database passwords.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as planetscale from "@pulumi/planetscale";

const example = planetscale.getPasswords({
    organization: "example",
    database: "example_db",
    branch: "main",
});
export const passwords = example;
Copy
import pulumi
import pulumi_planetscale as planetscale

example = planetscale.get_passwords(organization="example",
    database="example_db",
    branch="main")
pulumi.export("passwords", example)
Copy
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 {
		example, err := planetscale.GetPasswords(ctx, &planetscale.GetPasswordsArgs{
			Organization: "example",
			Database:     "example_db",
			Branch:       "main",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("passwords", example)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Planetscale = Pulumi.Planetscale;

return await Deployment.RunAsync(() => 
{
    var example = Planetscale.GetPasswords.Invoke(new()
    {
        Organization = "example",
        Database = "example_db",
        Branch = "main",
    });

    return new Dictionary<string, object?>
    {
        ["passwords"] = example,
    };
});
Copy
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.GetPasswordsArgs;
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.getPasswords(GetPasswordsArgs.builder()
            .organization("example")
            .database("example_db")
            .branch("main")
            .build());

        ctx.export("passwords", example.applyValue(getPasswordsResult -> getPasswordsResult));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: planetscale:getPasswords
      arguments:
        organization: example
        database: example_db
        branch: main
outputs:
  passwords: ${example}
Copy

Using getPasswords

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 getPasswords(args: GetPasswordsArgs, opts?: InvokeOptions): Promise<GetPasswordsResult>
function getPasswordsOutput(args: GetPasswordsOutputArgs, opts?: InvokeOptions): Output<GetPasswordsResult>
Copy
def get_passwords(branch: Optional[str] = None,
                  database: Optional[str] = None,
                  organization: Optional[str] = None,
                  read_only_region_id: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetPasswordsResult
def get_passwords_output(branch: Optional[pulumi.Input[str]] = None,
                  database: 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[GetPasswordsResult]
Copy
func GetPasswords(ctx *Context, args *GetPasswordsArgs, opts ...InvokeOption) (*GetPasswordsResult, error)
func GetPasswordsOutput(ctx *Context, args *GetPasswordsOutputArgs, opts ...InvokeOption) GetPasswordsResultOutput
Copy

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

public static class GetPasswords 
{
    public static Task<GetPasswordsResult> InvokeAsync(GetPasswordsArgs args, InvokeOptions? opts = null)
    public static Output<GetPasswordsResult> Invoke(GetPasswordsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetPasswordsResult> getPasswords(GetPasswordsArgs args, InvokeOptions options)
public static Output<GetPasswordsResult> getPasswords(GetPasswordsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: planetscale:index/getPasswords:getPasswords
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Branch This property is required. string
Database This property is required. string
Organization This property is required. string
ReadOnlyRegionId string
Branch This property is required. string
Database This property is required. string
Organization This property is required. string
ReadOnlyRegionId string
branch This property is required. String
database This property is required. String
organization This property is required. String
readOnlyRegionId String
branch This property is required. string
database This property is required. string
organization This property is required. string
readOnlyRegionId string
branch This property is required. str
database This property is required. str
organization This property is required. str
read_only_region_id str
branch This property is required. String
database This property is required. String
organization This property is required. String
readOnlyRegionId String

getPasswords Result

The following output properties are available:

Branch string
Database string
Id string
The provider-assigned unique ID for this managed resource.
Organization string
Passwords List<GetPasswordsPassword>
ReadOnlyRegionId string
Branch string
Database string
Id string
The provider-assigned unique ID for this managed resource.
Organization string
Passwords []GetPasswordsPassword
ReadOnlyRegionId string
branch String
database String
id String
The provider-assigned unique ID for this managed resource.
organization String
passwords List<GetPasswordsPassword>
readOnlyRegionId String
branch string
database string
id string
The provider-assigned unique ID for this managed resource.
organization string
passwords GetPasswordsPassword[]
readOnlyRegionId string
branch str
database str
id str
The provider-assigned unique ID for this managed resource.
organization str
passwords Sequence[GetPasswordsPassword]
read_only_region_id str
branch String
database String
id String
The provider-assigned unique ID for this managed resource.
organization String
passwords List<Property Map>
readOnlyRegionId String

Supporting Types

GetPasswordsPassword

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

GetPasswordsPasswordActor

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

GetPasswordsPasswordDatabaseBranch

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

GetPasswordsPasswordRegion

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.