https://pulumi.com logo
#general
Title
# general
m

microscopic-afternoon-22702

10/13/2023, 5:20 PM
Quick Question, If I create a
ComponentResource
that looks something like:
Copy code
class MyComponent extends pulumi.ComponentResource {
    constructor(name, opts) {
        super("pkg:index:MyComponent", name, {}, opts);
    }

    let bucket = new aws.s3.Bucket(`${name}-bucket`,
    {/*...*/}, { parent: this });

    let bucket2 = new aws.s3.Bucket(`${name}-bucket-2`,
    {/*...*/}, { parent: this });
}
How can I make sure that any other resources that depend on
MyComponent
also depend on all buckets (All resources created in
MyComponent
)? Does that always happen? Do I need to use?:
Copy code
this.registerOutputs({
})
2 Views