prehistoric-egg-84122
07/30/2025, 8:49 AMapply()
calls can make the logic difficult to maintain and reason about.
- Weāre also aware of dynamic providers, but writing a separate provider for every such case seems too heavyweight ā especially when the logic isnāt strictly about CRUD operations.
- We're not sure if preparing all necessary values outside the constructor ahead of time is always practical or even a good idea, especially as complexity grows.
So the question is:
⢠What is the recommended best practice for handling asynchronous business logic in ComponentResource
constructors?
⢠Are there any common patterns, official guidance, or real-world examples on how to cleanly manage async operations (such as API calls, data lookups, etc.) inside or before creating child resources in a ComponentResource
?
We'd really appreciate any insights or examples from those who have tackled similar situations.
Thanks!steep-sunset-89396
07/31/2025, 3:51 AMprehistoric-egg-84122
07/31/2025, 7:06 AMblue-carpenter-4997
07/31/2025, 7:52 PMblue-carpenter-4997
07/31/2025, 7:52 PMblue-carpenter-4997
07/31/2025, 7:52 PMblue-carpenter-4997
07/31/2025, 7:53 PMblue-carpenter-4997
07/31/2025, 7:54 PMgreat-sunset-355
08/04/2025, 8:28 AMinitialize
where you can run async/await
and then pass Outputs
to the constructor
https://github.com/pulumi/pulumi-awsx/blob/bb8d4ef9dcff0a4fc446d8921665fcdf3a89c55e/awsx-classic/ec2/vpc.ts#L284thankful-painting-31068
08/06/2025, 7:32 PMapply
is discouraged. Has that changed recently?blue-carpenter-4997
08/06/2025, 7:50 PM