Thiyagu
01/09/2020, 1:48 PMaws paramstore
storing the config value and resolving at runtime at the application start?Ben
01/09/2020, 3:27 PMAlex
01/10/2020, 8:51 AMreturn MapApplicationConfig(
...
Pair("db.password", ssmService.getSsmParameter("${stage}.db.password", true)),
...
)
and the ssmService
utilize the AWS SsmClient
Straight forward.Thiyagu
01/10/2020, 1:36 PMapplication.yml
which has value like
db:
name: test
username: {{user_name}}
In these user name should be replaced by the ssmService
at runtime. How do i go about this one?Alex
01/10/2020, 2:02 PMapplication.conf
you still need to create your db-connection somehow at the start of the app .. so you can decide:
• are the keys for db.*
in your config just ssm-keys? and you resolve them when you initialize your db
• or do you prefix your ssm keys with ssm:
(or stuff like this) in your config, to just resolve specific values from ssm (when config._startsWith_(*"ssm:"*)
)
For me I found it personally easier to use embeddedServer
and use MapApplicationConfig
.Thiyagu
01/10/2020, 2:21 PMAlex
01/10/2020, 2:28 PM