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
22 lines
No EOL
544 B
TypeScript
22 lines
No EOL
544 B
TypeScript
import * as pulumi from "@pulumi/pulumi";
|
|
import * as dynamic from "@pulumi/pulumi/dynamic";
|
|
|
|
export interface RArgs {
|
|
prefix: pulumi.Input<string>
|
|
}
|
|
|
|
const provider: pulumi.dynamic.ResourceProvider = {
|
|
async create(inputs) {
|
|
return { id: "1", outs: {
|
|
prefix: inputs["prefix"]
|
|
}};
|
|
}
|
|
}
|
|
|
|
export class R extends dynamic.Resource {
|
|
public prefix: pulumi.Output<string>;
|
|
|
|
constructor(name: string, props: RArgs, opts?: pulumi.CustomResourceOptions) {
|
|
super(provider, name, props, opts)
|
|
}
|
|
} |