planetscale 0.4.1 published on Tuesday, Mar 11, 2025 by planetscale
planetscale.getDatabaseRegions
Explore with Pulumi AI
planetscale 0.4.1 published on Tuesday, Mar 11, 2025 by planetscale
A list of PlanetScale regions.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as planetscale from "@pulumi/planetscale";
const example = planetscale.getDatabaseRegions({
    organization: "example.com",
    name: "example_db",
});
export const databaseRegions = example;
import pulumi
import pulumi_planetscale as planetscale
example = planetscale.get_database_regions(organization="example.com",
    name="example_db")
pulumi.export("databaseRegions", 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 {
		example, err := planetscale.GetDatabaseRegions(ctx, &planetscale.GetDatabaseRegionsArgs{
			Organization: "example.com",
			Name:         "example_db",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("databaseRegions", example)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Planetscale = Pulumi.Planetscale;
return await Deployment.RunAsync(() => 
{
    var example = Planetscale.GetDatabaseRegions.Invoke(new()
    {
        Organization = "example.com",
        Name = "example_db",
    });
    return new Dictionary<string, object?>
    {
        ["databaseRegions"] = 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.GetDatabaseRegionsArgs;
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.getDatabaseRegions(GetDatabaseRegionsArgs.builder()
            .organization("example.com")
            .name("example_db")
            .build());
        ctx.export("databaseRegions", example.applyValue(getDatabaseRegionsResult -> getDatabaseRegionsResult));
    }
}
variables:
  example:
    fn::invoke:
      function: planetscale:getDatabaseRegions
      arguments:
        organization: example.com
        name: example_db
outputs:
  databaseRegions: ${example}
Using getDatabaseRegions
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 getDatabaseRegions(args: GetDatabaseRegionsArgs, opts?: InvokeOptions): Promise<GetDatabaseRegionsResult>
function getDatabaseRegionsOutput(args: GetDatabaseRegionsOutputArgs, opts?: InvokeOptions): Output<GetDatabaseRegionsResult>def get_database_regions(name: Optional[str] = None,
                         organization: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetDatabaseRegionsResult
def get_database_regions_output(name: Optional[pulumi.Input[str]] = None,
                         organization: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetDatabaseRegionsResult]func GetDatabaseRegions(ctx *Context, args *GetDatabaseRegionsArgs, opts ...InvokeOption) (*GetDatabaseRegionsResult, error)
func GetDatabaseRegionsOutput(ctx *Context, args *GetDatabaseRegionsOutputArgs, opts ...InvokeOption) GetDatabaseRegionsResultOutput> Note: This function is named GetDatabaseRegions in the Go SDK.
public static class GetDatabaseRegions 
{
    public static Task<GetDatabaseRegionsResult> InvokeAsync(GetDatabaseRegionsArgs args, InvokeOptions? opts = null)
    public static Output<GetDatabaseRegionsResult> Invoke(GetDatabaseRegionsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDatabaseRegionsResult> getDatabaseRegions(GetDatabaseRegionsArgs args, InvokeOptions options)
public static Output<GetDatabaseRegionsResult> getDatabaseRegions(GetDatabaseRegionsArgs args, InvokeOptions options)
fn::invoke:
  function: planetscale:index/getDatabaseRegions:getDatabaseRegions
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
- The database for which the regions are available.
- Organization string
- The organization for which the regions are available.
- Name string
- The database for which the regions are available.
- Organization string
- The organization for which the regions are available.
- name String
- The database for which the regions are available.
- organization String
- The organization for which the regions are available.
- name string
- The database for which the regions are available.
- organization string
- The organization for which the regions are available.
- name str
- The database for which the regions are available.
- organization str
- The organization for which the regions are available.
- name String
- The database for which the regions are available.
- organization String
- The organization for which the regions are available.
getDatabaseRegions Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The database for which the regions are available.
- Organization string
- The organization for which the regions are available.
- Regions
List<GetDatabase Regions Region> 
- The list of regions available for the database.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The database for which the regions are available.
- Organization string
- The organization for which the regions are available.
- Regions
[]GetDatabase Regions Region 
- The list of regions available for the database.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The database for which the regions are available.
- organization String
- The organization for which the regions are available.
- regions
List<GetDatabase Regions Region> 
- The list of regions available for the database.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The database for which the regions are available.
- organization string
- The organization for which the regions are available.
- regions
GetDatabase Regions Region[] 
- The list of regions available for the database.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- The database for which the regions are available.
- organization str
- The organization for which the regions are available.
- regions
Sequence[GetDatabase Regions Region] 
- The list of regions available for the database.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The database for which the regions are available.
- organization String
- The organization for which the regions are available.
- regions List<Property Map>
- The list of regions available for the database.
Supporting Types
GetDatabaseRegionsRegion   
- 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