UNPKG

@spacelift-io/pulumi-spacelift

Version:

A Pulumi package for creating and managing Spacelift resources.

129 lines (128 loc) 4 kB
import * as pulumi from "@pulumi/pulumi"; /** * `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", * }); * ``` */ export declare function getEnvironmentVariable(args: GetEnvironmentVariableArgs, opts?: pulumi.InvokeOptions): Promise<GetEnvironmentVariableResult>; /** * A collection of arguments for invoking getEnvironmentVariable. */ export interface GetEnvironmentVariableArgs { /** * ID of the context on which the environment variable is defined */ contextId?: string; /** * ID of the module on which the environment variable is defined */ moduleId?: string; /** * name of the environment variable */ name: string; /** * ID of the stack on which the environment variable is defined */ stackId?: string; } /** * A collection of values returned by getEnvironmentVariable. */ export interface GetEnvironmentVariableResult { /** * SHA-256 checksum of the value */ readonly checksum: string; /** * ID of the context on which the environment variable is defined */ readonly contextId?: string; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; /** * ID of the module on which the environment variable is defined */ readonly moduleId?: string; /** * name of the environment variable */ readonly name: string; /** * ID of the stack on which the environment variable is defined */ readonly stackId?: string; /** * value of the environment variable */ readonly value: string; /** * indicates whether the value can be read back outside a Run */ readonly writeOnly: boolean; } /** * `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", * }); * ``` */ export declare function getEnvironmentVariableOutput(args: GetEnvironmentVariableOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetEnvironmentVariableResult>; /** * A collection of arguments for invoking getEnvironmentVariable. */ export interface GetEnvironmentVariableOutputArgs { /** * ID of the context on which the environment variable is defined */ contextId?: pulumi.Input<string>; /** * ID of the module on which the environment variable is defined */ moduleId?: pulumi.Input<string>; /** * name of the environment variable */ name: pulumi.Input<string>; /** * ID of the stack on which the environment variable is defined */ stackId?: pulumi.Input<string>; }