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

Support for toggling features of an Azure Cosmos DB account #22185

Open
1 task done
andrewmetcalfbede opened this issue Jun 15, 2023 · 4 comments
Open
1 task done

Support for toggling features of an Azure Cosmos DB account #22185

andrewmetcalfbede opened this issue Jun 15, 2023 · 4 comments

Comments

@andrewmetcalfbede
Copy link

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 "+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

Currently there doesn't appear to be a way to toggle anything under the Features tab of an Azure Cosmos DB account using Terraform.

Burst capacity in particular is what we'd like to be able to switch on

image

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

azurerm_cosmosdb_account

Potential Terraform Configuration

No response

References

No response

@michelefa1988

This comment was marked as off-topic.

@enterthematric

This comment was marked as off-topic.

@aomegax

This comment was marked as off-topic.

@AErmie
Copy link

AErmie commented May 28, 2024

An alternative work-around, until these features are supported in the Terraform provider, is to use the AzAPI provider.

If you've already deployed your CosmosDB account using Terraform, you will have to use the azapi_update_resource resource. Here's an example:

resource "azapi_update_resource" "cosmosdb_preview_features" {
  depends_on = [ 
    azurerm_cosmosdb_account.cosmosdb_account 
  ]

  type        = "Microsoft.DocumentDB/databaseAccounts@2024-02-15-preview"
  resource_id = azurerm_cosmosdb_account.cosmosdb_account.id
  
  body = jsonencode({
    properties = {
      enablePerRegionPerPartitionAutoscale = true
      enablePriorityBasedExecution = false
      enableBurstCapacity = false      
      enablePartitionMerge = false
      enableMaterializedViews = false
      diagnosticLogSettings = {
        enableFullTextQuery = "None"
      }
    }
  })
}

Note: The only properties I haven't been able to find (looking at an existing resource's template in the portal), is:

  • Vector Search for NoSQL API
  • Server Side Retry for Cassandra API

NoSQL API Example Features Properties

  body = jsonencode({
    properties = {
      enablePerRegionPerPartitionAutoscale = true
      enablePriorityBasedExecution = false
      enableBurstCapacity = false      
      enablePartitionMerge = false
      enableMaterializedViews = false
      diagnosticLogSettings = {
        enableFullTextQuery = "None"
      }
    }
  })

Cassandra API Example Features Properties

  body = jsonencode({
    properties = {
      enablePerRegionPerPartitionAutoscale = true
      enableBurstCapacity = false      
      enableMaterializedViews = false
      diagnosticLogSettings = {
        enableFullTextQuery = "None"
      }
    }
  })

Gremlin API Example Features Properties

  body = jsonencode({
    properties = {
      enablePerRegionPerPartitionAutoscale = true
      enableBurstCapacity = false      
      diagnosticLogSettings = {
        enableFullTextQuery = "None"
      }
    }
  })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants