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

bitter-island-28909

01/22/2019, 9:47 PM
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

stocky-spoon-28903

01/22/2019, 9:49 PM
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

bitter-island-28909

01/22/2019, 9:53 PM
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.