Trying to deploy to app engine for a dev site and would like to simply include GCP creds inside the app.yaml.
Is it somehow possible to include the creds instead of linking to yet another file?
env_variables:
...
GOOGLE_APPLICATION_CREDENTIALS: './credentials/service-account.dev.json'
I've tried many things however it seems the next-best option is to setup Secret Manager to avoid this.
CodePudding user response:
You might want to take a look into this authentication document.
Also here is another thread you could find interesting.
CodePudding user response:
Here is how you can use a service account for the credential for app engine.
service_account Preview — Using user-managed service accounts for version-specific deployments
This feature is covered by the Pre-GA Offerings Terms of the Google Cloud Terms of Service. Pre-GA features may have limited support, and changes to pre-GA features may not be compatible with other pre-GA versions. For more information, see the launch stage descriptions.
Optional. The service_account element lets you specify a user-managed service account as the identity for the version. The specified service account will be used when accessing other Google Cloud services and executing tasks.
The service account must be provided in the following format:
service_account: [SERVICE_ACCOUNT_NAME]@[PROJECT_ID].iam.gserviceaccount.com
click here for more documetation.