Flatten database secrets to ConnectionString entry?
I am sorry if this has been covered already. I cannot find anything like it in discussion.
AWS database secrets are dictionaries. Say I have specified a DB secret for an application called MyApplication: {"username":"myuser","password":"mypassword","engine":"sqlserver","host":"mysqlserver","port":"1433","dbname":"mysqldb"}
I would like to convert this to a ConnectionString entry in my configuration, like this:
"ConnectionStrings" { "MyApplicationConnectionString": "Data Source=mysqlserver;Database=mysqlserver;Integrated Security=false;User ID=myuser;Password=mypassword;" }
But the configuration builder treats each item in the dictionary as a single configuration entry. So there is one entry for "username," another for "password," and so on. And no way I can find to flatten them into a single entry.
I considered using KeyGenerator but that only will allow mapping from each individual entry in the secret (e.g. "username," "password," etc.) to new entries in the destination config space, one by one.