'Can we maintain/track Cosmos DB DDL script changes in a Git repository like what we do in Azure SQL?

When I work Azure SQL data tables, I can maintain/track changes to DDL script files in a git repository.

Do we have a similar approach for Cosmos DB?

Can we script a Cosmos Database and its Containers in a file and source control change track them in a Git repository?

What is the recommended directory structure for Cosmos DB DDL scripts?

This is not a CI/CD question and Yes we can store executable scripts in source control.

My question is if we can script a CosmosDB into a file (probably json) similar to what we can do in SQL Server Management studio.

Is that possible?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source