Recommended approach for varying preview environments #1177
michaelhays
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Hello @michaelhays, if i understand you'd like to import the same set of secret keys across different environments and want to very the secret value between these preview environments? If so, have you taken a look into our secret imports https://infisical.com/docs/documentation/platform/secret-reference#secret-imports? This will allow you to import common secret and override their values for the different preview environments. Let me know if you have questions! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Context
We've been using Infisical for a couple of months, and have been quite happy with the DX.
We have 5 environments, which correspond to our 5
APP_ENV
values:development
test
preview
staging
production
Infisical has been excellent for managing the secrets in each of these environments.
Problem
However, one workflow that we haven't quite figured out is how to handle differing secrets per preview environment. We use Vercel Preview Deployments, and create a new preview deployment for each of our feature branches. This includes an isolated database, so the
DATABASE_URL
varies for each deployment.Other than the
DATABASE_URL
, the secrets in thepreview
environment in Infisical are identical between preview deployments. What is the recommended approach to handling this use case?Current workaround
We could create a new Infisical environment for every preview deployment that we create, so that we can vary the
DATABASE_URL
between each of these.However, this seems pretty tedious logistically, and complicates our clean 5-environment structure we have now.
Ideal solution
The ideal solution for us seems to be "sub-environments", so that we could vary environment specific secrets within the
preview
Infisical environment. That way, we could reuse thepreview
secrets across all of our previews, but varyDATABASE_URL
between e.g. "preview
>feat-1
", and "preview
>feat-2
".{VARIES}
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions