Terraform-provider-azurerm: Support for Cosmos Db stored procedures, indexes and udfs.

Created on 4 Mar 2020  ·  7Comments  ·  Source: terraform-providers/terraform-provider-azurerm

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

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 or Affected Resource(s)

New resources:

  • azurerm_cosmosdb_sql_storedprocedure
  • azurerm_cosmosdb_sql_index
  • azurerm_cosmosdb_sql_udf
  • azurerm_cosmosdb_sql_trigger

Affected ressources :

  • azurerm_cosmosdb_sql_database
  • azurerm_cosmosdb_sql_container

References

https://github.com/MicrosoftDocs/azure-docs/issues/49349

enhancement new-resource serviccosmosdb

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.

All 7 comments

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!

Was this page helpful?
0 / 5 - 0 ratings