Adding indexes(Not search index) using terraform
I would like to create mongodb atlas index using terraform. But as of now we can able to create search index in mongodb atlas using terraform. here the expectation is to create normal index using terraform.
That actually makes a lot of sense - we actually already have a provisioning Lambda written in Go to create a number of views used in our application - we can extend this to create the indexes as well.
AdminZuhair (Admin, MongoDB) commented
Thanks Ganesh / Ben. The Terraform MongoDB Atlas Provider as well as the Atlas Administration API (https://www.mongodb.com/docs/atlas/api/atlas-admin-api/) is mainly used to add, edit, or delete administrative objects within Atlas, including projects, users, and database deployments. However, you won't be able to read or write data, including creating Atlas indexes and we have no near term plans to enable this.
Instead, suggest you explore the MongoDB Atlas Data API to read and write data, which we recently GA: https://www.mongodb.com/docs/atlas/api/data-api/
Happy to chat more if this does not meet your need, feel free to email me directly at firstname.lastname@example.org and we can find time to brainstorm live. Thank you.(Edited by admin)
Agreed - our entire infrastructure is built out using Terraform - it's an aberration to have to manually create indexes on collections when we can create search indexes using Terraform.