So one thing that would be quite helpful for me is...
# general
b
So one thing that would be quite helpful for me is an alternative to`JSON.stringify` that knows how to handle deeply nested Outputs/Promises and returns a Promise as appropriate. Does something like that already exist, and if not, would you be interested in a contribution of such a function? Could be really helpful for building up those complex policy documents, etc.
s
For policies, @microscopic-florist-22719 assured me you can use this kind of thing:
Copy code
policy: pulumi.output({
    Version: "2012-10-17",
    Statement: [
         {
              // refer to outputs here without issue
         }
     ]
})
Also worth noting that for assume role there is
iam.assumeRolePolicyForPrincipal()
and a bunch of common principals defined
b
oh, if that works out of the box then yeah that removes the need 👍
oh actually it looks like .output is pretty much the function I was describing. Perfect, thanks.