https://pulumi.com logo
#general
Title
# general
g

gifted-balloon-26385

12/14/2023, 4:37 PM
is it safe to assume code that looks like this (ie nested .apply calls) will fully execute, or do i need to do something akin to Promise.all on the inner .apply calls
Copy code
pulumi
  .all([var1, var2])
  .apply(([var1, var2]) => {
    for (const val of var2) {
      pulumi
        .all([var1.val, val])
        .apply(([var1val, var2val]) => {
            new Resource(`my-resource-${var1val}`, {...});

        });
    }
  });
s

stale-answer-34162

12/14/2023, 5:08 PM
I believe the answer is no but a pulumi engineer will have to chime in doe a definitive answer. I can tell you that doing that in typescript pulumi is a bad idea.