Currently, I have a resources/application.conf
file which has the following keys:
development {
server = www.myapp.com
aws_key = my_aws_key
aws_secret = my_aws_secret
}
I would like to remove my aws_key
and aws_secret
from the file.
I was thinking of creating another file called resources/credentials.conf
and storing my personal authentications there.
credentials {
aws_key = my_aws_key
aws_secret = my_aws_secret
}
and then include
it some way in my application.conf
or merge that config to the Config
object in addition to application.conf
.
credentials.conf
would be git ignored. A sample file would be checked in credentials-sample.conf
which each developer would change according to his own credentials and rename the sample file to credentials.conf
I tried different variation of include
like
- include "credentials"
- include "credentials.conf"
- include "./credentials.conf"
- include file("./credentials.conf")
and so on.
I know I can pass it via system variables but I would like to try it like mentioned above. If you know of a better way, please let me know.