Firebase is an app development platform that helps build and grow apps and games. Backed by Google.
Official documentation: https://firebase.google.com/docs
REST API documentation: https://firebase.google.com/docs/projects/api/reference/rest
Link to WEB-UI console: https://console.firebase.google.com/
Creating Firebase project
The level of possible automation
GCP TF provider has next firebase resources:
google_firebase_apple_app (added in v4.40.0: https://github.com/hashicorp/terraform-provider-google/releases/tag/v4.44.0 )
Manual part of resources
Integration with Google Analytics
Currently GA Account cannot be created neither via terraform nor via REST API.
The result of conversation with Google Analytics API team about the way to create GA account automatically (via the REST API):
| Firebase Support <firebase-support@google.com>| … that it's not possible to create a Google Analytics account without the end user accepting a Terms of Service first …
In more detailed - here
Available options:Manually link via firebase GUI console:
Go to
Project settings
->Integrations
→Google Analytics
=>Enable
This will automatically create GA account. Example of result-page:
Create GA Account manually via GA dashboard - https://analytics.google.com/ - and then link firebase project with this GA account via REST API request:
curl -X POST -H "Authorization: Bearer \"$(gcloud auth print-access-token)\"" \ ✔ at 22:30:53 -H "Content-Type: application/json; charset=utf-8" \ -H "x-goog-user-project: safi-sandbox-firebasetest" \ --compressed \ --data '{"analyticsAccountId":"249078171"}' \ "https://firebase.googleapis.com/v1beta1/projects/safi-sandbox-firebasetest:addGoogleAnalytics"
You will need GA account ID - get it in GA dashboard:
Go to Admin
→ Account settings
:
BigQuery Integration:
It’s possible to create BiqQuery resources via terraform but currently there is no way to link it with firebase project neither via terraform nor via REST API.
The result of conversation with Firebase API Support team about the way to link Firebase project to BigQuery (via REST API):
| Firebase Support <firebase-support@google.com>
| … there currently is no way to do this directly via API …
In more detailed - here
Available options:Manually link via firebase GUI console:
Go to
Project settings
->Integrations
→BigQuery
=>Link
:Next
:Configure integrations:
-Export settings: Integrations
:
-Google Analytics
-Crashlytics
-Performance Monitoring
-Cloud Messaging
-Import from BigQuery
:
-Imported segments
(Beta)=> Then
Link to BigQuery
This will create BigQuery resource which will be available via GCP dashboard (in the same GCP project as Firebase project name)
Attachments:
image-20221130-073551.png (image/png)
image-20221130-075134.png (image/png)
image-20221130-080216.png (image/png)
image-20221130-080330.png (image/png)
image-20221130-080833.png (image/png)