This message was deleted.
# general
s
This message was deleted.
e
1 is because these won't always show up at preview time so your actual update may differ from preview. 2 means that sometimes you still need to do this 😞 I do have some ideas around making things better here, but for now apply is the way to handle this.
s
@echoing-dinner-19531 Makes sense to me. I tried a couple of different patterns, but in cases where you don't know the length of the array up-front it seems that
apply
is still necessary. Ended up refactoring to make it static in the case I was looking at. Care to share any of your ideas? ;)
e
Two ideas. 1 is adding a
mustApply
function so we can at least error out that you have resources trying to be created in preview, but
--targets
would allow you to still run an
up
without that error blocking the whole operation (this is exactly the same behaviour as TF) 2 is adding a applyMap function that would let the engine understand iteration, so it wouldn't be able to say how many resources we're going to be made but it could say 0 or more.