DEV Community


Discussion on: How to Set up FaunaDB for local development

englishcraig profile image
Craig Franklin Author

A secret key is associated is the database that it was created for, so if you create a key for a database, it will be valid for as long as that database exists. It sounds like maybe you're asking for a secret key that's useable for multiple databases or that's valid even after destroying and recreating a database. This would mean having a secret key that applies to the Fauna instance, independent of any databases within it, and as far as I know, that's not possible.

unlocomqx profile image
Mohamed Jbeli • Edited

Thanks for your reply, I was interested in a fixed secret to use it for testing purposes. I found another way which to regex match the create-key output and extract the secret key and write it to test.env
Here's the script in case anybody finds it useful