@spacelift-io/pulumi-spacelift
Version:
A Pulumi package for creating and managing Spacelift resources.
58 lines • 2.44 kB
JavaScript
;
// *** 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.getContextOutput = exports.getContext = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* `spacelift.Context` represents a Spacelift **context** - a collection of configuration elements (either environment variables or mounted files) that can be administratively attached to multiple stacks (`spacelift.Stack`) or modules (`spacelift.Module`) using a context attachment (`spacelift.ContextAttachment`)`
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as spacelift from "@pulumi/spacelift";
*
* const prod-k8s-ie = spacelift.getContext({
* contextId: "prod-k8s-ie",
* });
* ```
*/
function getContext(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("spacelift:index/getContext:getContext", {
"afterApplies": args.afterApplies,
"afterDestroys": args.afterDestroys,
"afterInits": args.afterInits,
"afterPerforms": args.afterPerforms,
"afterPlans": args.afterPlans,
"afterRuns": args.afterRuns,
"beforeApplies": args.beforeApplies,
"beforeDestroys": args.beforeDestroys,
"beforeInits": args.beforeInits,
"beforePerforms": args.beforePerforms,
"beforePlans": args.beforePlans,
"contextId": args.contextId,
}, opts);
}
exports.getContext = getContext;
/**
* `spacelift.Context` represents a Spacelift **context** - a collection of configuration elements (either environment variables or mounted files) that can be administratively attached to multiple stacks (`spacelift.Stack`) or modules (`spacelift.Module`) using a context attachment (`spacelift.ContextAttachment`)`
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as spacelift from "@pulumi/spacelift";
*
* const prod-k8s-ie = spacelift.getContext({
* contextId: "prod-k8s-ie",
* });
* ```
*/
function getContextOutput(args, opts) {
return pulumi.output(args).apply((a) => getContext(a, opts));
}
exports.getContextOutput = getContextOutput;
//# sourceMappingURL=getContext.js.map