hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.5k stars 4.59k forks source link

Materialized view for azurerm_cosmosdb_account #24882

Open igor-shatrov opened 6 months ago

igor-shatrov commented 6 months ago

Is there an existing issue for this?

Community Note

Description

Hello

Please add to azurerm provider posibility to add Materialized Views for Cassandra API and Materialized Views Builder to azurerm_cosmosdb_account.

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

azurerm_cosmosdb_account

Potential Terraform Configuration

resource "azurerm_cosmosdb_account" "coscas" {
  name                            = "name"
  resource_group_name             = azurerm_resource_group.rg.name
  location                        = azurerm_resource_group.rg.location
  offer_type                      = var.cosmosdb_offer_type
  public_network_access_enabled   = var.public_network_access_enabled
  enable_free_tier                = true

  capabilities {
    name = "EnableCassandra"
  }

  capabilities { 
    name = "CassandraEnableMaterializedViews" 
  }

  consistency_policy {
    consistency_level = "Strong"
  }

  geo_location {
    location          = azurerm_resource_group.rg.location
    failover_priority = 0
  }
}

References

https://learn.microsoft.com/en-us/azure/cosmos-db/cassandra/materialized-views?tabs=azure-portal

AErmie commented 3 months ago

@igor-shatrov, this is similar to the following issue: https://github.com/hashicorp/terraform-provider-azurerm/issues/22185

In that referenced issue, I shared some example code using the azapi_update_resource resource to toggle features (until the Provider supports it natively).