I’m setting up our
render.yaml and so far, haven’t run into any problems. That said, I’m struggling conceptually with how I might set up a preview environment given the existing spec.
Scenario - Let’s say that I want to run a separate managed DB in our preview environment that persists over time (rather than building and being torn down each time a PR is closed).
I see in the documentation an example like this:
envVars: - key: MY_DB_CONNECTION_STRING value: production-string previewValue: preview-string
I’m struggling to see the utility in this syntax since I don’t want to expose either of these variables via source control.
What I’m currently doing is this:
envVars: - key: MY_DB_CONNECTION_STRING fromDatabase: name: prod-db property: connectionString
So my question is… How do I replace this value in a preview environment? Ideally, here is how I would expect this to work:
envVars: - key: MY_DB_CONNECTION_STRING fromDatabase: name: prod-db property: connectionString # This is not valid render.yaml syntax, but is what I'm looking for previewOverride: name: preview-db property: connectionString
Is there a way to achieve something like this already? Or should I just create an entirely new env variable for preview environment and throw it in an env group?