Config test and environment variables don't work together
- Dominant language
- Java
- Stars
- 14.9k
- Forks
- 3.5k
- Avg merge
- 19h 14m
- Merged PRs (30d)
- 63
Description
It seems that `-t` parameter does not do type conversion as it should be done without `-t`.
Consider the following test input config:
```
input {
kafka {
zk_connect => "${ZK_HOST}"
topic_id => "test"
group_id => "test"
consumer_threads => "${CONSUMER_THREADS}"
queue_size => 2000
}
}
```
Logstash can be sucessfully started with:
```
ZK_HOST=localhost CONSUMER_THREADS=10 logstash --allow-env -f ./logstash.conf
```
But if executing with `-t` like:
```
ZK_HOST=localhost CONSUMER_THREADS=10 logstash -t --allow-env -f ./logstash.conf
```
It fails with:
```
Invalid setting for kafka input plugin:
input {
kafka {
# This setting must be a number
# Expected number, got "${CONSUMER_THREADS}" (type ${CONSUMER_THREADS})
consumer_threads => "${CONSUMER_THREADS}"
...
}
} {:level=>:error}
The given configuration is invalid. Reason: Something is wrong with your configuration. {:level=>:fatal}
```
Contributor guide
Assessment
This issue has not been assessed yet.