UNPKG

@spacelift-io/pulumi-spacelift

Version:

A Pulumi package for creating and managing Spacelift resources.

51 lines 2.23 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.getCurrentStackOutput = exports.getCurrentStack = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * `spacelift.getCurrentStack` is a data source that provides information about the current administrative stack if the run is executed within Spacelift by a stack or module. This allows clever tricks like attaching contexts or policies to the stack that manages them. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as spacelift from "@pulumi/spacelift"; * import * as spacelift from "@spacelift-io/pulumi-spacelift"; * * const this = spacelift.getCurrentStack({}); * const core_kubeconfig = new spacelift.EnvironmentVariable("core-kubeconfig", { * stackId: _this.then(_this => _this.id), * value: "bacon", * }); * ``` */ function getCurrentStack(opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("spacelift:index/getCurrentStack:getCurrentStack", {}, opts); } exports.getCurrentStack = getCurrentStack; /** * `spacelift.getCurrentStack` is a data source that provides information about the current administrative stack if the run is executed within Spacelift by a stack or module. This allows clever tricks like attaching contexts or policies to the stack that manages them. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as spacelift from "@pulumi/spacelift"; * import * as spacelift from "@spacelift-io/pulumi-spacelift"; * * const this = spacelift.getCurrentStack({}); * const core_kubeconfig = new spacelift.EnvironmentVariable("core-kubeconfig", { * stackId: _this.then(_this => _this.id), * value: "bacon", * }); * ``` */ function getCurrentStackOutput(opts) { return pulumi.output(getCurrentStack(opts)); } exports.getCurrentStackOutput = getCurrentStackOutput; //# sourceMappingURL=getCurrentStack.js.map