proud-artist-4864
05/23/2019, 7:08 AMproud-artist-4864
05/23/2019, 7:10 AMproud-artist-4864
05/23/2019, 7:12 AMproud-artist-4864
05/23/2019, 7:12 AMproud-artist-4864
05/23/2019, 7:14 AMproud-artist-4864
05/23/2019, 7:14 AMproud-artist-4864
05/23/2019, 7:15 AMproud-artist-4864
05/23/2019, 7:18 AMincalculable-sundown-82514
05/23/2019, 5:06 PMEffectively all of the “get_*” calls are useless outside passing them into another Pulumi resource as an argumentIt’s a future, you can use it like you would any other future, i.e. you can await it in
async
functions and then use them for control flow. Python does force you to acknowledge that you’ve now built an asynchronous graph and you’ll have to pass something into a Pulumi resource, but you can do whatever you want in an async function.incalculable-sundown-82514
05/23/2019, 5:07 PMaiohttp
is useless because you can’t use it in a synchronous context. You can’t, it’s not how it was designed.creamy-potato-29402
05/23/2019, 5:10 PMincalculable-sundown-82514
05/23/2019, 5:12 PMincalculable-sundown-82514
05/23/2019, 5:13 PMbecause you can’t execute a loop based on the get_subnets() callYou can do this: ```
incalculable-sundown-82514
05/23/2019, 5:13 PMasync def tables():
subs = await get_subnets()
for s in subs:
aws.associate(s, rt ...)
billowy-laptop-45963
05/24/2019, 2:14 AMproud-artist-4864
05/24/2019, 5:44 AMproud-artist-4864
05/24/2019, 5:46 AMlittle-river-49422
05/28/2019, 7:38 AMlittle-river-49422
05/28/2019, 7:38 AMlittle-river-49422
05/28/2019, 7:38 AMlittle-river-49422
05/28/2019, 3:35 PMlittle-river-49422
05/28/2019, 3:35 PMstocky-spoon-28903
05/28/2019, 3:36 PMlittle-river-49422
05/28/2019, 3:36 PMstocky-spoon-28903
05/28/2019, 3:36 PMlittle-river-49422
05/28/2019, 3:36 PMstocky-spoon-28903
05/28/2019, 3:36 PMpulumi cancel
to remove the locklittle-river-49422
05/28/2019, 3:37 PMlittle-river-49422
05/28/2019, 3:37 PMstocky-spoon-28903
05/28/2019, 3:37 PM