sparse-intern-71089
09/07/2020, 9:56 AMlimited-rainbow-51650
09/07/2020, 9:58 AMCustomResource
subclass. The parent
relationship is visualized in the Resource Viewer on the Pulumi hosted platform (app.pulumi.com)green-school-95910
09/07/2020, 11:11 AMsticky-receptionist-53934
09/07/2020, 11:17 AMsticky-receptionist-53934
09/07/2020, 11:18 AMsticky-receptionist-53934
09/07/2020, 11:18 AMgreen-school-95910
09/07/2020, 11:52 AMparent
multiple times across multiple resources, mostly to put thing under custom `ComponentResource`s that define providers. Keeps things organized in the code, the resource viewer and reuses code without having to pass multiple providers everywhere.
Essentially I do this:
export class ProjectDefinition extends pulumi.ComponentResource {
constructor(name, args, opts) {
/// Instantiate the provider
const provider = ...
super('custom:utils:projectDefinition', name, args, {...opts, provider})
}
}
sticky-receptionist-53934
09/07/2020, 12:04 PM