pyhocon icon indicating copy to clipboard operation
pyhocon copied to clipboard

Substitutions using file content

Open davlee1972 opened this issue 1 year ago • 2 comments

A variable substitution can be a token or a environmental variable.

Can we also check if the variable is a file and read the contents of the file?

Example:

rsakey: ${"/home/my_login/.ssh/rsa_key.p8"}

davlee1972 avatar Jan 29 '25 17:01 davlee1972

There is an existing proposal on the lightbend GitHub to support this type of functionality with a new include contents syntax.

rsakey: include contents("/home/my_login/.ssh/rsa_key.p8")

davlee1972 avatar Jan 29 '25 23:01 davlee1972

Additional discussions here:

https://groups.google.com/g/play-framework-dev/c/t2g-TWbqtzY

davlee1972 avatar Jan 30 '25 00:01 davlee1972