Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions .changeset/clear-olives-watch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"io-wallet-user-func": patch
---

Removed migrateWalletInstances function
1 change: 0 additions & 1 deletion apps/io-wallet-user-func/local.settings.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
"FrontDoorEndpointName": "FRONT_DOOR_ENDPOINT_NAME",
"APPLICATIONINSIGHTS_CONNECTION_STRING": "APPLICATIONINSIGHTS_CONNECTION_STRING",
"NODE_OPTIONS": "--import @pagopa/azure-tracing",
"PagoPACosmosDbConnectionString": "PAGOPA_COSMOS_DB_CONNECTION_STRING",
"WalletInstanceStorageAccountUrl": "WALLET_INSTANCE_STORAGE_ACCOUNT_URL",
"WalletInstanceStorageAccount__accountName": "WALLET_INSTANCE_STORAGE_ACCOUNT_NAME"
}
Expand Down
23 changes: 1 addition & 22 deletions apps/io-wallet-user-func/src/app/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CdnManagementClient } from "@azure/arm-cdn";
import { CosmosClient } from "@azure/cosmos";
import { app, output } from "@azure/functions";
import { app } from "@azure/functions";
import { DefaultAzureCredential } from "@azure/identity";
import { BlobServiceClient } from "@azure/storage-blob";
import { QueueServiceClient } from "@azure/storage-queue";
Expand All @@ -10,7 +10,6 @@ import { Crypto } from "@peculiar/webcrypto";
import * as E from "fp-ts/Either";
import { identity, pipe } from "fp-ts/function";
import * as t from "io-ts";
import { WalletInstance } from "io-wallet-common/wallet-instance";

import { getCrlFromUrl } from "@/certificates";
import { CosmosDbCertificateRepository } from "@/infra/azure/cosmos/certificate";
Expand All @@ -27,7 +26,6 @@ import { GetCurrentWalletInstanceStatusFunction } from "@/infra/azure/functions/
import { GetNonceFunction } from "@/infra/azure/functions/get-nonce";
import { GetWalletInstanceStatusFunction } from "@/infra/azure/functions/get-wallet-instance-status";
import { HealthFunction } from "@/infra/azure/functions/health";
import { MigrateWalletInstancesFunction } from "@/infra/azure/functions/migrate-wallet-instances";
import { SendEmailOnWalletInstanceCreationFunction } from "@/infra/azure/functions/send-email-on-wallet-instance-creation";
import { SendEmailOnWalletInstanceRevocationFunction } from "@/infra/azure/functions/send-email-on-wallet-instance-revocation";
import { SetWalletInstanceStatusFunction } from "@/infra/azure/functions/set-wallet-instance-status";
Expand Down Expand Up @@ -302,22 +300,3 @@ app.http("generateCertificateChain", {
methods: ["POST"],
route: "certificate-chain",
});

app.cosmosDB("migrateWalletInstances", {
connection: "PagoPACosmosDbConnectionString",
containerName: "wallet-instances",
createLeaseCollectionIfNotExists: false,
databaseName: "db",
handler: MigrateWalletInstancesFunction({
inputDecoder: t.array(WalletInstance),
}),
leaseContainerName: "leases-migration",
maxItemsPerInvocation: 50,
return: output.cosmosDB({
connection: "CosmosDbEndpoint",
containerName: "wallet-instances",
createIfNotExists: false,
databaseName: "db",
}),
startFromBeginning: true,
});

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions infra/resources/_modules/function_apps/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ locals {
"generateEntityConfiguration",
"sendEmailOnWalletInstanceCreation",
"sendEmailOnWalletInstanceRevocation",
"migrateWalletInstances"
]

function_app_user = {
Expand Down Expand Up @@ -131,8 +130,6 @@ locals {
PidIssuerApiClientPrivateKey = "@Microsoft.KeyVault(VaultName=${var.key_vault_wallet_name};SecretName=PidIssuerApiClientPrivateKeyPre)"
GoogleAppCredentialsEncoded = "@Microsoft.KeyVault(VaultName=${var.key_vault_wallet_name};SecretName=GoogleAppCredentialsEncoded)"
AllowedDeveloperUsers = "@Microsoft.KeyVault(VaultName=${var.key_vault_wallet_name};SecretName=AllowedDeveloperUsers)"
StorageConnectionString = var.is_psn ? null : "@Microsoft.KeyVault(VaultName=${var.key_vault_wallet_name};SecretName=StorageUatConnectionString)"
CosmosAccountConnectionString = "@Microsoft.KeyVault(VaultName=${var.key_vault_wallet_name};SecretName=CosmosAccountConnectionString)"
}
)
}
Expand Down
2 changes: 0 additions & 2 deletions infra/resources/_modules/storage_accounts/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ output "wallet" {
id = azurerm_storage_account.common.id
name = azurerm_storage_account.common.name
resource_group_name = azurerm_storage_account.common.resource_group_name
connection_string_secret_name = try(azurerm_key_vault_secret.st_connection_string[0].name, null)
}
}

Expand All @@ -24,6 +23,5 @@ output "wallet_uat" {
id = azurerm_storage_account.common_uat.id
name = azurerm_storage_account.common_uat.name
resource_group_name = azurerm_storage_account.common_uat.resource_group_name
connection_string_secret_name = try(azurerm_key_vault_secret.st_uat_connection_string[0].name, null)
}
}
17 changes: 0 additions & 17 deletions infra/resources/_modules/storage_accounts/secrets.tf

This file was deleted.

4 changes: 0 additions & 4 deletions infra/resources/prod/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,6 @@ locals {
name = "AllowedDeveloperUsers"
key_vault_secret_name = "AllowedDeveloperUsers"
},
{
name = "StorageConnectionString"
key_vault_secret_name = module.storage_accounts.wallet.connection_string_secret_name
},
{
name = "AuthProfileApiKey"
key_vault_secret_name = "AuthProfileApiKey"
Expand Down
8 changes: 0 additions & 8 deletions infra/resources/psn/prod/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,6 @@ locals {
{
name = "MailupSecret"
key_vault_secret_name = "MailupSecret"
},
{
name = "CosmosAccountConnectionString"
key_vault_secret_name = "CosmosAccountConnectionString"
},
{
name = "PagoPACosmosDbConnectionString"
key_vault_secret_name = "PagoPACosmosDbConnectionString"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion infra/resources/psn/prod/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ module "cosmos" {
throughput = {
wallet_instances = 12000
nonces = 4000
whitelisted_fiscal_codes = 4000
whitelisted_fiscal_codes = 8000
certificates = 10000
uat = {
wallet_instances = 4000
Expand Down
3 changes: 0 additions & 3 deletions scripts/whitelist-fiscal-code-script/.env.example

This file was deleted.

92 changes: 0 additions & 92 deletions scripts/whitelist-fiscal-code-script/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions scripts/whitelist-fiscal-code-script/eslint.config.mjs

This file was deleted.

This file was deleted.

28 changes: 0 additions & 28 deletions scripts/whitelist-fiscal-code-script/package.json

This file was deleted.

This file was deleted.

29 changes: 0 additions & 29 deletions scripts/whitelist-fiscal-code-script/src/config.ts

This file was deleted.

Loading
Loading