Skip to content

Commit 239a3b2

Browse files
authored
chore: deleted whitelist-fiscal-code-script and removed migrateWalletInstances
Refs: #686
1 parent b2d0136 commit 239a3b2

File tree

24 files changed

+7
-4067
lines changed

24 files changed

+7
-4067
lines changed

.changeset/clear-olives-watch.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"io-wallet-user-func": patch
3+
---
4+
5+
Removed migrateWalletInstances function

apps/io-wallet-user-func/local.settings.json.example

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
"FrontDoorEndpointName": "FRONT_DOOR_ENDPOINT_NAME",
5858
"APPLICATIONINSIGHTS_CONNECTION_STRING": "APPLICATIONINSIGHTS_CONNECTION_STRING",
5959
"NODE_OPTIONS": "--import @pagopa/azure-tracing",
60-
"PagoPACosmosDbConnectionString": "PAGOPA_COSMOS_DB_CONNECTION_STRING",
6160
"WalletInstanceStorageAccountUrl": "WALLET_INSTANCE_STORAGE_ACCOUNT_URL",
6261
"WalletInstanceStorageAccount__accountName": "WALLET_INSTANCE_STORAGE_ACCOUNT_NAME"
6362
}

apps/io-wallet-user-func/src/app/main.ts

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { CdnManagementClient } from "@azure/arm-cdn";
22
import { CosmosClient } from "@azure/cosmos";
3-
import { app, output } from "@azure/functions";
3+
import { app } from "@azure/functions";
44
import { DefaultAzureCredential } from "@azure/identity";
55
import { BlobServiceClient } from "@azure/storage-blob";
66
import { QueueServiceClient } from "@azure/storage-queue";
@@ -10,7 +10,6 @@ import { Crypto } from "@peculiar/webcrypto";
1010
import * as E from "fp-ts/Either";
1111
import { identity, pipe } from "fp-ts/function";
1212
import * as t from "io-ts";
13-
import { WalletInstance } from "io-wallet-common/wallet-instance";
1413

1514
import { getCrlFromUrl } from "@/certificates";
1615
import { CosmosDbCertificateRepository } from "@/infra/azure/cosmos/certificate";
@@ -27,7 +26,6 @@ import { GetCurrentWalletInstanceStatusFunction } from "@/infra/azure/functions/
2726
import { GetNonceFunction } from "@/infra/azure/functions/get-nonce";
2827
import { GetWalletInstanceStatusFunction } from "@/infra/azure/functions/get-wallet-instance-status";
2928
import { HealthFunction } from "@/infra/azure/functions/health";
30-
import { MigrateWalletInstancesFunction } from "@/infra/azure/functions/migrate-wallet-instances";
3129
import { SendEmailOnWalletInstanceCreationFunction } from "@/infra/azure/functions/send-email-on-wallet-instance-creation";
3230
import { SendEmailOnWalletInstanceRevocationFunction } from "@/infra/azure/functions/send-email-on-wallet-instance-revocation";
3331
import { SetWalletInstanceStatusFunction } from "@/infra/azure/functions/set-wallet-instance-status";
@@ -302,22 +300,3 @@ app.http("generateCertificateChain", {
302300
methods: ["POST"],
303301
route: "certificate-chain",
304302
});
305-
306-
app.cosmosDB("migrateWalletInstances", {
307-
connection: "PagoPACosmosDbConnectionString",
308-
containerName: "wallet-instances",
309-
createLeaseCollectionIfNotExists: false,
310-
databaseName: "db",
311-
handler: MigrateWalletInstancesFunction({
312-
inputDecoder: t.array(WalletInstance),
313-
}),
314-
leaseContainerName: "leases-migration",
315-
maxItemsPerInvocation: 50,
316-
return: output.cosmosDB({
317-
connection: "CosmosDbEndpoint",
318-
containerName: "wallet-instances",
319-
createIfNotExists: false,
320-
databaseName: "db",
321-
}),
322-
startFromBeginning: true,
323-
});

apps/io-wallet-user-func/src/infra/azure/functions/migrate-wallet-instances.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

apps/io-wallet-user-func/src/infra/handlers/migrate-wallet-instances.ts

Lines changed: 0 additions & 22 deletions
This file was deleted.

infra/resources/_modules/function_apps/locals.tf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ locals {
7979
"generateEntityConfiguration",
8080
"sendEmailOnWalletInstanceCreation",
8181
"sendEmailOnWalletInstanceRevocation",
82-
"migrateWalletInstances"
8382
]
8483

8584
function_app_user = {
@@ -131,8 +130,6 @@ locals {
131130
PidIssuerApiClientPrivateKey = "@Microsoft.KeyVault(VaultName=${var.key_vault_wallet_name};SecretName=PidIssuerApiClientPrivateKeyPre)"
132131
GoogleAppCredentialsEncoded = "@Microsoft.KeyVault(VaultName=${var.key_vault_wallet_name};SecretName=GoogleAppCredentialsEncoded)"
133132
AllowedDeveloperUsers = "@Microsoft.KeyVault(VaultName=${var.key_vault_wallet_name};SecretName=AllowedDeveloperUsers)"
134-
StorageConnectionString = var.is_psn ? null : "@Microsoft.KeyVault(VaultName=${var.key_vault_wallet_name};SecretName=StorageUatConnectionString)"
135-
CosmosAccountConnectionString = "@Microsoft.KeyVault(VaultName=${var.key_vault_wallet_name};SecretName=CosmosAccountConnectionString)"
136133
}
137134
)
138135
}

infra/resources/_modules/storage_accounts/outputs.tf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ output "wallet" {
1515
id = azurerm_storage_account.common.id
1616
name = azurerm_storage_account.common.name
1717
resource_group_name = azurerm_storage_account.common.resource_group_name
18-
connection_string_secret_name = try(azurerm_key_vault_secret.st_connection_string[0].name, null)
1918
}
2019
}
2120

@@ -24,6 +23,5 @@ output "wallet_uat" {
2423
id = azurerm_storage_account.common_uat.id
2524
name = azurerm_storage_account.common_uat.name
2625
resource_group_name = azurerm_storage_account.common_uat.resource_group_name
27-
connection_string_secret_name = try(azurerm_key_vault_secret.st_uat_connection_string[0].name, null)
2826
}
2927
}

infra/resources/_modules/storage_accounts/secrets.tf

Lines changed: 0 additions & 17 deletions
This file was deleted.

infra/resources/prod/locals.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,6 @@ locals {
7373
name = "AllowedDeveloperUsers"
7474
key_vault_secret_name = "AllowedDeveloperUsers"
7575
},
76-
{
77-
name = "StorageConnectionString"
78-
key_vault_secret_name = module.storage_accounts.wallet.connection_string_secret_name
79-
},
8076
{
8177
name = "AuthProfileApiKey"
8278
key_vault_secret_name = "AuthProfileApiKey"

infra/resources/psn/prod/locals.tf

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,6 @@ locals {
5252
{
5353
name = "MailupSecret"
5454
key_vault_secret_name = "MailupSecret"
55-
},
56-
{
57-
name = "CosmosAccountConnectionString"
58-
key_vault_secret_name = "CosmosAccountConnectionString"
59-
},
60-
{
61-
name = "PagoPACosmosDbConnectionString"
62-
key_vault_secret_name = "PagoPACosmosDbConnectionString"
6355
}
6456
]
6557
}

0 commit comments

Comments
 (0)