Secret Manager integration

Hi!

I’ve been testing the Secret Manager integration but I cannot make it work. I’ve implemented the most basic test I can think of.

I’ve defined a secret named “api_key” and Firebase Studio can see it through the integration (it correctly copies the value to the clipboard). When trying to access it through code, it seems to get an empty value:

dev.nix:

# Sets environment variables in the workspace
  env = {
    NEXT_PUBLIC_FIREBASE_API_KEY = builtins.getEnv "api_key";
    TEST_VAR = "hello";
  };

Terminal:

studio-238098495:~/studio{master}$ echo $TEST_VAR 
hello
studio-238098495:~/studio{master}$ echo $NEXT_PUBLIC_FIREBASE_API_KEY 

studio-238098495:~/studio{master}$

Any clue on how to make it work?

Thanks!

Have you tried our Cloud Secret Manager integration via our Integrations Panel?

Hi!

Thanks for replying. Yes, that’s what I did. It’s what I meant in my previous message with “Firebase Studio can see it through the integration”.

But I’m not sure if I’m using the secrets properly. How do I access them? I read that the Secrets Manager integration made the secrets available via env vars?