Using 'OPA run config-file' to define policy file and policy json data file #382
-
Hi There, I'm currently reading https://www.openpolicyagent.org/docs/latest/configuration/. The configuration file seems to only support bundle files. Can we define individual policy files and policy data josn files in the YAML configuration file, similar to the 'opa run -d option'? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Hi! No, those are passed only from the command line. The reason for that is that bundles provided via config are commonly remote, and require things like credentials to fetch. These bundles also commonly update during the course of OPAs deployment, while file system bundles don't. Shorter version: use bundles on disk for local development, and remote bundles for testing/stage/production. |
Beta Was this translation helpful? Give feedback.
-
What if I don't use remote bundle at all, just load policy files to OPA. Is this a common approach? |
Beta Was this translation helpful? Give feedback.
Hi! No, those are passed only from the command line. The reason for that is that bundles provided via config are commonly remote, and require things like credentials to fetch. These bundles also commonly update during the course of OPAs deployment, while file system bundles don't. Shorter version: use bundles on disk for local development, and remote bundles for testing/stage/production.