Azure CosmosDB (DocumentDB) Cassandra Datacenter

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

azurerm_cosmosdb_cassandra_datacenter (Terraform)

The Cassandra Datacenter in CosmosDB (DocumentDB) can be configured in Terraform with the resource name azurerm_cosmosdb_cassandra_datacenter. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

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

The following arguments are supported:

  • name - (Required) The name which should be used for this Cassandra Datacenter. Changing this forces a new Cassandra Datacenter to be created.

  • location - (Required) The Azure Region where the Cassandra Datacenter should exist. Changing this forces a new Cassandra Datacenter to be created.

  • cassandra_cluster_id - (Required) The ID of the Cassandra Cluster. Changing this forces a new Cassandra Datacenter to be created.

  • delegated_management_subnet_id - (Required) The ID of the delegated management subnet for this Cassandra Datacenter. Changing this forces a new Cassandra Datacenter to be created.

  • node_count - (Required) The number of nodes the Cassandra Datacenter should have. The number should be equal or greater than 3. Defaults to 3.


  • sku_name - (Optional) Determines the selected sku. Defaults to Standard_DS14_v2.

  • disk_count - (Optional) Determines the number of p30 disks that are attached to each node. Defaults to 4.

  • availability_zones_enabled - (Optional) Determines whether availability zones are enabled. Defaults to true.

In addition to the Arguments listed above - the following Attributes are exported:

  • id - The ID of the Cassandra Datacenter.

Explanation in Terraform Registry

Manages a Cassandra Datacenter.

Microsoft.DocumentDB/cassandraClusters/dataCenters (Azure Resource Manager)

The cassandraClusters/dataCenters in Microsoft.DocumentDB can be configured in Azure Resource Manager with the resource name Microsoft.DocumentDB/cassandraClusters/dataCenters. 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
  • name required - string

    Data center name in a managed Cassandra cluster.

  • properties required
      • availabilityZone optional - boolean

        If the azure data center has Availability Zone support, apply it to the Virtual Machine ScaleSet that host the cassandra data center virtual machines.

      • backupStorageCustomerKeyUri optional - string

        Indicates the Key Uri of the customer key to use for encryption of the backup storage account.

      • base64EncodedCassandraYamlFragment optional - string

        A fragment of a cassandra.yaml configuration file to be included in the cassandra.yaml for all nodes in this data center. The fragment should be Base64 encoded, and only a subset of keys are allowed.

      • dataCenterLocation optional - string

        The region this data center should be created in.

      • delegatedSubnetId optional - string

        Resource id of a subnet the nodes in this data center should have their network interfaces connected to. The subnet must be in the same region specified in 'dataCenterLocation' and must be able to route to the subnet specified in the cluster's 'delegatedManagementSubnetId' property. This resource id will be of the form '/subscriptions/<subscription id>/resourceGroups/<resource group>/providers/Microsoft.Network/virtualNetworks/<virtual network>/subnets/<subnet>'.

      • diskCapacity optional - integer

        Number of disk used for data centers. Default value is 4.

      • diskSku optional - string

        Disk SKU used for data centers. Default value is P30.

      • managedDiskCustomerKeyUri optional - string

        Key uri to use for encryption of managed disks. Ensure the system assigned identity of the cluster has been assigned appropriate permissions(key get/wrap/unwrap permissions) on the key.

      • nodeCount optional - integer

        The number of nodes the data center should have. This is the desired number. After it is set, it may take some time for the data center to be scaled to match. To monitor the number of nodes and their status, use the fetchNodeStatus method on the cluster.

      • provisioningState optional - string
      • sku optional - string

        Virtual Machine SKU used for data centers. Default value is Standard_DS14_v2

  • type required - string

Frequently asked questions

What is Azure CosmosDB (DocumentDB) Cassandra Datacenter?

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