opsmill / infrahub

Infrahub - A new approach to Infrastructure Management
https://opsmill.com/
GNU Affero General Public License v3.0
211 stars 18 forks source link

feature: Custom Jinja2 Filters #955

Open dgarros opened 1 year ago

dgarros commented 1 year ago

Component

API Server / GraphQL, Git Integration

Describe the Feature Request

Jinja2 allows users to extend the capabilities of the language by providing addition filter in a form of a python function. These user defined functions must be defined when the Jinja2 environment is being initialized.

Infrahub should offer a way for users to provide their own Jinja2 filters or to load a library of filters from the community.

Similar to the other extensions supported by the platform, Filters should be provided via a Git Repository

Ideally, filters should be supported when rfiles are being generated locally with the command infrahubctl render

Describe the Use Case

Allow users to customize their RFile by providing custom functions.

Additional Information

No response

ogenstad commented 1 year ago

There are some additional notes in #1183 about how we might access the filters from infrahubctl.