1. Packages
  2. Control Plane (cpln)
  3. API Docs
  4. getLocations
Control Plane v0.0.56 published on Wednesday, Apr 9, 2025 by pulumiverse

cpln.getLocations

Explore with Pulumi AI

Control Plane v0.0.56 published on Wednesday, Apr 9, 2025 by pulumiverse

Use this data source to access information about all Locations within Control Plane.

Outputs

The following attributes are exported:

  • locations (Block List) (see below).

locations

  • cpln_id (String) The ID, in GUID format, of the location.
  • name (String) Name of the location.
  • description (String) Description of the location.
  • tags (Map of String) Key-value map of resource tags.
  • cloud_provider (String) Cloud Provider of the location.
  • region (String) Region of the location.
  • enabled (Boolean) Indication if location is enabled.
  • geo (Block List, Max: 1) (see below)
  • ip_ranges (List of String) A list of IP ranges of the location.
  • self_link (String) Full link to this resource. Can be referenced by other resources.

geo

Location geographical details

  • lat (Number) Latitude.
  • lon (Number) Longitude.
  • country (String) Country.
  • state (String) State.
  • city (String) City.
  • continent (String) Continent.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as cpln from "@pulumi/cpln";

const locationsLocations = cpln.getLocations({});
export const locations = locationsLocations.then(locationsLocations => locationsLocations.locations);
Copy
import pulumi
import pulumi_cpln as cpln

locations_locations = cpln.get_locations()
pulumi.export("locations", locations_locations.locations)
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-cpln/sdk/go/cpln"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		locationsLocations, err := cpln.GetLocations(ctx, map[string]interface{}{}, nil)
		if err != nil {
			return err
		}
		ctx.Export("locations", locationsLocations.Locations)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cpln = Pulumi.Cpln;

return await Deployment.RunAsync(() => 
{
    var locationsLocations = Cpln.GetLocations.Invoke();

    return new Dictionary<string, object?>
    {
        ["locations"] = locationsLocations.Apply(getLocationsResult => getLocationsResult.Locations),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cpln.CplnFunctions;
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 locationsLocations = CplnFunctions.getLocations();

        ctx.export("locations", locationsLocations.applyValue(getLocationsResult -> getLocationsResult.locations()));
    }
}
Copy
variables:
  locationsLocations:
    fn::invoke:
      function: cpln:getLocations
      arguments: {}
outputs:
  locations: ${locationsLocations.locations}
Copy

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(opts?: InvokeOptions): Promise<GetLocationsResult>
function getLocationsOutput(opts?: InvokeOptions): Output<GetLocationsResult>
Copy
def get_locations(opts: Optional[InvokeOptions] = None) -> GetLocationsResult
def get_locations_output(opts: Optional[InvokeOptions] = None) -> Output[GetLocationsResult]
Copy
func GetLocations(ctx *Context, opts ...InvokeOption) (*GetLocationsResult, error)
func GetLocationsOutput(ctx *Context, opts ...InvokeOption) GetLocationsResultOutput
Copy

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

public static class GetLocations 
{
    public static Task<GetLocationsResult> InvokeAsync(InvokeOptions? opts = null)
    public static Output<GetLocationsResult> Invoke(InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetLocationsResult> getLocations(InvokeOptions options)
public static Output<GetLocationsResult> getLocations(InvokeOptions options)
Copy
fn::invoke:
  function: cpln:index/getLocations:getLocations
  arguments:
    # arguments dictionary
Copy

getLocations Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Locations List<Pulumiverse.Cpln.Outputs.GetLocationsLocation>
Id string
The provider-assigned unique ID for this managed resource.
Locations []GetLocationsLocation
id String
The provider-assigned unique ID for this managed resource.
locations List<GetLocationsLocation>
id string
The provider-assigned unique ID for this managed resource.
locations GetLocationsLocation[]
id str
The provider-assigned unique ID for this managed resource.
locations Sequence[GetLocationsLocation]
id String
The provider-assigned unique ID for this managed resource.
locations List<Property Map>

Supporting Types

GetLocationsLocation

CloudProvider This property is required. string
Cloud Provider of the location.
CplnId This property is required. string
The ID, in GUID format, of the location.
Description This property is required. string
Description of the location.
Enabled This property is required. bool
Indication if location is enabled.
Geos This property is required. List<Pulumiverse.Cpln.Inputs.GetLocationsLocationGeo>
IpRanges This property is required. List<string>
A list of IP ranges of the location.
Name This property is required. string
Name of the location.
Region This property is required. string
Region of the location.
SelfLink This property is required. string
Full link to this resource. Can be referenced by other resources.
Tags This property is required. Dictionary<string, string>
Key-value map of resource tags.
CloudProvider This property is required. string
Cloud Provider of the location.
CplnId This property is required. string
The ID, in GUID format, of the location.
Description This property is required. string
Description of the location.
Enabled This property is required. bool
Indication if location is enabled.
Geos This property is required. []GetLocationsLocationGeo
IpRanges This property is required. []string
A list of IP ranges of the location.
Name This property is required. string
Name of the location.
Region This property is required. string
Region of the location.
SelfLink This property is required. string
Full link to this resource. Can be referenced by other resources.
Tags This property is required. map[string]string
Key-value map of resource tags.
cloudProvider This property is required. String
Cloud Provider of the location.
cplnId This property is required. String
The ID, in GUID format, of the location.
description This property is required. String
Description of the location.
enabled This property is required. Boolean
Indication if location is enabled.
geos This property is required. List<GetLocationsLocationGeo>
ipRanges This property is required. List<String>
A list of IP ranges of the location.
name This property is required. String
Name of the location.
region This property is required. String
Region of the location.
selfLink This property is required. String
Full link to this resource. Can be referenced by other resources.
tags This property is required. Map<String,String>
Key-value map of resource tags.
cloudProvider This property is required. string
Cloud Provider of the location.
cplnId This property is required. string
The ID, in GUID format, of the location.
description This property is required. string
Description of the location.
enabled This property is required. boolean
Indication if location is enabled.
geos This property is required. GetLocationsLocationGeo[]
ipRanges This property is required. string[]
A list of IP ranges of the location.
name This property is required. string
Name of the location.
region This property is required. string
Region of the location.
selfLink This property is required. string
Full link to this resource. Can be referenced by other resources.
tags This property is required. {[key: string]: string}
Key-value map of resource tags.
cloud_provider This property is required. str
Cloud Provider of the location.
cpln_id This property is required. str
The ID, in GUID format, of the location.
description This property is required. str
Description of the location.
enabled This property is required. bool
Indication if location is enabled.
geos This property is required. Sequence[GetLocationsLocationGeo]
ip_ranges This property is required. Sequence[str]
A list of IP ranges of the location.
name This property is required. str
Name of the location.
region This property is required. str
Region of the location.
self_link This property is required. str
Full link to this resource. Can be referenced by other resources.
tags This property is required. Mapping[str, str]
Key-value map of resource tags.
cloudProvider This property is required. String
Cloud Provider of the location.
cplnId This property is required. String
The ID, in GUID format, of the location.
description This property is required. String
Description of the location.
enabled This property is required. Boolean
Indication if location is enabled.
geos This property is required. List<Property Map>
ipRanges This property is required. List<String>
A list of IP ranges of the location.
name This property is required. String
Name of the location.
region This property is required. String
Region of the location.
selfLink This property is required. String
Full link to this resource. Can be referenced by other resources.
tags This property is required. Map<String>
Key-value map of resource tags.

GetLocationsLocationGeo

City string
City.
Continent string
Continent.
Country string
Country.
Lat double
Latitude.
Lon double
Longitude.
State string
State.
City string
City.
Continent string
Continent.
Country string
Country.
Lat float64
Latitude.
Lon float64
Longitude.
State string
State.
city String
City.
continent String
Continent.
country String
Country.
lat Double
Latitude.
lon Double
Longitude.
state String
State.
city string
City.
continent string
Continent.
country string
Country.
lat number
Latitude.
lon number
Longitude.
state string
State.
city str
City.
continent str
Continent.
country str
Country.
lat float
Latitude.
lon float
Longitude.
state str
State.
city String
City.
continent String
Continent.
country String
Country.
lat Number
Latitude.
lon Number
Longitude.
state String
State.

Package Details

Repository
cpln pulumiverse/pulumi-cpln
License
Apache-2.0
Notes
This Pulumi package is based on the cpln Terraform Provider.
Control Plane v0.0.56 published on Wednesday, Apr 9, 2025 by pulumiverse