i've run into troubles doing something which must ...
# dotnet
g
i've run into troubles doing something which must be completely trivial. Im making an AWS stack where i need to get the AWS Account Number of the current account, so something i could get by GetCallerIdentity. I can see this object exists in the SDK, but somehow i cant find i locally. Maybe i am trying to invoke it in a wrong fashion. So can anyone tell me how to Get Caller Identity correctly? 🙂 Using latest pulumi version
t
Something like this:
Copy code
var identity = Output.Create(Pulumi.Aws.Invokes.GetCallerIdentity());
var accountNumber = identity.Apply(i => i.AccountId);
g
i KNEW it would be something simple, but just had the wrong approach. Thanks for helping out, i got it working using your example! 👍 😄