pulumi/tests/integration/stack_reference/nodejs/step1/index.ts

13 lines
444 B
TypeScript

// Copyright 2016-2018, Pulumi Corporation. All rights reserved.
import * as pulumi from "@pulumi/pulumi";
let slug = `${pulumi.getOrganization()}/${pulumi.getProject()}/${pulumi.getStack()}`;
let a = new pulumi.StackReference(slug);
const oldVal: string[] = a.getOutputSync("val");
if (oldVal.length !== 2 || oldVal[0] !== "a" || oldVal[1] !== "b") {
throw new Error("Invalid result");
}
export const val2 = pulumi.secret(["a", "b"]);