It is not currently possible to create / update indexes, stored procedures, udfs in Cosmos Db (SQL API) using Terraform. ARM templates and Azure Ressource Provider support it so according to Azure Cosmos Team, there is nothing preventing Terraform to support it. Is it on the roadmap ?
New resources:
Affected ressources :
This functionality is available in the _2019-12-12_ API version for Cosmos, link.
Our project is currently using terraform to provision cosmos db. This would be very useful
Index policy for CosmosDB SQL Container is what we're currently looking for.
Something similar to the Gremlin Graph index policy would be really nice.
+1 on this, particularly support for azurerm_cosmosdb_sql_storedprocedure
Until this issue is resolved, you can use this workaround using Azure CLI https://github.com/syedhassaanahmed/tf-cosmosdb-sp
closed by #6189
This has been released in version 2.30.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:
provider "azurerm" {
version = "~> 2.30.0"
}
# ... other configuration ...
I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!
Most helpful comment
Index policy for CosmosDB SQL Container is what we're currently looking for.
Something similar to the Gremlin Graph index policy would be really nice.