mondoohq/cnquery

Support for Additional Cosmos DB Types (Azure)

HRouhani opened this issue · 1 comments

Issue Description:

Currently, cnquery only supports listing Cosmos DB accounts of the NoSQL type. We request the inclusion of support for additional Cosmos DB types such as MongoDB, Cassandra, Gremlin, Table, and PostgreSQL.

Context:

Azure Cosmos DB offers various APIs to serve to different use cases, as shown below:

  • Azure Cosmos DB for NoSQL
  • Azure Cosmos DB for MongoDB
  • Azure Cosmos DB for Apache Cassandra
  • Azure Cosmos DB for Apache Gremlin
  • Azure Cosmos DB for Table
  • Azure Cosmos DB for PostgreSQL

Screenshot from 2024-07-16 14-28-52

Currently, the cnquery integration only lists Cosmos DB accounts of the NoSQL type, which limits visibility and management of other types of Cosmos DB resources.

Proposed Solution:

Enhance the existing Cosmos DB support (cosmosdb.go in azure) to include querying and listing for all the above-mentioned types. This will involve:

  1. Creating Clients for Different Resource Types: Add clients for MongoDB clusters, Cassandra clusters, Gremlin clusters, Table clusters, and PostgreSQL clusters.
    
  2. Query Each Resource Type: Modify the code to query each type and aggregate the results.
    

already implemented and done!