1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. getZones
Google Cloud v8.25.0 published on Thursday, Apr 3, 2025 by Pulumi

gcp.compute.getZones

Explore with Pulumi AI

Google Cloud v8.25.0 published on Thursday, Apr 3, 2025 by Pulumi

Provides access to available Google Compute zones in a region for a given project. See more about regions and zones in the upstream docs.

Using getZones

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 getZones(args: GetZonesArgs, opts?: InvokeOptions): Promise<GetZonesResult>
function getZonesOutput(args: GetZonesOutputArgs, opts?: InvokeOptions): Output<GetZonesResult>
Copy
def get_zones(project: Optional[str] = None,
              region: Optional[str] = None,
              status: Optional[str] = None,
              opts: Optional[InvokeOptions] = None) -> GetZonesResult
def get_zones_output(project: Optional[pulumi.Input[str]] = None,
              region: Optional[pulumi.Input[str]] = None,
              status: Optional[pulumi.Input[str]] = None,
              opts: Optional[InvokeOptions] = None) -> Output[GetZonesResult]
Copy
func GetZones(ctx *Context, args *GetZonesArgs, opts ...InvokeOption) (*GetZonesResult, error)
func GetZonesOutput(ctx *Context, args *GetZonesOutputArgs, opts ...InvokeOption) GetZonesResultOutput
Copy

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

public static class GetZones 
{
    public static Task<GetZonesResult> InvokeAsync(GetZonesArgs args, InvokeOptions? opts = null)
    public static Output<GetZonesResult> Invoke(GetZonesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetZonesResult> getZones(GetZonesArgs args, InvokeOptions options)
public static Output<GetZonesResult> getZones(GetZonesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: gcp:compute/getZones:getZones
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Project string
Project from which to list available zones. Defaults to project declared in the provider.
Region string
Region from which to list available zones. Defaults to region declared in the provider.
Status string
Allows to filter list of zones based on their current status. Status can be either UP or DOWN. Defaults to no filtering (all available zones - both UP and DOWN).
Project string
Project from which to list available zones. Defaults to project declared in the provider.
Region string
Region from which to list available zones. Defaults to region declared in the provider.
Status string
Allows to filter list of zones based on their current status. Status can be either UP or DOWN. Defaults to no filtering (all available zones - both UP and DOWN).
project String
Project from which to list available zones. Defaults to project declared in the provider.
region String
Region from which to list available zones. Defaults to region declared in the provider.
status String
Allows to filter list of zones based on their current status. Status can be either UP or DOWN. Defaults to no filtering (all available zones - both UP and DOWN).
project string
Project from which to list available zones. Defaults to project declared in the provider.
region string
Region from which to list available zones. Defaults to region declared in the provider.
status string
Allows to filter list of zones based on their current status. Status can be either UP or DOWN. Defaults to no filtering (all available zones - both UP and DOWN).
project str
Project from which to list available zones. Defaults to project declared in the provider.
region str
Region from which to list available zones. Defaults to region declared in the provider.
status str
Allows to filter list of zones based on their current status. Status can be either UP or DOWN. Defaults to no filtering (all available zones - both UP and DOWN).
project String
Project from which to list available zones. Defaults to project declared in the provider.
region String
Region from which to list available zones. Defaults to region declared in the provider.
status String
Allows to filter list of zones based on their current status. Status can be either UP or DOWN. Defaults to no filtering (all available zones - both UP and DOWN).

getZones Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Names List<string>
A list of zones available in the given region
Project string
Region string
Status string
Id string
The provider-assigned unique ID for this managed resource.
Names []string
A list of zones available in the given region
Project string
Region string
Status string
id String
The provider-assigned unique ID for this managed resource.
names List<String>
A list of zones available in the given region
project String
region String
status String
id string
The provider-assigned unique ID for this managed resource.
names string[]
A list of zones available in the given region
project string
region string
status string
id str
The provider-assigned unique ID for this managed resource.
names Sequence[str]
A list of zones available in the given region
project str
region str
status str
id String
The provider-assigned unique ID for this managed resource.
names List<String>
A list of zones available in the given region
project String
region String
status String

Package Details

Repository
Google Cloud (GCP) Classic pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.
Google Cloud v8.25.0 published on Thursday, Apr 3, 2025 by Pulumi