Patch regression in cosmosdb state component Init
PR introduced a regression in cosmosdb state component `Init()`
by creating a `NewConfig()` which sets a new DefaultIdentificationHydrator,
which causes a panic later when invoked.
Patch this by restoring the configuration setting to use a struct with
`nil` `IdentificationHydrator`.
@@ -114,9 +114,11 @@ func (c *StateStore) Init(meta state.Metadata) error {
// Create the client; first, try authenticating with a master key, if present
var config *documentdb.Config
if m.MasterKey != "" {
- config = documentdb.NewConfig(&documentdb.Key{
+ config = &documentdb.Config{
+ MasterKey: &documentdb.Key{
Key: m.MasterKey,
- })
+ },
+ }
} else {
// Fallback to using Azure AD
env, errB := azure.NewEnvironmentSettings("cosmosdb", meta.Properties)
