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.52k stars 4.6k forks source link

azurerm_cosmosdb_account EnableNoSQLVectorSearch feature not available - requesting for it to be added #27343

Open pumacln opened 1 week ago

pumacln commented 1 week ago

Community Note

Terraform version 1.9.5 AzureRM Provider Version 4.0.1

Affected Resource(s)/Data Source(s)

azurerm_cosmosdb_account

Terraform Configuration Files

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key: https://keybase.io/hashicorp

resource "azurerm_cosmosdb_account" "example" {
  name                = "example"
  location            = "Central US"
  resource_group_name = var.app_resource_group.name # this value comes from the rg resource
  offer_type          = "Standard"
  kind                = "GlobalDocumentDB"

  automatic_failover_enabled = false

  public_network_access_enabled = true

  is_virtual_network_filter_enabled = true

  virtual_network_rule {
    id = azurerm_subnet.example1.id
  }

  virtual_network_rule {
    id = azurerm_subnet.example2.id
  }

  capabilities {
    name = "EnableServerless"
  }

  consistency_policy {
    consistency_level       = "Session"
    max_interval_in_seconds = 5
    max_staleness_prefix    = 100
  }

  geo_location {
    location          = "centralus"
    failover_priority = 0
  }

}

Description / Feedback

Cosmos DB Account is created

Currently the possible values for the "capabilities" argument is limited to: "A capabilities block Configures the capabilities to be enabled for this Cosmos DB account:

[name](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/cosmosdb_account#name) - (Required) The capability to enable - Possible values are AllowSelfServeUpgradeToMongo36, DisableRateLimitingResponses, EnableAggregationPipeline, EnableCassandra, EnableGremlin, EnableMongo, EnableMongo16MBDocumentSupport, EnableMongoRetryableWrites, EnableMongoRoleBasedAccessControl, EnablePartialUniqueIndex, EnableServerless, EnableTable, EnableTtlOnCustomPath, EnableUniqueCompoundNestedDocs, MongoDBv3.4 and mongoEnableDocLevelTTL."

The resource includes 3 Features that are managed by Azure as a value of "capabilities" like the ones above, yet cannot be implemented via Terraform yet and if any of this features is enabled via the Azure portal, the Terraform resource asks to be replaced when running an execution plan.

Example Error: Error: expected capabilities.0.name to be one of ["EnableAggregationPipeline" "EnableCassandra" "EnableGremlin" "EnableTable" "EnableServerless" "EnableMongo" "EnableMongo16MBDocumentSupport" "MongoDBv3.4" "mongoEnableDocLevelTTL" "DisableRateLimitingResponses" "AllowSelfServeUpgradeToMongo36" "EnableMongoRetryableWrites" "EnableMongoRoleBasedAccessControl" "EnableUniqueCompoundNestedDocs" "EnableTtlOnCustomPath" "EnablePartialUniqueIndex"], got EnableNoSQLVectorSearch

References

sinbai commented 6 days ago

Hi @pumacln thanks for opening this issue. PR has been submitted to support new capability EnableNoSQLVectorSearch for azurerm_cosmosdb_account. Could you please track it for more updates?

pumacln commented 5 days ago

Hi Elena,

Keeping a close eye on this for it to get approved and test the changes, this will allow me to implement consistent automation across multiple environments.

Thanks.

From: Elena Xin @.> Sent: Wednesday, September 11, 2024 5:05 AM To: hashicorp/terraform-provider-azurerm @.> Cc: Paul Madueno @.>; Mention @.> Subject: Re: [hashicorp/terraform-provider-azurerm] azurerm_cosmosdb_account EnableNoSQLVectorSearch feature not available - requesting for it to be added (Issue #27343)

EXTERNAL SENDER - This email was sent from outside the TeamDynamix organization. Take caution when replying, forwarding, opening attachments, or taking other actions based on the content of this email. If you believe there has been an attempt to impersonate a member of TeamDynamix, please report this email by selecting the Phish Alert button on the top right of your Outlook Home menu immediately and we can start investigating.

Hi @pumaclnhttps://github.com/pumacln thanks for opening this issue. PR https://github.com/hashicorp/terraform-provider-azurerm/pull/27357 has been submitted to support new capability EnableNoSQLVectorSearch for azurerm_cosmosdb_account . Could you please track it for more updates?

- Reply to this email directly, view it on GitHubhttps://github.com/hashicorp/terraform-provider-azurerm/issues/27343#issuecomment-2343070141, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BIFHLGJ3OD5HBOBKYUO6ZKLZWABUNAVCNFSM6AAAAABN7ICNDGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBTGA3TAMJUGE. You are receiving this because you were mentioned.Message ID: @.**@.>>