crooked-pillow-11944
09/13/2021, 1:33 AM+ subnets: [
+ [0]: "10.2.0.0/22"
+ [1]: "10.4.0.0/22"
+ [2]: "10.6.0.0/22"
+ [3]: "10.8.0.0/22"
+ [4]: "10.10.0.0/22"
+ [5]: "10.12.0.0/22"
+ [6]: "10.14.0.0/22"
]
I can set a value by using the index (i.e. ['subnets'][0]
)
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?.apply
with a lambda allows me to extract the values but now I need to figure out how to get those as values for new resourcesvpc_subnets = vpc['subnets'].apply(
lambda x: list(map(print, x))
)
billowy-army-68599
09/13/2021, 4:55 AMcrooked-pillow-11944
09/13/2021, 2:27 PMTypeError: 'Output' object cannot be interpreted as an integer
billowy-army-68599
09/13/2021, 4:01 PMcrooked-pillow-11944
09/13/2021, 4:31 PM