any experts here in setting up cross account acces...
# aws
a
any experts here in setting up cross account access in aws i have little doubts
c
in which type of context? Are creating resources in account A, then also need to make resources in account B?
a
no i just want to access resource of account A in account B using assume role
l
The easiest way imo is to use a separate provider. aws.Provider takes region and profile properties, and profile can have _role___arn_ and _source___profile_ properties.
Then you cam specify the other account's provider in the opts parameter, either in one of the get functions (e.g.
aws.ec2.get("inst", "i-1234567890", {...}, { provider: otherAccount})
https://www.pulumi.com/docs/reference/pkg/aws/ec2/instance/#look-up) or import the resource (e.g.
new aws.ec2.Instance("inst", { ...}, { provider: otherAccount, import: "i-1234567890"})
)