Skip to content

intel/terraform-intel-azure-cassandra

Intel Logo

Intel® Optimized Cloud Modules for Terraform

© Copyright 2024, Intel Corporation

Azure Managed Instance for Apache Cassandra

Please see "Considerations" section below for important information

Performance Data

This module was intended to be ran with an Intel Sentinel Policy as Code module that can be found here: https://registry.terraform.io/policies/intel/intel-azure/latest

Azure Managed Instance Apache Cassandra SKU For Azure Managed Instance Data Center Supported Intel SKU are: Standard_D16s_v4, Standard_D32s_v4, Standard_D8s_v4, Standard_DS12_v2, Standard_DS14_v2, Standard_E8s_v4, Standard_E16s_v4, Standard_E20s_V4, Standard_E32s_v4

Dsv4-series sizes run on the 3rd Generation Intel® Xeon® Platinum 8370C (Ice Lake) or the Intel® Xeon® Platinum 8272CL (Cascade Lake). The Dv4-series sizes offer a combination of vCPU, memory and remote storage options for most production workloads. Dsv4-series VMs feature Intel® Hyper-Threading Technology. Remote Data disk storage is billed separately from virtual machines.

DSv2-series sizes run on the 3rd Generation Intel® Xeon® Platinum 8370C (Ice Lake), Intel® Xeon® Platinum 8272CL (Cascade Lake), Intel® Xeon® 8171M 2.1GHz (Skylake) or the the Intel® Xeon® E5-2673 v4 2.3 GHz (Broadwell), or the Intel® Xeon® E5-2673 v3 2.4 GHz (Haswell) processors with Intel Turbo Boost Technology 2.0 and use premium storage.

Esv4-series sizes run on the 3rd Generation Intel® Xeon® Platinum 8370C (Ice Lake) or the Intel® Xeon® Platinum 8272CL (Cascade Lake). The Esv4-series instances are ideal for memory-intensive enterprise applications. Evs4-series VMs feature Intel® Hyper-Threading Technology. Remote Data disk storage is billed separately from virtual machines.

NOTE: Please be aware as of May 2023, there is a known discrepency between what is listed as supported SKU's in the Azure Managed Instance Apache Cassandra pricing documenation and what is actually supported in teh portal/cli: Azure Managed Instance Apache Cassandra price documentation indicates support for Ev5, Dv5 and Lv3 SKUs but on the Azure portal itself only Ev4, Dv4 and Dv3 are supported- this is also true for CLI. Thus, we have given approcximate gen-on-on improvements for benchmarks of similar database workloads below such as for MySQL and PostgreSQL on D-v4 and E-v4 series of Azure instances when compared to older generation D-v3 and E-v3 Azure instances.

Cassandra

Cassandra

Cassandra

Usage

Example of main.tf (located in the examples sub-folder)

## This module deploys a Azure Managed Instance Cassandra datacter cluster in a user provided resource group, an existing vNET and an Subnet
#this is exampel for existing azure resource group and vnet
module "azure-acc-datacenter" {
  source                = "intel/azure-cassandra/intel"
  acc_pswd              = var.acc_pswd
  resource_group_name   = "DS-MANAGED-CASS"
  acc_virtualnetwork    = "dscassandra_vnet"
  acc_virtualsubnet     = "dscassandra_sub1"

    tags = {
    Owner    = "user@company.com"
    Duration = "24"
  }
}

* **Prerequisites:**

  1. Have an existing Azure Resource Group in the region you want to deploy the Azure Cassandra Datacenter 

Run Terraform

terraform init  
terraform plan
terraform apply

Note that this example may create resources. Run terraform destroy when you don't need these resources anymore.

Considerations

THREE IMPORTANT CONSIDERATIONS

  1. When using a Service Principal, it will require Application.Read.All or Directory.Read.All Azure AD API permissions see provider docs here
  2. Make sure the Azure Cosmos DB Azure AD application has not already been assigned the Network Contributor role to the vnet as this will assign it
  3. It takes 15-30 minutes for the Cassandra Cluster to be created and ready for use

More information regarding deploying Azure Managed Instance Apache Cassandra can be found here: Azure Apache Cassandra Datacenter

Requirements

Name Version
terraform >=1.3.0
azurerm ~>3.52.0

Providers

Name Version
azurerm ~>3.52.0

Modules

No modules.

Resources

Name Type
azurerm_cosmosdb_cassandra_datacenter resource

Inputs

Name Description Type Default Required
acc_sku ACC Datacenter SKU, see comments above for guidance. string "Standard_E8s_v4" no
resource_group_name Existing Resource Group where Apache Cassandra Datacneter reosurce will be created. string n/a yes
acc_virtualnetwork Virtual Network Name. It should already exist. string n/a yes
acc_virtualsubnet Name of the subnet in your virtual network for your Cassandra Managed Instance. It should already exist. string n/a yes
acc_pswd "Password for the master database user. string n/a yes

Outputs

Name Description
acc_rg_name ACC RG Name
acc_rg_location ACC RG Location
acc_vnet_name ACC vNET Name
acc_subnet_name ACC Subnet Name
acc_datacenter_sku ACC Datacenter SKU
acc_cluster_id ACC Cluster ID