Skip to content

Allow accessing yaml configuration .env.xxx from lua moduleΒ #9585

@ecerulm

Description

@ecerulm

Is your feature request related to a problem? Please describe.

While using fluentbit yaml configuration you can use

env:
  myvar1: myvalue1

but those values cannot be accessed via lua module today, the following code won't work

          - name: lua
            call: modify
            code: |
              function modify(tag, timestamp, record)
               new_record = {}
               new_record.xxxx = env.myvar1
               return  1, timestamp, new_record
              end

Describe the solution you'd like

I would like a global variable env available while evaluating the lua function giving access to the things defined in the fluent configuration yaml at .env

Describe alternatives you've considered

  • hard coding the values in the lua code

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions