Inventory plugins can only read from ENV variables. Not sure why, but seems like a architectural limitation. Most of the inventory plugins either read from files (like AWS) or from ENV variables.
The basic configuration items are not templatable at all as no vars
were accessible when designed, extra vars got added later for
'constructed' features.
We do have plans to make this work, specially with vaults (you can
vault the file, but not use inline vaults).