// Generated by conforma CLI documentation tooling. DO NOT EDIT.
= ec opa exec

Execute against input files

== Synopsis

Execute against input files.

The 'exec' command executes OPA against one or more input files. If the paths
refer to directories, OPA will execute against files contained inside those
directories, recursively.

The 'exec' command accepts a --config-file/-c or series of --set options as
arguments. These options behave the same as way as 'opa run'. Since the 'exec'
command is intended to execute OPA in one-shot, the 'exec' command will
manually trigger plugins before and after policy execution:

Before: Discovery -> Bundle -> Status
After: Decision Logs

By default, the 'exec' command executes the "default decision" (specified in
the OPA configuration) against each input file. This can be overridden by
specifying the --decision argument and pointing at a specific policy decision,

e.g., opa exec --decision /foo/bar/baz ...

[source,shell]
----
ec opa exec <path> [<path> [...]] [flags]
----

== Examples
  Loading input from stdin:
    opa exec [<path> [...]] --stdin-input [flags]

== Options

-b, --bundle:: set bundle file(s) or directory path(s). This flag can be repeated.
-c, --config-file:: set path of configuration file
--decision:: set decision to evaluate
--fail:: exits with non-zero exit code on undefined/empty result and errors (Default: false)
--fail-defined:: exits with non-zero exit code on defined/non-empty result and errors (Default: false)
--fail-non-empty:: exits with non-zero exit code on non-empty result and errors (Default: false)
-f, --format:: set output format (Default: json)
-h, --help:: help for exec (Default: false)
--log-format:: set log format (Default: json)
-l, --log-level:: set log level (Default: error)
--log-timestamp-format:: set log timestamp format (OPA_LOG_TIMESTAMP_FORMAT environment variable)
--set:: override config values on the command line (use commas to specify multiple values) (Default: [])
--set-file:: override config values with files on the command line (use commas to specify multiple values) (Default: [])
-I, --stdin-input:: read input document from stdin rather than a static file (Default: false)
--timeout:: set exec timeout with a Go-style duration, such as '5m 30s'. (default unlimited) (Default: 0s)
--v0-compatible:: opt-in to OPA features and behaviors prior to the OPA v1.0 release (Default: false)
--v1-compatible:: opt-in to OPA features and behaviors that are enabled by default in OPA v1.0 (Default: false)

== Options inherited from parent commands

--debug:: same as verbose but also show function names and line numbers (Default: false)
--kubeconfig:: path to the Kubernetes config file to use
--logfile:: file to write the logging output. If not specified logging output will be written to stderr
--quiet:: less verbose output (Default: false)
--retry-duration:: base duration for exponential backoff calculation (Default: 1s)
--retry-factor:: exponential backoff multiplier (Default: 2)
--retry-jitter:: randomness factor for backoff calculation (0.0-1.0) (Default: 0.1)
--retry-max-retry:: maximum number of retry attempts (Default: 3)
--retry-max-wait:: maximum wait time between retries (Default: 3s)
--trace:: enable trace logging, set one or more comma separated values: none,all,perf,cpu,mem,opa,log (Default: none)
--verbose:: more verbose output (Default: false)

== See also

 * xref:ec_opa.adoc[ec opa - Open Policy Agent (OPA) (embedded)]
