Hello folks, Can you help me, Anyone knows how to ...
# typescript
h
Hello folks, Can you help me, Anyone knows how to get the current user email with pulumi gcp
n
Do you mean the email address of the service account? You can do something like this:
Copy code
const gcsAccount = await gcp.storage.getProjectServiceAccount({});
    gcsAccount.emailAddress
ah sorry thats specific to the storage account.
c
I don't think there is a direct way. However, you could just exec a command from Pulumi and read the output from stdout. You should be able to do that with any of the language SDKs. For example,
gcloud auth list
(which also supports filters) or check if
core/account
is set using
gcloud config get core/account
. https://cloud.google.com/sdk/gcloud/reference/auth/list