manigandham/serilog-sinks-googlecloudlogging

Service Account GCP VM

gchampion opened this issue · 4 comments

If I remove the creds.json it doesn't seem to default to using the GCP VM Service account attached to the VM. Do I need a flag so that the library will use my machine service account in google cloud? I see in the instructions "no additional steps necessary" however continually get access denied (no matter the access level I grant in IAM)

What is creds.json?

The authentication is handled by the Google-Cloud-Dotnet libraries: https://googleapis.github.io/google-cloud-dotnet/

The process is as described here: https://cloud.google.com/docs/authentication/production#providing_credentials_to_your_application

Is the environment variable pointing to a file?

creds.json is the JSON authentication file. This all works if we use this file + environment variable. However in GCP the VM itself has a service account you can utilize (and not have a clear text auth file)

You'll have to debug this in the Google Cloud libraries then. Try printing out that environment variable on the VM to see if might be pointing somewhere else. Is this issue happening with any other library?

may have just been caching issue in app , seems to be working as expected now.