Control Plane v0.0.73 published on Thursday, Oct 23, 2025 by pulumiverse
cpln.getLocation
Control Plane v0.0.73 published on Thursday, Oct 23, 2025 by pulumiverse
Use this data source to access information about a Location within Control Plane.
Required
- name (String) Name of the location (i.e.
aws-us-west-2).
Outputs
The following attributes are exported:
- 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 location = await cpln.getLocation({
name: "aws-us-west-2",
});
return {
location: location,
locationEnabled: location.enabled,
};
}
import pulumi
import pulumi_cpln as cpln
location = cpln.get_location(name="aws-us-west-2")
pulumi.export("location", location)
pulumi.export("locationEnabled", location.enabled)
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 {
location, err := cpln.LookupLocation(ctx, &cpln.LookupLocationArgs{
Name: "aws-us-west-2",
}, nil)
if err != nil {
return err
}
ctx.Export("location", location)
ctx.Export("locationEnabled", location.Enabled)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cpln = Pulumi.Cpln;
return await Deployment.RunAsync(() =>
{
var location = Cpln.GetLocation.Invoke(new()
{
Name = "aws-us-west-2",
});
return new Dictionary<string, object?>
{
["location"] = location,
["locationEnabled"] = location.Apply(getLocationResult => getLocationResult.Enabled),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cpln.CplnFunctions;
import com.pulumi.cpln.inputs.GetLocationArgs;
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 location = CplnFunctions.getLocation(GetLocationArgs.builder()
.name("aws-us-west-2")
.build());
ctx.export("location", location);
ctx.export("locationEnabled", location.enabled());
}
}
variables:
location:
fn::invoke:
function: cpln:getLocation
arguments:
name: aws-us-west-2
outputs:
location: ${location}
locationEnabled: ${location.enabled}
Using getLocation
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 getLocation(args: GetLocationArgs, opts?: InvokeOptions): Promise<GetLocationResult>
function getLocationOutput(args: GetLocationOutputArgs, opts?: InvokeOptions): Output<GetLocationResult>def get_location(name: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
opts: Optional[InvokeOptions] = None) -> GetLocationResult
def get_location_output(name: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetLocationResult]func LookupLocation(ctx *Context, args *LookupLocationArgs, opts ...InvokeOption) (*LookupLocationResult, error)
func LookupLocationOutput(ctx *Context, args *LookupLocationOutputArgs, opts ...InvokeOption) LookupLocationResultOutput> Note: This function is named LookupLocation in the Go SDK.
public static class GetLocation
{
public static Task<GetLocationResult> InvokeAsync(GetLocationArgs args, InvokeOptions? opts = null)
public static Output<GetLocationResult> Invoke(GetLocationInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetLocationResult> getLocation(GetLocationArgs args, InvokeOptions options)
public static Output<GetLocationResult> getLocation(GetLocationArgs args, InvokeOptions options)
fn::invoke:
function: cpln:index/getLocation:getLocation
arguments:
# arguments dictionaryThe following arguments are supported:
- Name string
- Dictionary<string, string>
- Name string
- map[string]string
- name String
- Map<String,String>
- name string
- {[key: string]: string}
- name str
- Mapping[str, str]
- name String
- Map<String>
getLocation Result
The following output properties are available:
- Cloud
Provider string - Cpln
Id string - Description string
- Enabled bool
- Geos
List<Pulumiverse.
Cpln. Outputs. Get Location Geo> - Id string
- Ip
Ranges List<string> - Name string
- Origin string
- Region string
- Self
Link string - Dictionary<string, string>
- Cloud
Provider string - Cpln
Id string - Description string
- Enabled bool
- Geos
[]Get
Location Geo - Id string
- Ip
Ranges []string - Name string
- Origin string
- Region string
- Self
Link string - map[string]string
- cloud
Provider String - cpln
Id String - description String
- enabled Boolean
- geos
List<Get
Location Geo> - id String
- ip
Ranges List<String> - name String
- origin String
- region String
- self
Link String - Map<String,String>
- cloud
Provider string - cpln
Id string - description string
- enabled boolean
- geos
Get
Location Geo[] - id string
- ip
Ranges string[] - name string
- origin string
- region string
- self
Link string - {[key: string]: string}
- cloud_
provider str - cpln_
id str - description str
- enabled bool
- geos
Sequence[Get
Location Geo] - id str
- ip_
ranges Sequence[str] - name str
- origin str
- region str
- self_
link str - Mapping[str, str]
- cloud
Provider String - cpln
Id String - description String
- enabled Boolean
- geos List<Property Map>
- id String
- ip
Ranges List<String> - name String
- origin String
- region String
- self
Link String - Map<String>
Supporting Types
GetLocationGeo
Package Details
- Repository
- cpln pulumiverse/pulumi-cpln
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cplnTerraform Provider.
Control Plane v0.0.73 published on Thursday, Oct 23, 2025 by pulumiverse
