Open brahmiam opened 1 year ago
@brahmiam I believe this has been added by now. The following works for me:
resource "azurerm_cosmosdb_mongo_role_definition" "app" {
cosmos_mongo_database_id = "..."
role_name = "my-custom-role"
privilege {
actions = ["find", "insert", "remove", "update"]
resource = {
db_name = "..."
collection_name = "..."
}
}
}
resource "azurerm_cosmosdb_mongo_user_definition" "app" {
depends_on = [azurerm_cosmosdb_mongo_role_definition.app]
cosmos_mongo_database_id = "..."
username = "..."
password = "..."
inherited_role_names = ["my-custom-role"]
}
Is there an existing issue for this?
Community Note
Description
In the same manner as azurerm_cosmosdb_sql_role_definition for sql provisionned account, it would be great to do the same for mongo-provisionned accounts.
New or Affected Resource(s)/Data Source(s)
azurerm_cosmosdb_account
Potential Terraform Configuration
References
No response