Loops in loops for VPC creation

I am trying to create a play that defines by VPC infrastructure. I have a number of environments that are all set up in the same way but with different subnets. I’m trying to loop over a dict for each environment and then within that loop, loop to create by cidr subnets. However, it fails with an error “unsupported parameter for module: with_sequence”.

I’m using the ipaddr custom filter.

I’m not sure quite how I would access my with_sequence item even if this did work. Would it be item[1]?

My play is below…

`