magnificent-helicopter-3467
06/22/2022, 10:38 PMsa, err := serviceaccount.NewAccount(ctx, s.Name, &serviceaccount.AccountArgs{
AccountId: pulumi.String(s.Id),
DisplayName: pulumi.String("A service account for my app"),
})
if err != nil {
return err
}
fmt.Println("Service account email: ", sa.Email)
storageAdmin, err := organizations.LookupIAMPolicy(ctx, &organizations.LookupIAMPolicyArgs{
Bindings: []organizations.GetIAMPolicyBinding{
organizations.GetIAMPolicyBinding{
Role: "roles/compute.storageAdmin",
Members: []string{
sa.Email,
},
},
},
}, nil)
2 questions here:
• Can I rely on using sa.Email
after calling serviceaccount.NewAccount
? Or does that run asynchronously and populate sa
with promise-like values?
• If I can use sa.Email
where I have it, how do I convert this pulumi.StringOutput
to String
?No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by