-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
I'm submitting a...
[ ] Regression
[ ] Bug report
[X] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
Current behavior
The library usage requires us to have read-write cosmodb API key, where as it could be used for a readonly purpose with a readonly key.
In this line,
| const dbResponse = await client.databases.createIfNotExists({ |
Expected behavior
The library must be able to use with both readonly and readwrite keys.
We could enhance the module options with a isReadOnly property, which skips running createIfNotExists
Minimal reproduction of the problem with instructions
- Create any cosmodb in azure portal.
- Get the primary/secondary readonly keys to use in the library.
- Use the module
AzureCosmosDbModulein a nestjs app with readonly key
What is the motivation / use case for changing the behavior?
Flexibility. There could be business usecases, where some of the micro services should only have readonly access to the database, instead of readwrite. Currently this flexibility is missing in the library.
Environment
Nest version: 10.3.7
For Tooling issues:
- Node version: v20.11.1
- Platform: Mac
Others:
manekinekko
Metadata
Metadata
Assignees
Labels
No labels