I have requirement to get all the properties of a service account in google cloud. is it possible to list all the properties something like Select *.
otherwise i need the following information:
- SA account name
- Email address
- Iam Role assigned
- User managed Keys (if any)
- account creation date
- last used /authentication time.
- Project name
- account status (enable / disable)
I can get all the projects then all the service accounts in it but i dont know how to get all other values.
foreach ($project in gcloud projects list --format="value(projectId)")
{
Write-Host "ProjectId: $project"
foreach ($robot in gcloud iam service-accounts list --project $project --format="value(email)")
{
Write-Host " -> Robot $robot"
}
}