UNPKG

@spacelift-io/pulumi-spacelift

Version:

A Pulumi package for creating and managing Spacelift resources.

68 lines 2.87 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.getMountedfileOutput = exports.getMountedfile = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * `spacelift.Mountedfile` represents a file mounted in each Run's workspace that is part of a configuration of a context (`spacelift.Context`), stack (`spacelift.Stack`) or a module (`spacelift.Module`). In principle, it's very similar to an environment variable (`spacelift.EnvironmentVariable`) except that the value is written to the filesystem rather than passed to the environment. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as spacelift from "@pulumi/spacelift"; * * const ireland-kubeconfig = spacelift.getMountedfile({ * contextId: "prod-k8s-ie", * relativePath: "kubeconfig", * }); * const module-kubeconfig = spacelift.getMountedfile({ * moduleId: "k8s-module", * relativePath: "kubeconfig", * }); * const core-kubeconfig = spacelift.getMountedfile({ * relativePath: "kubeconfig", * stackId: "k8s-core", * }); * ``` */ function getMountedfile(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("spacelift:index/getMountedfile:getMountedfile", { "contextId": args.contextId, "moduleId": args.moduleId, "relativePath": args.relativePath, "stackId": args.stackId, }, opts); } exports.getMountedfile = getMountedfile; /** * `spacelift.Mountedfile` represents a file mounted in each Run's workspace that is part of a configuration of a context (`spacelift.Context`), stack (`spacelift.Stack`) or a module (`spacelift.Module`). In principle, it's very similar to an environment variable (`spacelift.EnvironmentVariable`) except that the value is written to the filesystem rather than passed to the environment. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as spacelift from "@pulumi/spacelift"; * * const ireland-kubeconfig = spacelift.getMountedfile({ * contextId: "prod-k8s-ie", * relativePath: "kubeconfig", * }); * const module-kubeconfig = spacelift.getMountedfile({ * moduleId: "k8s-module", * relativePath: "kubeconfig", * }); * const core-kubeconfig = spacelift.getMountedfile({ * relativePath: "kubeconfig", * stackId: "k8s-core", * }); * ``` */ function getMountedfileOutput(args, opts) { return pulumi.output(args).apply((a) => getMountedfile(a, opts)); } exports.getMountedfileOutput = getMountedfileOutput; //# sourceMappingURL=getMountedfile.js.map