https://pulumi.com logo
Title
p

proud-dusk-33872

03/19/2021, 1:46 AM
Hi guys, how can I create a CosmosDB/MongoDB desending index?
w

witty-candle-66007

03/19/2021, 3:34 PM
I’m not a cosmosdb expert, but from looking at analogous ARM templates, it appears that you would specify indexing policies in the mongodb collection resource: https://www.pulumi.com/docs/reference/pkg/azure-native/documentdb/mongodbresourcemongodbcollection And specifically in the
resource
property https://www.pulumi.com/docs/reference/pkg/azure-native/documentdb/mongodbresourcemongodbcollection/#mongodbcollectionresource
p

proud-dusk-33872

03/20/2021, 7:47 PM
Thanks Mitch. It actually turns out that you can't because the underlying REST API doesn't support it. The index keys are just strings and so cannot individually indicate ascending/descending