Skip to content

Commit cc01fd6

Browse files
fix: Remove api key and secret for deleted transaction API (#3608)
remove api key and secret for deleted transaction API Co-authored-by: Pasquale Spica <36746022+pasqualespica@users.noreply.github.com>
1 parent f92a4f0 commit cc01fd6

File tree

4 files changed

+0
-53
lines changed

4 files changed

+0
-53
lines changed

src/domains/bizevents-app/04_apim_bizevents.tf

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,3 @@
1-
data "azurerm_key_vault_secret" "list_trx_for_io_api_key_secret" {
2-
name = "list-trx-4-io-api-key"
3-
key_vault_id = data.azurerm_key_vault.kv.id
4-
}
5-
6-
# data "azurerm_key_vault_secret" "list_trx_for_io_api_key_secret_apim_v2" {
7-
# name = "list-trx-4-io-api-key"
8-
# key_vault_id = data.azurerm_key_vault.kv.id
9-
# }
10-
11-
resource "azurerm_api_management_named_value" "list_trx_for_io_api_key_secret" {
12-
name = "list-trx-for-io-api-key"
13-
api_management_name = local.pagopa_apim_name
14-
resource_group_name = local.pagopa_apim_rg
15-
display_name = "list-trx-for-io-api-key"
16-
value = data.azurerm_key_vault_secret.list_trx_for_io_api_key_secret.value
17-
secret = true
18-
}
19-
20-
211
#####################################
222
## API Biz Events & Transaction ##
233
#####################################

src/domains/bizevents-app/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
| [azurerm_api_management_api_version_set.api_bizevents_lap_api](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_version_set) | resource |
4343
| [azurerm_api_management_api_version_set.api_bizevents_lap_jwt_api](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_version_set) | resource |
4444
| [azurerm_api_management_named_value.list_lap_for_io_api_key_secret](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_named_value) | resource |
45-
| [azurerm_api_management_named_value.list_trx_for_io_api_key_secret](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_named_value) | resource |
4645
| [azurerm_key_vault_secret.aks_apiserver_url](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/key_vault_secret) | resource |
4746
| [azurerm_key_vault_secret.azure_devops_sa_cacrt](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/key_vault_secret) | resource |
4847
| [azurerm_key_vault_secret.azure_devops_sa_token](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/key_vault_secret) | resource |
@@ -66,7 +65,6 @@
6665
| [azurerm_client_config.current](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/client_config) | data source |
6766
| [azurerm_key_vault.kv](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/key_vault) | data source |
6867
| [azurerm_key_vault_secret.list_lap_for_io_api_key_secret](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/key_vault_secret) | data source |
69-
| [azurerm_key_vault_secret.list_trx_for_io_api_key_secret](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/key_vault_secret) | data source |
7068
| [azurerm_kubernetes_cluster.aks](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/kubernetes_cluster) | data source |
7169
| [azurerm_log_analytics_workspace.log_analytics](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/log_analytics_workspace) | data source |
7270
| [azurerm_monitor_action_group.email](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/monitor_action_group) | data source |

src/domains/bizevents-common/02_security.tf

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -354,34 +354,6 @@ resource "azurerm_key_vault_secret" "webhook-slack-token" {
354354
}
355355
}
356356

357-
// apikey list-trx-4-io-api-key and save keys on KV
358-
data "azurerm_api_management_product" "apim_biz_lst_trx_product" {
359-
product_id = "bizevent-transactions"
360-
api_management_name = local.pagopa_apim_name
361-
resource_group_name = local.pagopa_apim_rg
362-
}
363-
364-
resource "azurerm_api_management_subscription" "list_trx_4_io_api_key_subkey" {
365-
api_management_name = local.pagopa_apim_name
366-
resource_group_name = local.pagopa_apim_rg
367-
368-
product_id = data.azurerm_api_management_product.apim_biz_lst_trx_product.id
369-
display_name = "Biz Events list-trx-4-io-api-key"
370-
allow_tracing = false
371-
state = "active"
372-
}
373-
374-
resource "azurerm_key_vault_secret" "list_trx_4_io_api_keysubkey_store_kv" {
375-
depends_on = [
376-
azurerm_api_management_subscription.list_trx_4_io_api_key_subkey
377-
]
378-
name = "list-trx-4-io-api-key"
379-
value = azurerm_api_management_subscription.list_trx_4_io_api_key_subkey.primary_key
380-
content_type = "text/plain"
381-
382-
key_vault_id = module.key_vault.id
383-
}
384-
385357
// appIO - apikey list-lap-4-io-api-key and save keys on KV
386358
data "azurerm_api_management_product" "apim_biz_lst_lap_product" {
387359
product_id = "bizevent-lap"

src/domains/bizevents-common/README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
| [azurerm_api_management_subscription.ecommerce_helpdesk_subkey](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_subscription) | resource |
4242
| [azurerm_api_management_subscription.list_lap_4_io_api_key_subkey](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_subscription) | resource |
4343
| [azurerm_api_management_subscription.list_lap_arc_4_io_api_key_subkey](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_subscription) | resource |
44-
| [azurerm_api_management_subscription.list_trx_4_io_api_key_subkey](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_subscription) | resource |
4544
| [azurerm_api_management_subscription.pdf_engine_node_4_list_trx_subkey](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_subscription) | resource |
4645
| [azurerm_api_management_subscription.pdf_receipt_service_4_list_trx_subkey](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_subscription) | resource |
4746
| [azurerm_data_factory_data_flow.write_biz_events_to_biz_view](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/data_factory_data_flow) | resource |
@@ -87,7 +86,6 @@
8786
| [azurerm_key_vault_secret.elastic_otl_secret_token](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/key_vault_secret) | resource |
8887
| [azurerm_key_vault_secret.list_lap_4_io_api_keysubkey_store_kv](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/key_vault_secret) | resource |
8988
| [azurerm_key_vault_secret.list_lap_arc_4_io_api_keysubkey_store_kv](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/key_vault_secret) | resource |
90-
| [azurerm_key_vault_secret.list_trx_4_io_api_keysubkey_store_kv](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/key_vault_secret) | resource |
9189
| [azurerm_key_vault_secret.payment_manager_subscription_key](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/key_vault_secret) | resource |
9290
| [azurerm_key_vault_secret.redis_hostname](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/key_vault_secret) | resource |
9391
| [azurerm_key_vault_secret.redis_password](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/key_vault_secret) | resource |
@@ -110,7 +108,6 @@
110108
| [azurerm_api_management_product.apim_api_config_cache_product](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/api_management_product) | data source |
111109
| [azurerm_api_management_product.apim_biz_events_service_product](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/api_management_product) | data source |
112110
| [azurerm_api_management_product.apim_biz_lst_lap_product](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/api_management_product) | data source |
113-
| [azurerm_api_management_product.apim_biz_lst_trx_product](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/api_management_product) | data source |
114111
| [azurerm_api_management_product.apim_pdf_engine_product](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/api_management_product) | data source |
115112
| [azurerm_api_management_product.apim_pdf_receipt_service_product](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/api_management_product) | data source |
116113
| [azurerm_application_insights.application_insights](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/application_insights) | data source |

0 commit comments

Comments
 (0)