@spacelift-io/pulumi-spacelift
Version:
A Pulumi package for creating and managing Spacelift resources.
68 lines • 2.69 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.getEnvironmentVariableOutput = exports.getEnvironmentVariable = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* `spacelift.EnvironmentVariable` defines an environment variable on the context (`spacelift.Context`), stack (`spacelift.Stack`) or a module (`spacelift.Module`), thereby allowing to pass and share various secrets and configuration with Spacelift stacks.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as spacelift from "@pulumi/spacelift";
*
* const ireland-kubeconfig = spacelift.getEnvironmentVariable({
* contextId: "prod-k8s-ie",
* name: "KUBECONFIG",
* });
* const module-kubeconfig = spacelift.getEnvironmentVariable({
* moduleId: "k8s-module",
* name: "KUBECONFIG",
* });
* const core-kubeconfig = spacelift.getEnvironmentVariable({
* name: "KUBECONFIG",
* stackId: "k8s-core",
* });
* ```
*/
function getEnvironmentVariable(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("spacelift:index/getEnvironmentVariable:getEnvironmentVariable", {
"contextId": args.contextId,
"moduleId": args.moduleId,
"name": args.name,
"stackId": args.stackId,
}, opts);
}
exports.getEnvironmentVariable = getEnvironmentVariable;
/**
* `spacelift.EnvironmentVariable` defines an environment variable on the context (`spacelift.Context`), stack (`spacelift.Stack`) or a module (`spacelift.Module`), thereby allowing to pass and share various secrets and configuration with Spacelift stacks.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as spacelift from "@pulumi/spacelift";
*
* const ireland-kubeconfig = spacelift.getEnvironmentVariable({
* contextId: "prod-k8s-ie",
* name: "KUBECONFIG",
* });
* const module-kubeconfig = spacelift.getEnvironmentVariable({
* moduleId: "k8s-module",
* name: "KUBECONFIG",
* });
* const core-kubeconfig = spacelift.getEnvironmentVariable({
* name: "KUBECONFIG",
* stackId: "k8s-core",
* });
* ```
*/
function getEnvironmentVariableOutput(args, opts) {
return pulumi.output(args).apply((a) => getEnvironmentVariable(a, opts));
}
exports.getEnvironmentVariableOutput = getEnvironmentVariableOutput;
//# sourceMappingURL=getEnvironmentVariable.js.map