pulumi/tests/integration/secret_outputs/index.ts
Matt Ellis 881db4d72a Correctly flow secretness across POJO serliazation for stack outputs
Our logic to export a resource as a stack output transforms the
resource into a plain old object by eliding internal fields and then
just serializing the resource as a POJO.

The custom serialization logic we used here unwrapped an Output
without care to see if it held a secret. Now, when it does, we
continue to return an Output as the thing to be serialized and that
output is marked as a secret.

Fixes #2862
2019-06-26 15:16:07 -07:00

11 lines
293 B
TypeScript

import * as pulumi from "@pulumi/pulumi";
import { R } from "./res";
export const withoutSecret = new R("withoutSecret", {
prefix: pulumi.output("it's a secret to everybody")
});
export const withSecret = new R("withSecret", {
prefix: pulumi.secret("it's a secret to everybody")
});