Hi, how should I pass a nested structure with arra...
# general
i
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
I think that should do it.