firebasegoogle-bigqueryfirebase-clifirebase-extensions

How to install firebase extension in not-interactive way


I am trying to install firebase firestore-bigquery-export extension through firebase CLI. But I can not find how I can install an extension in non-interactive way.

I need that because I have multiple environments and CI.

The console contains information about , but where I can find parameters name?

$ firebase ext:install firestore-bigquery-export -h
Usage: firebase ext:install [options] [extensionName]

install an official extension if [extensionName] or [extensionName@version] is provided; or run with `-i` to see all available extensions.

Options:
  --params <paramsFile>  name of params variables file with .env format.
  -h, --help             output usage information

Thank you for your help!


Solution

  • As explained here in the doc (expand the "Bypass the interactive terminal prompts for parameter values during installation" section), you need to :

    1. Create a .env file (for example, params.env) that defines your parameter values. Save the file locally.
    • Declare each parameter by its param value found in the extension's extension.yaml file.
    • Include values for all the parameters.
    • Follow dotenv syntax.
    1. Run the extension-install command with the --params flag. For example, to install the Translate Text extension, run the following command: firebase ext:install firestore-translate-text --params=path/to/params.env --project=projectID-or-alias

    To find the extension.yaml file for a given extension, you need to view its source code. To find a link to the source code for one the official Firebase extensions, you need to click "Learn more" on the extension's card on the Firebase Extensions product page or in the Firebase console.