Azure CosmosDB (DocumentDB) Cassandra Table

This page shows how to write Terraform and Azure Resource Manager for CosmosDB (DocumentDB) Cassandra Table and write them securely.

azurerm_cosmosdb_cassandra_table (Terraform)

The Cassandra Table in CosmosDB (DocumentDB) can be configured in Terraform with the resource name azurerm_cosmosdb_cassandra_table. The following sections describe 1 example of how to use the resource and its parameters.

Example Usage from GitHub

cosmosdb_cassandra_table_test.tf#L131
resource "azurerm_cosmosdb_cassandra_table" "serverless" {
  name                  = "testtable"
  cassandra_keyspace_id = azurerm_cosmosdb_cassandra_keyspace.serverless.id

  schema {
    column {

Review your Terraform file for Azure best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Manages a Cassandra Table within a Cosmos DB Cassandra Keyspace.

Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces/tables (Azure Resource Manager)

The databaseAccounts/cassandraKeyspaces/tables in Microsoft.DocumentDB can be configured in Azure Resource Manager with the resource name Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces/tables. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

Parameters

  • apiVersion required - string
  • location optional - string

    The location of the resource group to which the resource belongs.

  • name required - string

    Cosmos DB table name.

  • properties required
      • options optional
          • autoscaleSettings optional
              • maxThroughput optional - integer

                Represents maximum throughput, the resource can scale up to.

          • throughput optional - integer

            Request Units per second. For example, "throughput": 10000.

      • resource required
          • analyticalStorageTtl optional - integer

            Analytical TTL.

          • defaultTtl optional - integer

            Time to live of the Cosmos DB Cassandra table

          • id required - string

            Name of the Cosmos DB Cassandra table

          • schema optional
              • clusterKeys optional array
                  • name optional - string

                    Name of the Cosmos DB Cassandra table cluster key

                  • orderBy optional - string

                    Order of the Cosmos DB Cassandra table cluster key, only support "Asc" and "Desc"

              • columns optional array
                  • name optional - string

                    Name of the Cosmos DB Cassandra table column

                  • type optional - string

                    Type of the Cosmos DB Cassandra table column

              • partitionKeys optional array
                  • name optional - string

                    Name of the Cosmos DB Cassandra table partition key

  • tags optional - string

    Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".

  • type required - string

Frequently asked questions

What is Azure CosmosDB (DocumentDB) Cassandra Table?

Azure CosmosDB (DocumentDB) Cassandra Table is a resource for CosmosDB (DocumentDB) of Microsoft Azure. Settings can be wrote in Terraform.

Where can I find the example code for the Azure CosmosDB (DocumentDB) Cassandra Table?

For Terraform, the gilyas/infracost source code example is useful. See the Terraform Example section for further details.