How to consume a secret from an API call #4088
-
We can create and delete secrets and environment variables through API, but I cannot find a way to read the secret value or the environment variable value (when it's a secret) through the API. What's the best way of doing it? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
To add to the discussion, adding a secret + environment variable from the CLI works like a charm. But when adding through the API, after running |
Beta Was this translation helpful? Give feedback.
-
Reading the code for the CLI, here I finally figured it out. There's an undocumented parameter called |
Beta Was this translation helpful? Give feedback.
Reading the code for the CLI, here I finally figured it out. There's an undocumented parameter called
decryptable
that, when creating via API and setting it to true, makes it available when runningnow env pull
. I still don't know if this is the correct way of using the API for secret and env variables, but looks like it works now.