Hi everyone, I need help to understand to use reso...
# python
c
Hi everyone, I need help to understand to use resource which is like already present in aws.
Copy code
import pulumi
import pulumi_aws as aws
import pulumi_eks as eks

role1 = aws.iam.Role("ways to retrieve it if it is already present in aws")
role2 = aws.iam.Role("ways to retrieve it if it is already present in aws")

cluster = eks.Cluster(...,instance_roles=[role1, role2],...)
I tried to 1. aws.iam.Role.get() 2. aws.iam.getRole() 3. aws.iam.Role("some_role", opt=pulumi.ResourceOption(import_="some_role")) But nothing worked for me Thanks in advance 🙂
b
aws.iam.GetRole
should work, what didn’t work?
c
it returns GetRoleResult type of object which I am unable to use it in eks.Cluster
b
aws.iam.GetRoleOutput
aws.iam.get_role_output I think in python
c
any sort of example you can give