This commit is contained in:
Justin Van Patten 2021-02-12 10:36:38 -08:00
parent bc4b198070
commit 139cbd60fd

View file

@ -264,6 +264,12 @@ func (p *providerServer) Construct(ctx context.Context,
return nil, err
}
// Ensure all outstanding RPCs have completed before proceeding. Also, prevent any new RPCs from happening.
pulumiCtx.waitForRPCs()
if pulumiCtx.rpcError != nil {
return nil, errors.Wrap(pulumiCtx.rpcError, "waiting for RPCs")
}
rpcURN, _, _, err := result.URN.ToURNOutput().awaitURN(ctx)
if err != nil {
return nil, err