UNPKG

@spacelift-io/pulumi-spacelift

Version:

A Pulumi package for creating and managing Spacelift resources.

53 lines 2.79 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.getSpaceByPathOutput = exports.getSpaceByPath = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * `spacelift.getSpaceByPath` represents a Spacelift **space** - a collection of resources such as stacks, modules, policies, etc. Allows for more granular access control. Can have a parent space. In contrary to `spacelift.Space`, this resource is identified by a path, not by an ID. For this data source to work, path must be unique. If there are multiple spaces with the same path, this datasource will fail. * **Disclaimer:** * This datasource can only be used in a stack that resides in a space with inheritance enabled. In addition, the parent spaces (excluding root) must also have inheritance enabled. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as spacelift from "@pulumi/spacelift"; * * const space = spacelift.getSpaceByPath({ * spacePath: "root/second space/my space", * }); * export const spaceDescription = space.then(space => space.description); * ``` */ function getSpaceByPath(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("spacelift:index/getSpaceByPath:getSpaceByPath", { "spacePath": args.spacePath, }, opts); } exports.getSpaceByPath = getSpaceByPath; /** * `spacelift.getSpaceByPath` represents a Spacelift **space** - a collection of resources such as stacks, modules, policies, etc. Allows for more granular access control. Can have a parent space. In contrary to `spacelift.Space`, this resource is identified by a path, not by an ID. For this data source to work, path must be unique. If there are multiple spaces with the same path, this datasource will fail. * **Disclaimer:** * This datasource can only be used in a stack that resides in a space with inheritance enabled. In addition, the parent spaces (excluding root) must also have inheritance enabled. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as spacelift from "@pulumi/spacelift"; * * const space = spacelift.getSpaceByPath({ * spacePath: "root/second space/my space", * }); * export const spaceDescription = space.then(space => space.description); * ``` */ function getSpaceByPathOutput(args, opts) { return pulumi.output(args).apply((a) => getSpaceByPath(a, opts)); } exports.getSpaceByPathOutput = getSpaceByPathOutput; //# sourceMappingURL=getSpaceByPath.js.map