[FR] Force type when doing environment variable substitution #36183
Labels
enhancement
New feature or request
needs triage
New item requiring triage
processor/resource
Resource processor
Component(s)
processor/resource
Is your feature request related to a problem? Please describe.
When substituting env variables like "00001" (as a string) (e.g. into an attribute), the type of the produced value is automatically Int. This causes leading 0s to be stripped. (i.e. result is Int(1)) I want to be able to force it to type Str at substitution.
Describe the solution you'd like
Be able to declare type when substituting environment vars.
Describe alternatives you've considered
attribute: convert
: it is done after the value is already substituted as an Int, so in this case it will be doing Int(1) => Str(1), which is still not the same as Str(00001).Additional context
With config
When the env var id = "00001", the value of the attribute "some_id" will be Int(1).
If we do a
afterwards, the value is Str(1) which is still different from "00001" / Str(00001).
The text was updated successfully, but these errors were encountered: