UNPKG

@pulumiverse/cpln

Version:

A Pulumi package for creating and managing Control Plane (cpln) resources.

128 lines 4.18 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.getLocationOutput = exports.getLocation = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Use this data source to access information about a [Location](https://docs.controlplane.com/reference/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. * - **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. * * <a id="nestedblock--geo"></a> * * ### `geo` * * Location geographical details * * - **lat** (Number) Latitude. * - **lon** (Number) Longitude. * - **country** (String) Country. * - **state** (String) State. * - **city** (String) City. * - **continent** (String) Continent. * * ## Example Usage * * ```typescript * 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, * }; * } * ``` */ function getLocation(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("cpln:index/getLocation:getLocation", { "name": args.name, "tags": args.tags, }, opts); } exports.getLocation = getLocation; /** * Use this data source to access information about a [Location](https://docs.controlplane.com/reference/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. * - **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. * * <a id="nestedblock--geo"></a> * * ### `geo` * * Location geographical details * * - **lat** (Number) Latitude. * - **lon** (Number) Longitude. * - **country** (String) Country. * - **state** (String) State. * - **city** (String) City. * - **continent** (String) Continent. * * ## Example Usage * * ```typescript * 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, * }; * } * ``` */ function getLocationOutput(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("cpln:index/getLocation:getLocation", { "name": args.name, "tags": args.tags, }, opts); } exports.getLocationOutput = getLocationOutput; //# sourceMappingURL=getLocation.js.map