So, continuing on the trend of difficulties with O...
# python
So, continuing on the trend of difficulties with Output objects, I'm trying to generate IPv6 subnets from the CIDR block of the created VPC using the vpc.ipv6_cidr_block output attribute and passing that into an
call which is throwing errors about the type being invalid. I've tried using the
approach which doesn't seem to be working since the return value of an apply is still an Output object. How do I just access the underlying string to create the network object?
Where "cidr_block" is an
object that'll eventually return a string:
cidr_block.apply(lambda value: ip_network(cidr_block).subnets(prefixlen_diff=2))
This will return an Output object that will eventually return a List[IPv6Network] object, where each IPv6Network is a subnet of cidr_block that's 1/4 the original size
Thanks! I had to massage it a bit to make it output a list instead of a generator, but it got me there in the end 👍