adorable-gpu-98268
03/23/2022, 12:20 PMundefined
check
, how do I make them visible on the resource object?echoing-dinner-19531
03/23/2022, 3:39 PMadorable-gpu-98268
03/23/2022, 3:40 PMechoing-dinner-19531
03/23/2022, 3:46 PMsuper(provider, name, args, opts);
args is normally an object coming in as a constructor parameter, but rather than passing that parameter straight through to super
make a new object which has declares all the inputs (taking the value from args
) and all the outputs but just setting them to undefined. Then pass that object to super
. The runtime will then iterate that object and set properties on the resource itself based on the names. For typescript you'll also want to declare those properties in the resource class with something like:
public readonly outputProperty: pulumi.Output<number>;
but those typings annotations aren't available at runtime for the framework to inspect, thus the args trickery.adorable-gpu-98268
03/23/2022, 3:46 PMechoing-dinner-19531
03/23/2022, 3:47 PMcheck
the result of that will be passed as the inputs for create
or update
, so if you want values from there in your final result just make you thread it through create/update from ins to outs.adorable-gpu-98268
03/23/2022, 3:48 PMechoing-dinner-19531
03/23/2022, 4:10 PM