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

flat-guitar-86436

09/23/2019, 10:24 PM
What’s the best way of
.apply
multiple `Output`s ?
Copy code
/**
 * DevOps Role
 *
 * @description role to be assumed only by IAM entities in the Admin Account.
 */
export const devopsRole = new aws.iam.Role(`${INFRA_CONFIG.ORG_NAME}-devops`, {
  assumeRolePolicy: adminAccount.id.apply(id =>
    JSON.stringify({
      Version: '2012-10-17',
      Statement: [
        {
          Action: 'sts:AssumeRole',
          Principal: {
            AWS: [id]
          },
          Effect: 'Allow',
          Sid: ''
        }
      ]
    })
  )
});
here I have only one
adminAccount.id
to apply, but what if I need other values to be applied as well?
should I just nest them? i.e. call .apply again in the first .apply block?
g

gentle-diamond-70147

09/23/2019, 10:25 PM
f

flat-guitar-86436

09/23/2019, 10:28 PM
thank you!