https://pulumi.com logo
#python
Title
# python
h

handsome-rocket-92204

05/21/2019, 5:27 PM
It also sucks that I can't call get_vpclink() once and get the id into a variable. Now when I implement the for loop it'll be doing that external call every time 😕
i

incalculable-sundown-82514

05/21/2019, 5:28 PM
You can -
get_vpclink
returns a future, you can save that future to a local variable and then pass that local in as inputs to resources.
You can do this with anything that returns a future, including async HTTP requests with e.g.
aiohttp
h

handsome-rocket-92204

05/21/2019, 5:32 PM
ahh, you're right! Sorry, I'm new to asynchronous programming and haven't totally wrapped my head around futures/tasks/loops/etc.