Skip to content

Commit

Permalink
added new sharded collection for reminder (#939)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldisaro authored Apr 4, 2024
1 parent 63ecc36 commit ed22f49
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
67 changes: 67 additions & 0 deletions src/domains/messages-common/03_database.tf
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,73 @@ module "mongdb_collection_reminder" {
]
}

module "mongdb_collection_reminder_sharded" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3//cosmosdb_mongodb_collection?ref=v7.69.1"

name = "reminder-sharded"
resource_group_name = azurerm_resource_group.data_rg.name

cosmosdb_mongo_account_name = module.cosmosdb_account_mongodb_reminder.name
cosmosdb_mongo_database_name = azurerm_cosmosdb_mongo_database.db_reminder.name

shard_key = "shard"

indexes = [
{
keys = ["_id"]
unique = true
},
{
keys = ["rptId"]
unique = false
},
{
keys = ["shard"]
unique = false
},
{
keys = ["readFlag"]
unique = false
},
{
keys = ["paidFlag"]
unique = false
},
{
keys = ["content_type"]
unique = false
},
{
keys = ["maxReadMessageSend"]
unique = false
},
{
keys = ["maxPaidMessageSend"]
unique = false
},
{
keys = ["lastDateReminder"]
unique = false
},
{
keys = ["dueDate"]
unique = false
},
{
keys = ["insertionDate"]
unique = false
},
{
keys = ["content_paymentData_noticeNumber", "content_paymentData_payeeFiscalCode"]
unique = false
},
{
keys = ["content_paymentData_dueDate"]
unique = false
},
]
}

#tfsec:ignore:AZU023
resource "azurerm_key_vault_secret" "mongodb_connection_string_reminder" {
name = "${module.cosmosdb_account_mongodb_reminder.name}-connection-string"
Expand Down
1 change: 1 addition & 0 deletions src/domains/messages-common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
| <a name="module_io-backend_notification_v2_api_v1"></a> [io-backend\_notification\_v2\_api\_v1](#module\_io-backend\_notification\_v2\_api\_v1) | git::https://github.com/pagopa/terraform-azurerm-v3//api_management_api | v7.69.1 |
| <a name="module_key_vault"></a> [key\_vault](#module\_key\_vault) | git::https://github.com/pagopa/terraform-azurerm-v3//key_vault | v7.69.1 |
| <a name="module_mongdb_collection_reminder"></a> [mongdb\_collection\_reminder](#module\_mongdb\_collection\_reminder) | git::https://github.com/pagopa/terraform-azurerm-v3//cosmosdb_mongodb_collection | v7.69.1 |
| <a name="module_mongdb_collection_reminder_sharded"></a> [mongdb\_collection\_reminder\_sharded](#module\_mongdb\_collection\_reminder\_sharded) | git::https://github.com/pagopa/terraform-azurerm-v3//cosmosdb_mongodb_collection | v7.69.1 |
| <a name="module_push_notif_beta_storage"></a> [push\_notif\_beta\_storage](#module\_push\_notif\_beta\_storage) | git::https://github.com/pagopa/terraform-azurerm-v3//storage_account | v7.69.1 |
| <a name="module_push_notifications_storage"></a> [push\_notifications\_storage](#module\_push\_notifications\_storage) | git::https://github.com/pagopa/terraform-azurerm-v3//storage_account | v7.69.1 |
| <a name="module_redis_messages"></a> [redis\_messages](#module\_redis\_messages) | github.com/pagopa/terraform-azurerm-v3//redis_cache | v7.63.0 |
Expand Down

0 comments on commit ed22f49

Please sign in to comment.