Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -77,47 +77,20 @@ locals {
project_id_guid = "${substr(azapi_resource.ai_foundry_project.output.properties.internalId, 0, 8)}-${substr(azapi_resource.ai_foundry_project.output.properties.internalId, 8, 4)}-${substr(azapi_resource.ai_foundry_project.output.properties.internalId, 12, 4)}-${substr(azapi_resource.ai_foundry_project.output.properties.internalId, 16, 4)}-${substr(azapi_resource.ai_foundry_project.output.properties.internalId, 20, 12)}"
}

resource "azurerm_cosmosdb_sql_role_assignment" "cosmosdb_db_sql_role_aifp_user_thread_message_store" {
resource "azurerm_cosmosdb_sql_role_assignment" "cosmosdb_db_sql_role" {
count = var.agent_capability_host_connections != null ? 1 : 0

depends_on = [
azapi_resource.ai_foundry_project_capability_host
]
name = uuidv5("dns", "${azapi_resource.ai_foundry_project.name}${azapi_resource.ai_foundry_project.output.identity.principalId}userthreadmessage_dbsqlrole")
name = uuidv5("dns", "${azapi_resource.ai_foundry_project.name}${azapi_resource.ai_foundry_project.output.identity.principalId}enterprise_memory_data_contributor")
resource_group_name = var.agent_capability_host_connections.cosmos_db.resource_group_name
account_name = var.agent_capability_host_connections.cosmos_db.name
scope = "${var.agent_capability_host_connections.cosmos_db.resource_id}/dbs/enterprise_memory/colls/${local.project_id_guid}-thread-message-store"
scope = "${var.agent_capability_host_connections.cosmos_db.resource_id}/dbs/enterprise_memory"
role_definition_id = "${var.agent_capability_host_connections.cosmos_db.resource_id}/sqlRoleDefinitions/00000000-0000-0000-0000-000000000002"
principal_id = azapi_resource.ai_foundry_project.output.identity.principalId
}
Comment on lines +80 to 92
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The module's README.md documentation still references the three removed Cosmos DB role assignment resources. The documentation should be regenerated to reflect the updated resource structure where cosmosdb_db_sql_role_aifp_user_thread_message_store, cosmosdb_db_sql_role_aifp_system_thread_name, and cosmosdb_db_sql_role_aifp_entity_store_name are replaced with the single cosmosdb_db_sql_role resource.

This appears to be auto-generated documentation (marked with <!-- BEGIN_TF_DOCS --> and <!-- END_TF_DOCS -->), so it likely needs to be regenerated using a documentation generation tool like terraform-docs.

Copilot uses AI. Check for mistakes.

resource "azurerm_cosmosdb_sql_role_assignment" "cosmosdb_db_sql_role_aifp_system_thread_name" {
count = var.agent_capability_host_connections != null ? 1 : 0

depends_on = [
azurerm_cosmosdb_sql_role_assignment.cosmosdb_db_sql_role_aifp_user_thread_message_store
]
name = uuidv5("dns", "${azapi_resource.ai_foundry_project.name}${azapi_resource.ai_foundry_project.output.identity.principalId}systemthread_dbsqlrole")
resource_group_name = var.agent_capability_host_connections.cosmos_db.resource_group_name
account_name = var.agent_capability_host_connections.cosmos_db.name
scope = "${var.agent_capability_host_connections.cosmos_db.resource_id}/dbs/enterprise_memory/colls/${local.project_id_guid}-system-thread-message-store"
role_definition_id = "${var.agent_capability_host_connections.cosmos_db.resource_id}/sqlRoleDefinitions/00000000-0000-0000-0000-000000000002"
principal_id = azapi_resource.ai_foundry_project.output.identity.principalId
}

resource "azurerm_cosmosdb_sql_role_assignment" "cosmosdb_db_sql_role_aifp_entity_store_name" {
count = var.agent_capability_host_connections != null ? 1 : 0

depends_on = [
azurerm_cosmosdb_sql_role_assignment.cosmosdb_db_sql_role_aifp_system_thread_name
]
name = uuidv5("dns", "${azapi_resource.ai_foundry_project.name}${azapi_resource.ai_foundry_project.output.identity.principalId}entitystore_dbsqlrole")
resource_group_name = var.agent_capability_host_connections.cosmos_db.resource_group_name
account_name = var.agent_capability_host_connections.cosmos_db.name
scope = "${var.agent_capability_host_connections.cosmos_db.resource_id}/dbs/enterprise_memory/colls/${local.project_id_guid}-agent-entity-store"
role_definition_id = "${var.agent_capability_host_connections.cosmos_db.resource_id}/sqlRoleDefinitions/00000000-0000-0000-0000-000000000002"
principal_id = azapi_resource.ai_foundry_project.output.identity.principalId
}

## Create the necessary data plane role assignments to the Azure Storage Account containers created by the AI Foundry Project
##
Expand Down
Loading