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
11 lines
293 B
TypeScript
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")
|
|
});
|