<@UB27BHS4B> thanks for the response, and I get th...
# python
p
@incalculable-sundown-82514 thanks for the response, and I get that everything is asynchronous, but how do I engage my code in that asynchronous process. Your example of the “tables()” function, how do I call that from my main or equivalent? My main is executed within your engine by starting a separate python interpreter and wrapping it inside an async. If I call tables() inside my main, then all of the other RPCs will execute either before or after mine, I can’t link the tables() future into the DAG. That tables() function is actually dependent on two futures, one is the creation of all the subnets, the other is the creation of all the routing tables. When both of those dependencies are resolved is when the association needs to happen. So do I make my main or equivalent a async def main and then do an await on the tables()? How do I get my code after the tables() to execute within the DAG appropriately? When I tried to do this, what I found is that my first await happened, but then other code never executed, because by that stage, all of the RPCs in the stack of Pulumi resources had resolved so the engine thought all the work was done.
i
I can’t link the tables() future into the DAG.
You can do this:
Copy code
something = tables()
pulumi.export('something', something)
This will accomplish what you want.
p
So if I do this out of a ComponentResource and pass in another future (eg vpc.id) pulumi will work out what it needs? Awesome 🙂