I'm trying to handle output in the form of a list/...
# python
I'm trying to handle output in the form of a list/dict:
Copy code
+ subnets: [
+     [0]: ""
+     [1]: ""
+     [2]: ""
+     [3]: ""
+     [4]: ""
+     [5]: ""
+     [6]: ""
I can set a value by using the index (i.e.
) I want to iterate over the subnets to create them but I can't use a for loop because
'Output' object is not iterable
How can I use these values in the output?
with a lambda allows me to extract the values but now I need to figure out how to get those as values for new resources
Copy code
vpc_subnets = vpc['subnets'].apply(
   lambda x: list(map(print, x))
@crooked-pillow-11944 you can pass the whole array as an output, if you need specific elements from it you'll need to be a bit more creative..
I've considered putting the length of an Output list into another Output so that it can be used as an iterator but got this:
TypeError: 'Output' object cannot be interpreted as an integer
You can’t iterate over an output because it’s a future
That's what I figured