I want to connect from azure web app to google cloud platform project. According to the documentation, I need to set an environment variable - GOOGLE_APPLICATION_CREDENTIALS - to the location of json file containing the private key downloaded from gcp project for service account. I am saving the json file on a blob and setting its location in the environment variable, but it prepends the name of the current working directory to the blob path.
How can I avoid uploading the json file to the repository . I am using .net.
The blob path is changed from "https:/myfirstblob.blob.core.windows.net/mygcp-service-account/creds.json" is changed to "C:\mycurrentworkingdirectory...\..\https:\myfirstblob.blob.core.windows.net\mygcp-service-account\creds.json"
I used the following approach to avoid setting the environment variable
GOOGLE_APPLICATION_CREDENTIALS- I added the json properties in my configuration file. The values of which I can pick from azure key vault. There is a provision in google clients to set credentials usingJsonCredentialParameters. Here I am using PredictionServiceClientBuilder client.Below 2 alternative properties are also provided by google clients for setting credentials -
AND