-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FR] Force type when doing environment variable substitution #36183
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This is still an issue, though not with the |
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: