Gets/Invokes are typically synchronous in the pulumi provider SKDs. This means that outputs wont be compatible. So to you output values with a sync invoke/get you'll need to unwrap the outputs via
p.Name.Apply(func(n){
// do the GetDefaultServiceAcc call here
})
lemon-agent-27707
10/05/2020, 3:11 PM
Whatever you return from that call will be a new output. Note that it's not advised to create resources from within applies as this can break the dependency graph, but reading like this should be fine.
b
big-account-56668
10/06/2020, 9:18 AM
Ah, I see that makes sense. I did not know that they were synchronous. Thanks!
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.