I am trying to set up a Firebase project that needs a default Realtime Database instance using non-interactive CLI.
I've tried deploying the rules:
❯ firebase deploy --only database
Error: It looks like you haven't created a Realtime Database instance in this project before.
Please run firebase init database to create your default Realtime Database instance.
but firebase init is an interactive command, so I can't use it in my CI pipeline.
An attempt to use firebase database:instances:create command also fails with the same message:
❯ firebase database:instances:create default
Error: It looks like you haven't created a Realtime Database instance in this project before.
Please run firebase init database to create your default Realtime Database instance.
I've tried googling for anything around creating default realtime database instances, but can't find anything besides going the interactive CLI way or doing it through the console - both of which are ill-suited for CI.
Is there a way to achieve what I'm after without resorting to interactive tools?
From the second line of that second error message:
Please run firebase init database to create your default Realtime Database instance.
It seems that you'll need to run firebase init database to create the initial/default database instance for the project. After that you can run firebase database:instances:create to create additional instances.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With