Replies: 1 comment 5 replies
-
Gremlinq is agnostic to where the configuration comes from. Here's how you set up configuration in Asp.NET Core. For Azure Key vault, check out this. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using this Gremlinq section in my appsettings.json
"Gremlinq": {
// Optional. Non-provider-specific authentication. Can be overridden in provider sections.
"ConnectionPool": { // optional
"MaxInProcessPerConnection": 32, // optional default value
"PoolSize": 4 // optional, default value
},
"Alias": "g", // optional, default value
"CosmosDb": {
"Uri": "MyUri",
"Database": "Flyt",
"Graph": "Graph",
"AuthKey": "MyKey",
"EndPoint": ""
},
"QueryLogging": {
"Verbosity": "QueryOnly",
"LogLevel": "Trace",
"Formatting": "Indented",
"GroovyFormatting": "AllowInlining"
}
}
And everything works as expected.
Obviously I dont want secrets in my source control, so I'm trying to read the AuthKey from a key-vault.
And it is read into the IConfiguration in startup.cs on key: "Gremlinq:CosmosDb:AuthKey
At startup I do:
services.AddGremlinq(setup =>
{
setup.UseCosmosDb<Model.Graph.Vertex, Model.Graph.Edge>(x => x.ProjectId);
});
But it seems like gremlin only read configuration values from the json file, and not from the complete IConfiguration.
How can I set that AuthKey in startup?
Beta Was this translation helpful? Give feedback.
All reactions