Skip to content

Commit

Permalink
Merge branch 'main' into CHK-3348-remove-infra-wallet-domain-refs
Browse files Browse the repository at this point in the history
  • Loading branch information
ciuffagianluca authored Dec 12, 2024
2 parents d270b47 + fcc2dab commit c41e0e5
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 10 deletions.
2 changes: 2 additions & 0 deletions azure-devops/ebollo/00_secrets_ebollo.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module "ebollo_dev_secrets" {
"pagopa-d-itn-dev-aks-azure-devops-sa-token",
"pagopa-d-itn-dev-aks-azure-devops-sa-cacrt",
"pagopa-d-itn-dev-aks-apiserver-url",
"apikey-gps-mbd-integration-test"
]
}

Expand All @@ -31,6 +32,7 @@ module "ebollo_uat_secrets" {
"pagopa-u-itn-uat-aks-azure-devops-sa-token",
"pagopa-u-itn-uat-aks-azure-devops-sa-cacrt",
"pagopa-u-itn-uat-aks-apiserver-url",
"apikey-gps-mbd-integration-test"
]
}

Expand Down
65 changes: 65 additions & 0 deletions azure-devops/ebollo/06_pagopa-gps-mbd-service.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
variable "pagopa-gps-mbd-service" {
default = {
repository = {
organization = "pagopa"
name = "pagopa-gps-mbd-service"
branch_name = "refs/heads/main"
pipelines_path = ".devops"
yml_prefix_name = null
}
pipeline = {
performance_test = {
enabled = true
name = "performance-test-pipeline"
pipeline_yml_filename = "performance-test-pipelines.yml"
}
}
}
}

locals {
# global vars
pagopa-gps-mbd-service-variables = {
cache_version_id = "v1"
default_branch = var.pagopa-gps-mbd-service.repository.branch_name
}
# global secrets
pagopa-gps-mbd-service-variables_secret = {
}
# performance vars
pagopa-gps-mbd-service-variables_performance_test = {
}
# performance secrets
pagopa-gps-mbd-service-variables_secret_performance_test = {
DEV_API_SUBSCRIPTION_KEY = module.ebollo_dev_secrets.values["apikey-gps-mbd-integration-test"].value
UAT_API_SUBSCRIPTION_KEY = module.ebollo_uat_secrets.values["apikey-gps-mbd-integration-test"].value
}

}

module "pagopa-gps-mbd-service_performance_test" {
source = "./.terraform/modules/__azdo__/azuredevops_build_definition_generic"

count = var.pagopa-gps-mbd-service.pipeline.performance_test.enabled == true ? 1 : 0

project_id = data.azuredevops_project.project.id
repository = var.pagopa-gps-mbd-service.repository
github_service_connection_id = data.azuredevops_serviceendpoint_github.github_ro.id
path = "${local.domain}\\pagopa-gps-mbd-service"
pipeline_name = var.pagopa-gps-mbd-service.pipeline.performance_test.name
pipeline_yml_filename = var.pagopa-gps-mbd-service.pipeline.performance_test.pipeline_yml_filename

variables = merge(
local.pagopa-gps-mbd-service-variables,
local.pagopa-gps-mbd-service-variables_performance_test,
)

variables_secret = merge(
local.pagopa-gps-mbd-service-variables_secret,
local.pagopa-gps-mbd-service-variables_secret_performance_test,
)

service_connection_ids_authorization = [
data.azuredevops_serviceendpoint_github.github_ro.id,
]
}
6 changes: 4 additions & 2 deletions azure-devops/pay-wallet/00_secrets_wallet.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ module "wallet_uat_secrets" {
"pagopa-u-itn-uat-aks-azure-devops-sa-token",
"pagopa-u-itn-uat-aks-azure-devops-sa-cacrt",
"pagopa-u-itn-uat-aks-apiserver-url",
"wallet-token-test-key"
"wallet-token-test-key",
"wallet-storage-connection-string",
"receiver-evt-rx-event-hub-connection-string-test"
]
}

Expand All @@ -53,6 +55,6 @@ module "wallet_prod_secrets" {
secrets = [
"pagopa-p-itn-prod-aks-azure-devops-sa-token",
"pagopa-p-itn-prod-aks-azure-devops-sa-cacrt",
"pagopa-p-itn-prod-aks-apiserver-url",
"pagopa-p-itn-prod-aks-apiserver-url"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ locals {
}
# code_review secrets
pagopa-payment-wallet-cdc-service-variables_secret_code_review = {

}
# deploy vars
pagopa-payment-wallet-cdc-service-variables_deploy = {
Expand All @@ -67,9 +66,11 @@ locals {
}
# deploy secrets
pagopa-payment-wallet-cdc-service-variables_secret_deploy = {
git_mail = module.secrets.values["azure-devops-github-EMAIL"].value
git_username = module.secrets.values["azure-devops-github-USERNAME"].value
tenant_id = data.azurerm_client_config.current.tenant_id
git_mail = module.secrets.values["azure-devops-github-EMAIL"].value
git_username = module.secrets.values["azure-devops-github-USERNAME"].value
tenant_id = data.azurerm_client_config.current.tenant_id
wallet_token_test = module.wallet_uat_secrets.values["wallet-token-test-key"].value
azure_eventhub_connection_string = module.wallet_uat_secrets.values["receiver-evt-rx-event-hub-connection-string-test"].value
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ locals {
}
# code_review secrets
pagopa-payment-wallet-scheduler-service-variables_secret_code_review = {

}
# deploy vars
pagopa-payment-wallet-scheduler-service-variables_deploy = {
Expand All @@ -67,9 +66,10 @@ locals {
}
# deploy secrets
pagopa-payment-wallet-scheduler-service-variables_secret_deploy = {
git_mail = module.secrets.values["azure-devops-github-EMAIL"].value
git_username = module.secrets.values["azure-devops-github-USERNAME"].value
tenant_id = data.azurerm_client_config.current.tenant_id
git_mail = module.secrets.values["azure-devops-github-EMAIL"].value
git_username = module.secrets.values["azure-devops-github-USERNAME"].value
tenant_id = data.azurerm_client_config.current.tenant_id
scheduler_cdc_queue_connection_string = module.wallet_uat_secrets.values["wallet-storage-connection-string"].value
}
}

Expand Down
4 changes: 4 additions & 0 deletions azure-devops/pay-wallet/99_main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ terraform {
}

provider "azurerm" {
skip_provider_registration = true
features {}
}

provider "azurerm" {
skip_provider_registration = true
features {
key_vault {
purge_soft_delete_on_destroy = false
Expand All @@ -27,6 +29,7 @@ provider "azurerm" {
}

provider "azurerm" {
skip_provider_registration = true
features {
key_vault {
purge_soft_delete_on_destroy = false
Expand All @@ -37,6 +40,7 @@ provider "azurerm" {
}

provider "azurerm" {
skip_provider_registration = true
features {
key_vault {
purge_soft_delete_on_destroy = false
Expand Down

0 comments on commit c41e0e5

Please sign in to comment.