Is blue a list coming from remote state? If so, I’m not sure what you’re doing with the for loop will ever work since the contents aren’t know until diff/deploy time, i.e. the length won’t be correct.
I think having support for count/for_each using some sort of tokens would be very valuable, but I’m pretty sure that at this time you’ll need to use the approach mentioned here.