Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement]: Add automatic flag as part of indexing_policy in azurerm_cosmosdb_sql_container #26856

Closed
1 task done
devtechcloud opened this issue Jul 29, 2024 · 2 comments
Closed
1 task done

Comments

@devtechcloud
Copy link

devtechcloud commented Jul 29, 2024

Is there an existing issue for this?

  • I have searched the existing issues

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 comments along the lines of "+1", "me too" or "any updates", 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 and review the contribution guide to help.

Description

There is currently no Terraform option to set the "automatic" flag to true or flase, as part of an indexing_policy.

When using a Cosmos DB Container within the portal, within the indexing policy an option to set "automatic" as true or false appears, however this is not available via Terraform module azurerm_cosmosdb_sql_container

This is configurable via the API: https://learn.microsoft.com/en-us/rest/api/cosmos-db/collections#indexing-policy

New or Affected Resource(s)/Data Source(s)

azurerm_cosmosdb_sql_container

Potential Terraform Configuration

resource "azurerm_cosmosdb_sql_container" "cosmos_container" {
  name                   = "example"
  resource_group_name    = data.azurerm_cosmosdb_account.cosmos_account.resource_group_name
  account_name           = data.azurerm_cosmosdb_account.cosmos_account.name
  database_name          = azurerm_cosmosdb_sql_database.cosmos_database.name
  partition_key_path     = "/Example"
  partition_key_version  = 1
  analytical_storage_ttl = -1

  indexing_policy {
    indexing_mode = "consistent"
    automatic     = "false"
    included_path {
      path = "/TestId/*"
    }
    excluded_path {
      path = "/*"
    }
  }
}

References

No response

@neil-yechenwei
Copy link
Contributor

Thanks for raising this issue. Unfortunately, automatic is excluded as it is deprecated. See more details from https://stackoverflow.com/a/58721386.

Copy link

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants