sparse-intern-71089
05/19/2021, 3:03 PMbillowy-army-68599
billowy-army-68599
aws.iam.getUser
then use an apply()
to build the policy document stringlittle-market-63455
05/19/2021, 3:15 PMlittle-market-63455
05/19/2021, 3:16 PMGetUserResult
eventually to build different resources. So according to your suggestion I should be accepting a Input<GetUserResult>
on the inside of the component?billowy-army-68599
pulumi.all
- I can try build an example, hold onbillowy-army-68599
GetUserResult
?little-market-63455
05/19/2021, 3:32 PMArn
and the UserName
billowy-army-68599
little-market-63455
05/19/2021, 3:40 PMComponentResource
little-market-63455
05/19/2021, 3:40 PMbillowy-army-68599
little-market-63455
05/19/2021, 3:54 PMaws.iam.Policy
where the Resouce
array includes the ARN of the user
Another usage is when calling the AWS APIs with the user's name to get their access keybillowy-army-68599
little-market-63455
05/19/2021, 3:56 PMlittle-market-63455
05/19/2021, 4:02 PMbillowy-army-68599
billowy-army-68599
billowy-army-68599
pulumi.output
but I only use one of the paramaters, that's mainly to show you what's possible:little-market-63455
05/19/2021, 6:05 PMuser
type in and I thought initially I would pass the equivalent
But I also understand the way you did. Thank you kindly for your helplittle-cartoon-10569
05/19/2021, 8:51 PMuser
variable is a Pulumi resource, so you don't need to use getUser
. You can pass the id of the user directly from the user variable to other Pulumi resource constructors.little-cartoon-10569
05/19/2021, 8:53 PMlittle-market-63455
05/20/2021, 7:36 AMlittle-market-63455
05/20/2021, 8:21 AMOutput<GetUserResult>
should work?little-market-63455
05/20/2021, 1:20 PMapplies
is a bit unreadable but that's probably more idiomatic from what I feel nowlittle-cartoon-10569
05/20/2021, 7:57 PM