Google Cloud v9.4.0 published on Tuesday, Nov 4, 2025 by Pulumi
gcp.alloydb.getLocations
Start a Neo task
Explain and create a gcp.alloydb.getLocations resource
Use this data source to get information about the available locations. For more details refer the API docs.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const qa = gcp.alloydb.getLocations({});
import pulumi
import pulumi_gcp as gcp
qa = gcp.alloydb.get_locations()
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/alloydb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := alloydb.GetLocations(ctx, &alloydb.GetLocationsArgs{}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var qa = Gcp.Alloydb.GetLocations.Invoke();
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.alloydb.AlloydbFunctions;
import com.pulumi.gcp.alloydb.inputs.GetLocationsArgs;
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 qa = AlloydbFunctions.getLocations(GetLocationsArgs.builder()
.build());
}
}
variables:
qa:
fn::invoke:
function: gcp:alloydb:getLocations
arguments: {}
Using getLocations
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 getLocations(args: GetLocationsArgs, opts?: InvokeOptions): Promise<GetLocationsResult>
function getLocationsOutput(args: GetLocationsOutputArgs, opts?: InvokeOptions): Output<GetLocationsResult>def get_locations(project: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetLocationsResult
def get_locations_output(project: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetLocationsResult]func GetLocations(ctx *Context, args *GetLocationsArgs, opts ...InvokeOption) (*GetLocationsResult, error)
func GetLocationsOutput(ctx *Context, args *GetLocationsOutputArgs, opts ...InvokeOption) GetLocationsResultOutput> Note: This function is named GetLocations in the Go SDK.
public static class GetLocations
{
public static Task<GetLocationsResult> InvokeAsync(GetLocationsArgs args, InvokeOptions? opts = null)
public static Output<GetLocationsResult> Invoke(GetLocationsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetLocationsResult> getLocations(GetLocationsArgs args, InvokeOptions options)
public static Output<GetLocationsResult> getLocations(GetLocationsArgs args, InvokeOptions options)
fn::invoke:
function: gcp:alloydb/getLocations:getLocations
arguments:
# arguments dictionaryThe following arguments are supported:
- Project string
- The ID of the project.
- Project string
- The ID of the project.
- project String
- The ID of the project.
- project string
- The ID of the project.
- project str
- The ID of the project.
- project String
- The ID of the project.
getLocations Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Locations
List<Get
Locations Location> - Contains a list of
location, which contains the details about a particular location. - Project string
- Id string
- The provider-assigned unique ID for this managed resource.
- Locations
[]Get
Locations Location - Contains a list of
location, which contains the details about a particular location. - Project string
- id String
- The provider-assigned unique ID for this managed resource.
- locations
List<Get
Locations Location> - Contains a list of
location, which contains the details about a particular location. - project String
- id string
- The provider-assigned unique ID for this managed resource.
- locations
Get
Locations Location[] - Contains a list of
location, which contains the details about a particular location. - project string
- id str
- The provider-assigned unique ID for this managed resource.
- locations
Sequence[Get
Locations Location] - Contains a list of
location, which contains the details about a particular location. - project str
- id String
- The provider-assigned unique ID for this managed resource.
- locations List<Property Map>
- Contains a list of
location, which contains the details about a particular location. - project String
Supporting Types
GetLocationsLocation
- Display
Name string - The friendly name for this location, typically a nearby city name. For example, "Tokyo".
- Labels Dictionary<string, string>
- Cross-service attributes for the location. For example
{"cloud.googleapis.com/region": "us-east1"}. - Location
Id string - The canonical id for this location. For example: "us-east1"..
- Metadata Dictionary<string, string>
- Service-specific metadata. For example the available capacity at the given location.
- Name string
- Resource name for the location, which may vary between implementations. For example: "projects/example-project/locations/us-east1".
- Display
Name string - The friendly name for this location, typically a nearby city name. For example, "Tokyo".
- Labels map[string]string
- Cross-service attributes for the location. For example
{"cloud.googleapis.com/region": "us-east1"}. - Location
Id string - The canonical id for this location. For example: "us-east1"..
- Metadata map[string]string
- Service-specific metadata. For example the available capacity at the given location.
- Name string
- Resource name for the location, which may vary between implementations. For example: "projects/example-project/locations/us-east1".
- display
Name String - The friendly name for this location, typically a nearby city name. For example, "Tokyo".
- labels Map<String,String>
- Cross-service attributes for the location. For example
{"cloud.googleapis.com/region": "us-east1"}. - location
Id String - The canonical id for this location. For example: "us-east1"..
- metadata Map<String,String>
- Service-specific metadata. For example the available capacity at the given location.
- name String
- Resource name for the location, which may vary between implementations. For example: "projects/example-project/locations/us-east1".
- display
Name string - The friendly name for this location, typically a nearby city name. For example, "Tokyo".
- labels {[key: string]: string}
- Cross-service attributes for the location. For example
{"cloud.googleapis.com/region": "us-east1"}. - location
Id string - The canonical id for this location. For example: "us-east1"..
- metadata {[key: string]: string}
- Service-specific metadata. For example the available capacity at the given location.
- name string
- Resource name for the location, which may vary between implementations. For example: "projects/example-project/locations/us-east1".
- display_
name str - The friendly name for this location, typically a nearby city name. For example, "Tokyo".
- labels Mapping[str, str]
- Cross-service attributes for the location. For example
{"cloud.googleapis.com/region": "us-east1"}. - location_
id str - The canonical id for this location. For example: "us-east1"..
- metadata Mapping[str, str]
- Service-specific metadata. For example the available capacity at the given location.
- name str
- Resource name for the location, which may vary between implementations. For example: "projects/example-project/locations/us-east1".
- display
Name String - The friendly name for this location, typically a nearby city name. For example, "Tokyo".
- labels Map<String>
- Cross-service attributes for the location. For example
{"cloud.googleapis.com/region": "us-east1"}. - location
Id String - The canonical id for this location. For example: "us-east1"..
- metadata Map<String>
- Service-specific metadata. For example the available capacity at the given location.
- name String
- Resource name for the location, which may vary between implementations. For example: "projects/example-project/locations/us-east1".
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.
