Question
When providing environment variables, you have the option to provide JSON formatted values.
What would be the deciding factor to create a JSON formatted variable?
Answer
JSON formatted variables are useful if you are trying to store variables like arrays.
For example, Google Cloud or Firebase third-party vendors provide more than one keys as Credentials, so they would make sense to be added as a JSON environment variable.
GCP_CREDENTIALS
{
"API_KEY": "***********",
"CLIENT_ID": "1234567890-abc123getExample.apps.googleusercontent.com",
"USER_NAME": "exampleid.iam.gserviceaccount.com",
"PROJECT_ID": "my-awesome-project",
"AUTH_URI": "https://accounts.google.com/o/oauth2/auth"
}
Comments
Please sign in to leave a comment.