hcloud logo
Hetzner Cloud v1.10.3, Mar 8 23

hcloud.getLocations

Provides a list of available Hetzner Cloud Locations. This resource may be useful to create highly available infrastructure, distributed across several locations.

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(location_ids: Optional[Sequence[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> GetLocationsResult
def get_locations_output(location_ids: Optional[pulumi.Input[Sequence[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)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: hcloud:index/getLocations:getLocations
  arguments:
    # arguments dictionary

The following arguments are supported:

LocationIds List<string>

(list) List of unique location identifiers.

Deprecated:

Use locations list instead

LocationIds []string

(list) List of unique location identifiers.

Deprecated:

Use locations list instead

locationIds List<String>

(list) List of unique location identifiers.

Deprecated:

Use locations list instead

locationIds string[]

(list) List of unique location identifiers.

Deprecated:

Use locations list instead

location_ids Sequence[str]

(list) List of unique location identifiers.

Deprecated:

Use locations list instead

locationIds List<String>

(list) List of unique location identifiers.

Deprecated:

Use locations list instead

getLocations Result

The following output properties are available:

Descriptions List<string>

(list) List of all location descriptions.

Deprecated:

Use locations list instead

Id string

The provider-assigned unique ID for this managed resource.

Locations List<Pulumi.HCloud.Outputs.GetLocationsLocation>

(list) List of all locations. See data.hcloud_location for schema.

Names List<string>

(list) List of location names.

Deprecated:

Use locations list instead

LocationIds List<string>

(list) List of unique location identifiers.

Deprecated:

Use locations list instead

Descriptions []string

(list) List of all location descriptions.

Deprecated:

Use locations list instead

Id string

The provider-assigned unique ID for this managed resource.

Locations []GetLocationsLocation

(list) List of all locations. See data.hcloud_location for schema.

Names []string

(list) List of location names.

Deprecated:

Use locations list instead

LocationIds []string

(list) List of unique location identifiers.

Deprecated:

Use locations list instead

descriptions List<String>

(list) List of all location descriptions.

Deprecated:

Use locations list instead

id String

The provider-assigned unique ID for this managed resource.

locations List<GetLocationsLocation>

(list) List of all locations. See data.hcloud_location for schema.

names List<String>

(list) List of location names.

Deprecated:

Use locations list instead

locationIds List<String>

(list) List of unique location identifiers.

Deprecated:

Use locations list instead

descriptions string[]

(list) List of all location descriptions.

Deprecated:

Use locations list instead

id string

The provider-assigned unique ID for this managed resource.

locations GetLocationsLocation[]

(list) List of all locations. See data.hcloud_location for schema.

names string[]

(list) List of location names.

Deprecated:

Use locations list instead

locationIds string[]

(list) List of unique location identifiers.

Deprecated:

Use locations list instead

descriptions Sequence[str]

(list) List of all location descriptions.

Deprecated:

Use locations list instead

id str

The provider-assigned unique ID for this managed resource.

locations Sequence[GetLocationsLocation]

(list) List of all locations. See data.hcloud_location for schema.

names Sequence[str]

(list) List of location names.

Deprecated:

Use locations list instead

location_ids Sequence[str]

(list) List of unique location identifiers.

Deprecated:

Use locations list instead

descriptions List<String>

(list) List of all location descriptions.

Deprecated:

Use locations list instead

id String

The provider-assigned unique ID for this managed resource.

locations List<Property Map>

(list) List of all locations. See data.hcloud_location for schema.

names List<String>

(list) List of location names.

Deprecated:

Use locations list instead

locationIds List<String>

(list) List of unique location identifiers.

Deprecated:

Use locations list instead

Supporting Types

GetLocationsLocation

City string
Country string
Description string
Id int
Latitude double
Longitude double
Name string
NetworkZone string
City string
Country string
Description string
Id int
Latitude float64
Longitude float64
Name string
NetworkZone string
city String
country String
description String
id Integer
latitude Double
longitude Double
name String
networkZone String
city string
country string
description string
id number
latitude number
longitude number
name string
networkZone string
city String
country String
description String
id Number
latitude Number
longitude Number
name String
networkZone String

Package Details

Repository
Hetzner Cloud pulumi/pulumi-hcloud
License
Apache-2.0
Notes

This Pulumi package is based on the hcloud Terraform Provider.