nice-cat-91582
10/31/2019, 11:50 AMiam.Role.get()
in order to actually get the role from a different policy. I have the ARN/URN/Name/Id all easily available, it's just a matter of what to do with those. Anyone know the right way to make that work?better-rainbow-14549
10/31/2019, 11:55 AMquiet-wolf-18467
StackReference
?nice-cat-91582
10/31/2019, 2:27 PMIAM.Role
better-rainbow-14549
10/31/2019, 2:28 PMquiet-wolf-18467
white-balloon-205
aws.iam.Role.get
takes two parameters. The first is the logical name you want to use to track this resource in their stack. The second is the cloud provider id
which is just the “friendly name” of the Role in AWS.
https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/aws/iam/#Role
You are right that if you need a true instance of Role
in your other stack, you should export the id from one stack, use StackReference to retrieve it in another and get
to populate a full Role instance from it.nice-cat-91582
11/01/2019, 1:55 PMpreview
or up
? It seems to take a long time to grab the IAM Role (I assume it is making API calls to AWS/Pulumi)