An env0 plugin represents a composite set of commands that are executed as a single unit. In order to use an already implemented plugin, you need to add it to your
Here's an example usage of the OPA plugin:
version: 2 deploy: steps: terraformPlan: after: - name: OPA use: https://github.com/env0/env0-opa-plugin inputs: path: bundle-file-path flags: --fail --format=raw query: data.example.violation[x]
In order to create a new env0 plugin of yours, you must follow these guidelines:
- Create a new public Git repository.
- Add a new
env0.plugin.yamlto it. This YAML file uses the following schema:
name(Required) - the name of the plugin
icon- A URL to the icon of the plugin.
objectdefining the expected inputs for your plugin. The
inputsattribute has its own schema as well:
inputs.<id>- The identifier of the input. Has to be unique.
inputs.<id>.description- (Required) - A short description of the input.
booleanvalue that states whether this input is required or not.
objectdefining what the plugin executes. Currently, the plugin environment only supports
bashruntime. In order to execute commands, you should use the
- Use it in an
The plugins location at runtime
As a plugin author, if you need the path to where your plugin resides, you can use the
Updated about 1 month ago