Skip to main content

firebase

Application development platform for creating mobile and web applications.

Provider Summary

total services: 15
total resources: 96

See also:
[SHOW] [DESCRIBE] [REGISTRY]


Installation

To pull the latest version of the firebase provider, run the following command:

REGISTRY PULL firebase;

To view previous provider versions or to pull a specific provider version, see here.

Authentication

The following authentication methods are supported:

  • service_account
  • interactive for running interactive queries from Cloud Shell or other machines where the user is authenticated using gcloud auth login

for more information on creating service accounts and key files, see Service accounts overview.

Service Account Environment Variable (default)

The following system environment variable is used by default:

  • GOOGLE_CREDENTIALS - contents of the google service account key json file. This variable is sourced at runtime (from the local machine using export GOOGLE_CREDENTIALS=cat creds/my-sa-key.json for example or as a CI variable/secret).

This variable is sourced at runtime (from the local machine using export GOOGLE_CREDENTIALS=$(cat creds/my-sa-key.json) for example or as a CI variable/secret).

Specifying the service account key file location directly

You can specify the path to the service account key file without using the default environment variable by using the --auth flag of the stackql program. For example:

AUTH='{ "google": { "type": "service_account", "credentialsfilepath": "creds/sa-key.json" }}'
stackql shell --auth="${AUTH}"

or using PowerShell:

$Auth = "{ 'google': { 'type': 'service_account', 'credentialsfilepath': 'creds/sa-key.json' }}"
stackql.exe shell --auth=$Auth

Interactive Authentication

When you are using Google Cloud Shell or on a machine where you have authenticated using gcloud auth login, you can then use the following authentication method:

AUTH='{ "google": { "type": "interactive" }}'
stackql shell --auth="${AUTH}"

or using PowerShell:

$Auth = "{ 'google': { 'type': 'interactive' }}"
stackql.exe shell --auth=$Auth

Firebase projects

All Firebase projects visible to the authenticated principal:

SELECT
projectId,
displayName,
state
FROM firebase.firebase.projects;

Apps by platform

Android, iOS and web apps registered in a project:

SELECT appId, displayName, state
FROM firebase.firebase.android_apps
WHERE projectsId = 'my-project';

SELECT appId, displayName, state
FROM firebase.firebase.ios_apps
WHERE projectsId = 'my-project';

SELECT appId, displayName, state
FROM firebase.firebase.web_apps
WHERE projectsId = 'my-project';

Web app config

The client config (API key, auth domain, storage bucket) for a registered web app:

SELECT
appId,
apiKey,
authDomain,
storageBucket
FROM firebase.firebase.web_apps_config
WHERE projectsId = 'my-project'
AND webAppsId = 'my-web-app-id';

Test results

Test executions from Test Lab, most recent first:

SELECT
executionId,
state,
testExecutionMatrixId
FROM firebase.toolresults.executions
WHERE projectId = 'my-project' AND historyId = 'my-history-id'
ORDER BY executionId DESC;

Services