planetscale 0.4.1 published on Tuesday, Mar 11, 2025 by planetscale
planetscale.getDatabaseReadOnlyRegions
Explore with Pulumi AI
planetscale 0.4.1 published on Tuesday, Mar 11, 2025 by planetscale
A list of PlanetScale read-only regions.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as planetscale from "@pulumi/planetscale";
const example = planetscale.getDatabaseReadOnlyRegions({
    organization: "example.com",
    name: "example_db",
});
export const databaseRoRegions = data.planetscale_database_regions.example;
import pulumi
import pulumi_planetscale as planetscale
example = planetscale.get_database_read_only_regions(organization="example.com",
    name="example_db")
pulumi.export("databaseRoRegions", data["planetscale_database_regions"]["example"])
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 {
		_, err := planetscale.GetDatabaseReadOnlyRegions(ctx, &planetscale.GetDatabaseReadOnlyRegionsArgs{
			Organization: "example.com",
			Name:         "example_db",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("databaseRoRegions", data.Planetscale_database_regions.Example)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Planetscale = Pulumi.Planetscale;
return await Deployment.RunAsync(() => 
{
    var example = Planetscale.GetDatabaseReadOnlyRegions.Invoke(new()
    {
        Organization = "example.com",
        Name = "example_db",
    });
    return new Dictionary<string, object?>
    {
        ["databaseRoRegions"] = data.Planetscale_database_regions.Example,
    };
});
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.GetDatabaseReadOnlyRegionsArgs;
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.getDatabaseReadOnlyRegions(GetDatabaseReadOnlyRegionsArgs.builder()
            .organization("example.com")
            .name("example_db")
            .build());
        ctx.export("databaseRoRegions", data.planetscale_database_regions().example());
    }
}
variables:
  example:
    fn::invoke:
      function: planetscale:getDatabaseReadOnlyRegions
      arguments:
        organization: example.com
        name: example_db
outputs:
  databaseRoRegions: ${data.planetscale_database_regions.example}
Using getDatabaseReadOnlyRegions
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 getDatabaseReadOnlyRegions(args: GetDatabaseReadOnlyRegionsArgs, opts?: InvokeOptions): Promise<GetDatabaseReadOnlyRegionsResult>
function getDatabaseReadOnlyRegionsOutput(args: GetDatabaseReadOnlyRegionsOutputArgs, opts?: InvokeOptions): Output<GetDatabaseReadOnlyRegionsResult>def get_database_read_only_regions(name: Optional[str] = None,
                                   organization: Optional[str] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetDatabaseReadOnlyRegionsResult
def get_database_read_only_regions_output(name: Optional[pulumi.Input[str]] = None,
                                   organization: Optional[pulumi.Input[str]] = None,
                                   opts: Optional[InvokeOptions] = None) -> Output[GetDatabaseReadOnlyRegionsResult]func GetDatabaseReadOnlyRegions(ctx *Context, args *GetDatabaseReadOnlyRegionsArgs, opts ...InvokeOption) (*GetDatabaseReadOnlyRegionsResult, error)
func GetDatabaseReadOnlyRegionsOutput(ctx *Context, args *GetDatabaseReadOnlyRegionsOutputArgs, opts ...InvokeOption) GetDatabaseReadOnlyRegionsResultOutput> Note: This function is named GetDatabaseReadOnlyRegions in the Go SDK.
public static class GetDatabaseReadOnlyRegions 
{
    public static Task<GetDatabaseReadOnlyRegionsResult> InvokeAsync(GetDatabaseReadOnlyRegionsArgs args, InvokeOptions? opts = null)
    public static Output<GetDatabaseReadOnlyRegionsResult> Invoke(GetDatabaseReadOnlyRegionsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDatabaseReadOnlyRegionsResult> getDatabaseReadOnlyRegions(GetDatabaseReadOnlyRegionsArgs args, InvokeOptions options)
public static Output<GetDatabaseReadOnlyRegionsResult> getDatabaseReadOnlyRegions(GetDatabaseReadOnlyRegionsArgs args, InvokeOptions options)
fn::invoke:
  function: planetscale:index/getDatabaseReadOnlyRegions:getDatabaseReadOnlyRegions
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
- The name of the database for which the read-only regions are available.
- Organization string
- The organization for which the read-only regions are available.
- Name string
- The name of the database for which the read-only regions are available.
- Organization string
- The organization for which the read-only regions are available.
- name String
- The name of the database for which the read-only regions are available.
- organization String
- The organization for which the read-only regions are available.
- name string
- The name of the database for which the read-only regions are available.
- organization string
- The organization for which the read-only regions are available.
- name str
- The name of the database for which the read-only regions are available.
- organization str
- The organization for which the read-only regions are available.
- name String
- The name of the database for which the read-only regions are available.
- organization String
- The organization for which the read-only regions are available.
getDatabaseReadOnlyRegions Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the database for which the read-only regions are available.
- Organization string
- The organization for which the read-only regions are available.
- Regions
List<GetDatabase Read Only Regions Region> 
- The list of read-only regions available for the database.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the database for which the read-only regions are available.
- Organization string
- The organization for which the read-only regions are available.
- Regions
[]GetDatabase Read Only Regions Region 
- The list of read-only regions available for the database.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the database for which the read-only regions are available.
- organization String
- The organization for which the read-only regions are available.
- regions
List<GetDatabase Read Only Regions Region> 
- The list of read-only regions available for the database.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The name of the database for which the read-only regions are available.
- organization string
- The organization for which the read-only regions are available.
- regions
GetDatabase Read Only Regions Region[] 
- The list of read-only regions available for the database.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- The name of the database for which the read-only regions are available.
- organization str
- The organization for which the read-only regions are available.
- regions
Sequence[GetDatabase Read Only Regions Region] 
- The list of read-only regions available for the database.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the database for which the read-only regions are available.
- organization String
- The organization for which the read-only regions are available.
- regions List<Property Map>
- The list of read-only regions available for the database.
Supporting Types
GetDatabaseReadOnlyRegionsRegion     
- Actor
GetDatabase Read Only Regions Region Actor 
- The actor that created the read-only region.
- CreatedAt string
- When the read-only region was created.
- DisplayName string
- The name of the read-only region.
- Id string
- The ID of the read-only region.
- Ready bool
- Whether or not the read-only region is ready to serve queries.
- ReadyAt string
- When the read-only region was ready to serve queries.
- Region
GetDatabase Read Only Regions Region Region 
- The details of the read-only region.
- UpdatedAt string
- When the read-only region was last updated.
- Actor
GetDatabase Read Only Regions Region Actor 
- The actor that created the read-only region.
- CreatedAt string
- When the read-only region was created.
- DisplayName string
- The name of the read-only region.
- Id string
- The ID of the read-only region.
- Ready bool
- Whether or not the read-only region is ready to serve queries.
- ReadyAt string
- When the read-only region was ready to serve queries.
- Region
GetDatabase Read Only Regions Region Region 
- The details of the read-only region.
- UpdatedAt string
- When the read-only region was last updated.
- actor
GetDatabase Read Only Regions Region Actor 
- The actor that created the read-only region.
- createdAt String
- When the read-only region was created.
- displayName String
- The name of the read-only region.
- id String
- The ID of the read-only region.
- ready Boolean
- Whether or not the read-only region is ready to serve queries.
- readyAt String
- When the read-only region was ready to serve queries.
- region
GetDatabase Read Only Regions Region Region 
- The details of the read-only region.
- updatedAt String
- When the read-only region was last updated.
- actor
GetDatabase Read Only Regions Region Actor 
- The actor that created the read-only region.
- createdAt string
- When the read-only region was created.
- displayName string
- The name of the read-only region.
- id string
- The ID of the read-only region.
- ready boolean
- Whether or not the read-only region is ready to serve queries.
- readyAt string
- When the read-only region was ready to serve queries.
- region
GetDatabase Read Only Regions Region Region 
- The details of the read-only region.
- updatedAt string
- When the read-only region was last updated.
- actor
GetDatabase Read Only Regions Region Actor 
- The actor that created the read-only region.
- created_at str
- When the read-only region was created.
- display_name str
- The name of the read-only region.
- id str
- The ID of the read-only region.
- ready bool
- Whether or not the read-only region is ready to serve queries.
- ready_at str
- When the read-only region was ready to serve queries.
- region
GetDatabase Read Only Regions Region Region 
- The details of the read-only region.
- updated_at str
- When the read-only region was last updated.
- actor Property Map
- The actor that created the read-only region.
- createdAt String
- When the read-only region was created.
- displayName String
- The name of the read-only region.
- id String
- The ID of the read-only region.
- ready Boolean
- Whether or not the read-only region is ready to serve queries.
- readyAt String
- When the read-only region was ready to serve queries.
- region Property Map
- The details of the read-only region.
- updatedAt String
- When the read-only region was last updated.
GetDatabaseReadOnlyRegionsRegionActor      
- AvatarUrl string
- The URL of the actor's avatar
- DisplayName string
- The name of the actor
- Id string
- The ID of the actor
- AvatarUrl string
- The URL of the actor's avatar
- DisplayName string
- The name of the actor
- Id string
- The ID of the actor
- avatarUrl String
- The URL of the actor's avatar
- displayName String
- The name of the actor
- id String
- The ID of the actor
- avatarUrl string
- The URL of the actor's avatar
- displayName string
- The name of the actor
- id string
- The ID of the actor
- avatar_url str
- The URL of the actor's avatar
- display_name str
- The name of the actor
- id str
- The ID of the actor
- avatarUrl String
- The URL of the actor's avatar
- displayName String
- The name of the actor
- id String
- The ID of the actor
GetDatabaseReadOnlyRegionsRegionRegion      
- DisplayName string
- Name of the region.
- Enabled bool
- Whether or not the region is currently active.
- Id string
- The ID of the region.
- Location string
- Location of the region.
- Provider string
- Provider for the region (ex. AWS).
- PublicIp List<string>Addresses 
- Public IP addresses for the region.
- Slug string
- The slug of the region.
- DisplayName string
- Name of the region.
- Enabled bool
- Whether or not the region is currently active.
- Id string
- The ID of the region.
- Location string
- Location of the region.
- Provider string
- Provider for the region (ex. AWS).
- PublicIp []stringAddresses 
- Public IP addresses for the region.
- Slug string
- The slug of the region.
- displayName String
- Name of the region.
- enabled Boolean
- Whether or not the region is currently active.
- id String
- The ID of the region.
- location String
- Location of the region.
- provider String
- Provider for the region (ex. AWS).
- publicIp List<String>Addresses 
- Public IP addresses for the region.
- slug String
- The slug of the region.
- displayName string
- Name of the region.
- enabled boolean
- Whether or not the region is currently active.
- id string
- The ID of the region.
- location string
- Location of the region.
- provider string
- Provider for the region (ex. AWS).
- publicIp string[]Addresses 
- Public IP addresses for the region.
- slug string
- The slug of the region.
- display_name str
- Name of the region.
- enabled bool
- Whether or not the region is currently active.
- id str
- The ID of the region.
- location str
- Location of the region.
- provider str
- Provider for the region (ex. AWS).
- public_ip_ Sequence[str]addresses 
- Public IP addresses for the region.
- slug str
- The slug of the region.
- displayName String
- Name of the region.
- enabled Boolean
- Whether or not the region is currently active.
- id String
- The ID of the region.
- location String
- Location of the region.
- provider String
- Provider for the region (ex. AWS).
- publicIp List<String>Addresses 
- Public IP addresses for the region.
- slug String
- The slug of the region.
Package Details
- Repository
- planetscale planetscale/terraform-provider-planetscale
- License
- Notes
- This Pulumi package is based on the planetscaleTerraform Provider.
planetscale 0.4.1 published on Tuesday, Mar 11, 2025 by planetscale