GCP TSE is here to help you with your situation 🤞.
- How can I restore the <number>[email protected] account?
You're right - as per Google Cloud Docs [1] you can't restore your Service Account (SA), because after 30 days, IAM permanently removes it.
- How can I configure the Firebase CLI to use a newly created or existing service account for Cloud Functions deployment instead of the deleted default?
Firebase CLI has several ways [2] to authenticate to API: using the Application Default Credentials (ADC) or using FIREBASE_TOKEN (considered legacy). You might have some kind of custom setup, but in general to authenticate Firebase CLI with a SA you should follow this simple guide [3]:
GOOGLE_APPLICATION_CREDENTIALS
OS environment variable using gcloud auth application-default login
or manually (depending on your dev environment). Details are in the linked docs.[1] https://cloud.google.com/iam/docs/service-accounts-delete-undelete#undeleting
[2] https://firebase.google.com/docs/cli#cli-ci-systems
[3] https://firebase.google.com/docs/app-distribution/authenticate-service-account
[4] https://cloud.google.com/docs/authentication/provide-credentials-adc
If you haven't solved your problem using the above guide, please explain your deployment process stp-by-step. Also, try to answer as much as possible:
KEY_FILE
and FIREBASE_TOKEN
keys simultaneously?PROJECT_ID
key?