sparse-intern-71089
12/01/2022, 6:26 PMlittle-cartoon-10569
12/01/2022, 7:43 PMlittle-cartoon-10569
12/01/2022, 7:45 PMconst baseOpts = { parent: someOtherResource };
...
const resX = new Role("resX", { /* ... */, baseOpts);
const resY = new Bucket("resY", { /* ... */, { ...baseOpts, protect: true });
billowy-army-68599
gorgeous-architect-28903
12/02/2022, 11:21 AMpulumi.Parent(res)
-- so now I can do something like:
withCluster := withOpts([DependsOn(cluster), provider])
ResourceX(ctx, name, withCluster)
ResourceY(ctx, name, withCluster, anotherOption)
Which at least saves me a bit of typing, and lets me append additional options to the individual resources easily.