Current behavior
When trying to deploy a service using a .env that has variables used in prisma.yml. I get this error:
â–¸ Invalid prisma.yml file
â–¸ prisma.yml.disableAuth should be boolean. type: boolean
Reproduction
This branch of this repo will reproduce the issue.
https://github.com/johnslemmer/todos-db-prisma/tree/bug-prisma-disableAuth-variable
Expected behavior?
disableAuth should be able to be set using a variable. It currently can't.
I believe the problem is that are stating both disableAuth and secret in your prima.yml file. Could you try either of those?
See my latest commit: https://github.com/johnslemmer/todos-db-prisma/tree/6f0df3dc55fc7bf3795a364f012a07c208d15799
I have tried commenting out secret and I'm still getting the same error.
Also, I think it would be desirable to be able to do the following in the future so that a .env file can control all aspects of deployment. I believe this would be a good feature for everyone (just based on https://12factor.net/).
stage: ${env:PRISMA_STAGE}
cluster: ${env:PRISMA_CLUSTER}
disableAuth: ${env:PRISMA_DISABLE_AUTH}
secret: ${env:PRISMA_SECRET}
This does look like a bug when using environments variables for disableAuth, thanks @johnslemmer! I also agree that there is an overlap of disableAuth and secret, that could be combined into a single mechanism.
Any progress on this issue? Would be nice to be able to control disableAuth with env vars.
disableAuth has been removed from prisma.yml in version 1.7.
If you don't want to authenticate your Prisma service, remove the secret property.
Thanks @marktani !
Most helpful comment
Any progress on this issue? Would be nice to be able to control
disableAuthwith env vars.