Control Plane v0.0.73 published on Thursday, Oct 23, 2025 by pulumiverse
cpln.getLocations
Start a Neo task
Explain and create a cpln.getLocations resource
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.
- origin (String)
- 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 "@pulumiverse/cpln";
export = async () => {
const locations = await cpln.getLocations({});
return {
locations: locations.locations,
};
}
import pulumi
import pulumi_cpln as cpln
locations = cpln.get_locations()
pulumi.export("locations", locations.locations)
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 {
locations, err := cpln.GetLocations(ctx, map[string]interface{}{}, nil)
if err != nil {
return err
}
ctx.Export("locations", locations.Locations)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cpln = Pulumi.Cpln;
return await Deployment.RunAsync(() =>
{
var locations = Cpln.GetLocations.Invoke();
return new Dictionary<string, object?>
{
["locations"] = locations.Apply(getLocationsResult => getLocationsResult.Locations),
};
});
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 locations = CplnFunctions.getLocations(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference);
ctx.export("locations", locations.locations());
}
}
variables:
locations:
fn::invoke:
function: cpln:getLocations
arguments: {}
outputs:
locations: ${locations.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(opts?: InvokeOptions): Promise<GetLocationsResult>
function getLocationsOutput(opts?: InvokeOptions): Output<GetLocationsResult>def get_locations(opts: Optional[InvokeOptions] = None) -> GetLocationsResult
def get_locations_output(opts: Optional[InvokeOptions] = None) -> Output[GetLocationsResult]func GetLocations(ctx *Context, opts ...InvokeOption) (*GetLocationsResult, error)
func GetLocationsOutput(ctx *Context, opts ...InvokeOption) GetLocationsResultOutput> 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)
}public static CompletableFuture<GetLocationsResult> getLocations(InvokeOptions options)
public static Output<GetLocationsResult> getLocations(InvokeOptions options)
fn::invoke:
function: cpln:index/getLocations:getLocations
arguments:
# arguments dictionarygetLocations Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Locations
List<Pulumiverse.
Cpln. Outputs. Get Locations Location>
- Id string
- The provider-assigned unique ID for this managed resource.
- Locations
[]Get
Locations Location
- id String
- The provider-assigned unique ID for this managed resource.
- locations
List<Get
Locations Location>
- id string
- The provider-assigned unique ID for this managed resource.
- locations
Get
Locations Location[]
- id str
- The provider-assigned unique ID for this managed resource.
- locations
Sequence[Get
Locations Location]
- id String
- The provider-assigned unique ID for this managed resource.
- locations List<Property Map>
Supporting Types
GetLocationsLocation
- Cloud
Provider string - Cloud Provider of the location.
- Cpln
Id string - The ID, in GUID format, of the location.
- Description string
- Description of the location.
- Enabled bool
- Indication if location is enabled.
- Geos
List<Pulumiverse.
Cpln. Inputs. Get Locations Location Geo> - Ip
Ranges List<string> - A list of IP ranges of the location.
- Name string
- Name of the location.
- Origin string
- Region string
- Region of the location.
- Self
Link string - Full link to this resource. Can be referenced by other resources.
- Dictionary<string, string>
- Key-value map of resource tags.
- Cloud
Provider string - Cloud Provider of the location.
- Cpln
Id string - The ID, in GUID format, of the location.
- Description string
- Description of the location.
- Enabled bool
- Indication if location is enabled.
- Geos
[]Get
Locations Location Geo - Ip
Ranges []string - A list of IP ranges of the location.
- Name string
- Name of the location.
- Origin string
- Region string
- Region of the location.
- Self
Link string - Full link to this resource. Can be referenced by other resources.
- map[string]string
- Key-value map of resource tags.
- cloud
Provider String - Cloud Provider of the location.
- cpln
Id String - The ID, in GUID format, of the location.
- description String
- Description of the location.
- enabled Boolean
- Indication if location is enabled.
- geos
List<Get
Locations Location Geo> - ip
Ranges List<String> - A list of IP ranges of the location.
- name String
- Name of the location.
- origin String
- region String
- Region of the location.
- self
Link String - Full link to this resource. Can be referenced by other resources.
- Map<String,String>
- Key-value map of resource tags.
- cloud
Provider string - Cloud Provider of the location.
- cpln
Id string - The ID, in GUID format, of the location.
- description string
- Description of the location.
- enabled boolean
- Indication if location is enabled.
- geos
Get
Locations Location Geo[] - ip
Ranges string[] - A list of IP ranges of the location.
- name string
- Name of the location.
- origin string
- region string
- Region of the location.
- self
Link string - Full link to this resource. Can be referenced by other resources.
- {[key: string]: string}
- Key-value map of resource tags.
- cloud_
provider str - Cloud Provider of the location.
- cpln_
id str - The ID, in GUID format, of the location.
- description str
- Description of the location.
- enabled bool
- Indication if location is enabled.
- geos
Sequence[Get
Locations Location Geo] - ip_
ranges Sequence[str] - A list of IP ranges of the location.
- name str
- Name of the location.
- origin str
- region str
- Region of the location.
- self_
link str - Full link to this resource. Can be referenced by other resources.
- Mapping[str, str]
- Key-value map of resource tags.
- cloud
Provider String - Cloud Provider of the location.
- cpln
Id String - The ID, in GUID format, of the location.
- description String
- Description of the location.
- enabled Boolean
- Indication if location is enabled.
- geos List<Property Map>
- ip
Ranges List<String> - A list of IP ranges of the location.
- name String
- Name of the location.
- origin String
- region String
- Region of the location.
- self
Link String - Full link to this resource. Can be referenced by other resources.
- Map<String>
- Key-value map of resource tags.
GetLocationsLocationGeo
Package Details
- Repository
- cpln pulumiverse/pulumi-cpln
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cplnTerraform Provider.
