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

incalculable-diamond-5088

03/08/2019, 10:42 PM
Hi, how should I pass a nested structure with array of outputs from resources? Example:
Copy code
const samlProvider = new aws.iam.SamlProvider('saml_provider', {...})

const oktaAssumePolicy = pulumi.output(aws.iam.getPolicyDocument({
  statements: [{
    principals: [{
      type: "Federated",
      identifiers: [samlProvider.arn]
    }]
  }]
}))
Note the
statements->principals->identifiers
It fails with
Error: invocation of aws:iam/getPolicyDocument:getPolicyDocument returned an error: grpc: error while marshaling: proto: repeated field Values has nil element
Ok, seems like I should use
pulumi.all({ statements: ...})
is that the correct approach?
g

gentle-diamond-70147

03/08/2019, 10:54 PM
I think that should do it.
10 Views