From 302b8b60cdf03d27f88ae8f506d5a71ffaf97378 Mon Sep 17 00:00:00 2001 From: Andrea Grillo Date: Thu, 28 Mar 2024 19:43:53 +0100 Subject: [PATCH 1/6] rename module --- infra/container_apps/main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/infra/container_apps/main.tf b/infra/container_apps/main.tf index 2d7ba262d..174f6d50e 100644 --- a/infra/container_apps/main.tf +++ b/infra/container_apps/main.tf @@ -8,8 +8,8 @@ provider "azurerm" { features {} } -module "container_app_dashboard_backend" { - source = "github.com/pagopa/selfcare-commons//infra/terraform-modules/container_app_microservice?ref=main" +module "container_app_core" { + source = "github.com/pagopa/selfcare-commons//infra/terraform-modules/container_app_microservice?ref=workload-profiles" is_pnpg = var.is_pnpg From 108f78811a9b1dfe989f0d48ab2b245e133524e5 Mon Sep 17 00:00:00 2001 From: Andrea Grillo Date: Thu, 28 Mar 2024 19:44:20 +0100 Subject: [PATCH 2/6] dev urls and scale rules --- .../env/dev-pnpg/terraform.tfvars | 89 ++++++++------ infra/container_apps/env/dev/terraform.tfvars | 113 ++++++++++-------- .../env/prod-pnpg/terraform.tfvars | 68 +++++------ .../container_apps/env/prod/terraform.tfvars | 84 ++++++------- .../env/uat-pnpg/terraform.tfvars | 89 ++++++++------ infra/container_apps/env/uat/terraform.tfvars | 97 ++++++++------- 6 files changed, 296 insertions(+), 244 deletions(-) diff --git a/infra/container_apps/env/dev-pnpg/terraform.tfvars b/infra/container_apps/env/dev-pnpg/terraform.tfvars index 0cd18cf82..6412a99dd 100644 --- a/infra/container_apps/env/dev-pnpg/terraform.tfvars +++ b/infra/container_apps/env/dev-pnpg/terraform.tfvars @@ -10,11 +10,24 @@ tags = { } container_app = { - min_replicas = 1 + min_replicas = 0 max_replicas = 1 - scale_rules = [] - cpu = 0.5 - memory = "1Gi" + scale_rules = [ + { + custom = { + metadata = { + "desiredReplicas" = "1" + "start" = "0 8 * * MON-FRI" + "end" = "0 19 * * MON-FRI" + "timezone" = "Europe/Rome" + } + type = "cron" + } + name = "cron-scale-rule" + } + ] + cpu = 0.5 + memory = "1Gi" } @@ -27,11 +40,11 @@ app_settings = [ { name = "MAIL_TEMPLATE_COMPLETE_PATH" value = "contracts/template/mail/onboarding-complete/1.0.0.json" - }, + }, { name = "MAIL_TEMPLATE_PT_COMPLETE_PATH" value = "contracts/template/mail/registration-complete-pt/1.0.0.json" - }, + }, { name = "MAIL_TEMPLATE_FD_COMPLETE_NOTIFICATION_PATH" value = "contracts/template/mail/onboarding-complete-fd/1.0.0.json" @@ -39,7 +52,7 @@ app_settings = [ { name = "SELFCARE_URL" value = "https://selfcare.pagopa.it" - }, + }, { name = "MAIL_TEMPLATE_AUTOCOMPLETE_PATH" value = "contracts/template/mail/import-massivo-io/1.0.0.json" @@ -54,18 +67,18 @@ app_settings = [ }, { name = "MAIL_TEMPLATE_PATH" - value = "resources/templates/email/onboarding_1.0.0.json" //pnpg - }, + value = "resources/templates/email/onboarding_1.0.0.json" //pnpg + }, { name = "MAIL_ONBOARDING_CONFIRMATION_LINK" value = "https://dev.selfcare.pagopa.it/onboarding/confirm?jwt=" }, - + { name = "MAIL_ONBOARDING_REJECTION_LINK" value = "https://dev.selfcare.pagopa.it/onboarding/cancel?jwt=" }, - + { name = "SELFCARE_ADMIN_NOTIFICATION_URL" value = "https://dev.selfcare.pagopa.it/dashboard/admin/onboarding/" @@ -74,12 +87,12 @@ app_settings = [ name = "MAIL_TEMPLATE_NOTIFICATION_PATH" value = "contracts/template/mail/onboarding-notification/1.0.0.json" }, - + { name = "MAIL_TEMPLATE_REGISTRATION_REQUEST_PT_PATH" value = "contracts/template/mail/registration-request-pt/1.0.0.json" }, - + { name = "MAIL_TEMPLATE_REGISTRATION_NOTIFICATION_ADMIN_PATH" value = "contracts/template/mail/registration-notification-admin/1.0.0.json" @@ -87,29 +100,29 @@ app_settings = [ { name = "MAIL_TEMPLATE_REJECT_PATH" value = "contracts/template/mail/onboarding-refused/1.0.0.json" - }, + }, { - name = "MAIL_ONBOARDING_URL" + name = "MAIL_ONBOARDING_URL" value = "https://dev.selfcare.pagopa.it/onboarding/" }, { name = "STORAGE_CONTAINER" value = "$web" - }, + }, { name = "STORAGE_ENDPOINT" value = "core.windows.net" }, - + { name = "STORAGE_APPLICATION_ID" value = "selcdweupnpgcheckoutsa" }, - + { name = "STORAGE_CREDENTIAL_ID" value = "selcdweupnpgcheckoutsa" - }, + }, { name = "STORAGE_TEMPLATE_URL" value = "https://selcdweupnpgcheckoutsa.z6.web.core.windows.net" @@ -117,13 +130,13 @@ app_settings = [ { name = "KAFKA_BROKER" value = "selc-d-eventhub-ns.servicebus.windows.net:9093" - }, + }, { - name = "KAFKA_CONTRACTS_TOPIC" + name = "KAFKA_CONTRACTS_TOPIC" value = "SC-Contracts" }, { - name = "KAFKA_USER_TOPIC" + name = "KAFKA_USER_TOPIC" value = "SC-Users" }, { @@ -140,18 +153,18 @@ app_settings = [ }, { name = "EXTERNAL_API_LOG_LEVEL" - value = "DEBUG" + value = "DEBUG" }, { name = "SMTP_HOST" value = "smtps.pec.aruba.it" - }, + }, { name = "SMTP_PORT" value = "465" }, { - name = "SMTP_SSL" + name = "SMTP_SSL" value = "true" }, { @@ -163,7 +176,7 @@ app_settings = [ value = "https://selc-d-pnpg-party-reg-proxy-ca.whiteglacier-211c4885.westeurope.azurecontainerapps.io" }, { - name = "MS_PRODUCT_URL" + name = "MS_PRODUCT_URL" value = "https://dev01.pnpg.internal.dev.selfcare.pagopa.it/ms-product/v1" }, { @@ -173,16 +186,16 @@ app_settings = [ ] secrets_names = { - "STORAGE_APPLICATION_SECRET" = "contracts-storage-access-key" - "ADDRESS_EMAIL_NOTIFICATION_ADMIN" = "portal-admin-operator-email" - "APPLICATIONINSIGHTS_CONNECTION_STRING" = "appinsights-connection-string" - "MAIL_SENDER_ADDRESS" = "smtp-usr" - "MONGODB_CONNECTION_URI" = "mongodb-connection-string" - "BLOB_STORAGE_CONN_STRING" = "blob-storage-contract-connection-string" - "STORAGE_CREDENTIAL_SECRET" = "contracts-storage-access-key" - "SMTP_USR" = "smtp-usr" - "SMTP_PSW" = "smtp-psw" - "ONBOARDING_INSTITUTION_ALTERNATIVE_EMAIL" = "party-test-institution-email" - "USER_REGISTRY_API_KEY" = "user-registry-api-key" - "JWT_TOKEN_PUBLIC_KEY" = "jwt-public-key" + "STORAGE_APPLICATION_SECRET" = "contracts-storage-access-key" + "ADDRESS_EMAIL_NOTIFICATION_ADMIN" = "portal-admin-operator-email" + "APPLICATIONINSIGHTS_CONNECTION_STRING" = "appinsights-connection-string" + "MAIL_SENDER_ADDRESS" = "smtp-usr" + "MONGODB_CONNECTION_URI" = "mongodb-connection-string" + "BLOB_STORAGE_CONN_STRING" = "blob-storage-contract-connection-string" + "STORAGE_CREDENTIAL_SECRET" = "contracts-storage-access-key" + "SMTP_USR" = "smtp-usr" + "SMTP_PSW" = "smtp-psw" + "ONBOARDING_INSTITUTION_ALTERNATIVE_EMAIL" = "party-test-institution-email" + "USER_REGISTRY_API_KEY" = "user-registry-api-key" + "JWT_TOKEN_PUBLIC_KEY" = "jwt-public-key" } \ No newline at end of file diff --git a/infra/container_apps/env/dev/terraform.tfvars b/infra/container_apps/env/dev/terraform.tfvars index a57a11bfe..ea5e462f4 100644 --- a/infra/container_apps/env/dev/terraform.tfvars +++ b/infra/container_apps/env/dev/terraform.tfvars @@ -1,5 +1,5 @@ -env_short = "d" -env = "dev" +env_short = "d" +env = "dev" tags = { CreatedBy = "Terraform" @@ -10,11 +10,24 @@ tags = { } container_app = { - min_replicas = 1 + min_replicas = 0 max_replicas = 1 - scale_rules = [] - cpu = 0.5 - memory = "1Gi" + scale_rules = [ + { + custom = { + metadata = { + "desiredReplicas" = "1" + "start" = "0 8 * * MON-FRI" + "end" = "0 19 * * MON-FRI" + "timezone" = "Europe/Rome" + } + type = "cron" + } + name = "cron-scale-rule" + } + ] + cpu = 0.5 + memory = "1Gi" } app_settings = [ @@ -23,18 +36,18 @@ app_settings = [ value = "pectest@pec.pagopa.it" # //prod non presente }, -# { -# name = "ONBOARDING_SEND_EMAIL_TO_INSTITUTION" -# value = "true" //solo prod Selfcare -# }, + # { + # name = "ONBOARDING_SEND_EMAIL_TO_INSTITUTION" + # value = "true" //solo prod Selfcare + # }, { name = "MAIL_TEMPLATE_COMPLETE_PATH" value = "contracts/template/mail/onboarding-complete/1.0.0.json" - }, + }, { name = "MAIL_TEMPLATE_PT_COMPLETE_PATH" value = "contracts/template/mail/registration-complete-pt/1.0.0.json" - }, + }, { name = "MAIL_TEMPLATE_FD_COMPLETE_NOTIFICATION_PATH" value = "contracts/template/mail/onboarding-complete-fd/1.0.0.json" @@ -42,7 +55,7 @@ app_settings = [ { name = "SELFCARE_URL" value = "https://selfcare.pagopa.it" - }, + }, { name = "MAIL_TEMPLATE_AUTOCOMPLETE_PATH" value = "contracts/template/mail/import-massivo-io/1.0.0.json" @@ -60,19 +73,19 @@ app_settings = [ # value = "resources/templates/email/onboarding_1.0.0.json" //pnpg #}, { - name = "MAIL_TEMPLATE_PATH" - value = "contracts/template/mail/1.0.0.json" //selfcare + name = "MAIL_TEMPLATE_PATH" + value = "contracts/template/mail/1.0.0.json" //selfcare }, { name = "MAIL_ONBOARDING_CONFIRMATION_LINK" value = "https://dev.selfcare.pagopa.it/onboarding/confirm?jwt=" }, - + { name = "MAIL_ONBOARDING_REJECTION_LINK" value = "https://dev.selfcare.pagopa.it/onboarding/cancel?jwt=" }, - + { name = "SELFCARE_ADMIN_NOTIFICATION_URL" value = "https://dev.selfcare.pagopa.it/dashboard/admin/onboarding/" @@ -81,12 +94,12 @@ app_settings = [ name = "MAIL_TEMPLATE_NOTIFICATION_PATH" value = "contracts/template/mail/onboarding-notification/1.0.0.json" }, - + { name = "MAIL_TEMPLATE_REGISTRATION_REQUEST_PT_PATH" value = "contracts/template/mail/registration-request-pt/1.0.0.json" }, - + { name = "MAIL_TEMPLATE_REGISTRATION_NOTIFICATION_ADMIN_PATH" value = "contracts/template/mail/registration-notification-admin/1.0.0.json" @@ -94,29 +107,29 @@ app_settings = [ { name = "MAIL_TEMPLATE_REJECT_PATH" value = "contracts/template/mail/onboarding-refused/1.0.0.json" - }, + }, { - name = "MAIL_ONBOARDING_URL" + name = "MAIL_ONBOARDING_URL" value = "https://dev.selfcare.pagopa.it/onboarding/" }, { name = "STORAGE_CONTAINER" value = "selc-d-contracts-blob" - }, + }, { name = "STORAGE_ENDPOINT" value = "core.windows.net" }, - + { name = "STORAGE_APPLICATION_ID" value = "selcdcontractsstorage" }, - + { name = "STORAGE_CREDENTIAL_ID" value = "selcdcontractsstorage" - }, + }, { name = "STORAGE_TEMPLATE_URL" value = "https://selcdcheckoutsa.z6.web.core.windows.net" @@ -124,13 +137,13 @@ app_settings = [ { name = "KAFKA_BROKER" value = "selc-d-eventhub-ns.servicebus.windows.net:9093" - }, + }, { - name = "KAFKA_CONTRACTS_TOPIC" + name = "KAFKA_CONTRACTS_TOPIC" value = "SC-Contracts" }, { - name = "KAFKA_USER_TOPIC" + name = "KAFKA_USER_TOPIC" value = "SC-Users" }, { @@ -147,42 +160,42 @@ app_settings = [ }, { name = "EXTERNAL_API_LOG_LEVEL" - value = "DEBUG" + value = "DEBUG" # // prod è “INFO" }, { name = "CORE_USER_EVENT_SERVICE_TYPE" - value = "send" + value = "send" # //solo selfcare }, { name = "CORE_CONTRACT_EVENT_SERVICE_TYPE" - value = "send" + value = "send" # //solo selfcare }, { name = "SMTP_HOST" value = "smtps.pec.aruba.it" }, - + { name = "SMTP_PORT" value = "465" }, { - name = "SMTP_SSL" + name = "SMTP_SSL" value = "true" }, { name = "MS_NOTIFICATION_MANAGER_URL" - value = "https://selc-d-notification-mngr-ca.gentleflower-c63e62fe.westeurope.azurecontainerapps.io" + value = "https://selc-d-notification-mngr-ca.livelydesert-633675bb.westeurope.azurecontainerapps.io" }, { name = "USERVICE_PARTY_REGISTRY_PROXY_URL" - value = "https://selc-d-party-reg-proxy-ca.gentleflower-c63e62fe.westeurope.azurecontainerapps.io" + value = "https://selc-d-party-reg-proxy-ca.livelydesert-633675bb.westeurope.azurecontainerapps.io" }, { - name = "MS_PRODUCT_URL" + name = "MS_PRODUCT_URL" value = "https://selc.internal.dev.selfcare.pagopa.it/ms-product/v1" }, { @@ -192,18 +205,18 @@ app_settings = [ ] secrets_names = { - "STORAGE_APPLICATION_SECRET" = "contracts-storage-access-key" - "ADDRESS_EMAIL_NOTIFICATION_ADMIN" = "portal-admin-operator-email" - "APPLICATIONINSIGHTS_CONNECTION_STRING" = "appinsights-connection-string" - "MAIL_SENDER_ADDRESS" = "smtp-usr" - "MONGODB_CONNECTION_URI" = "mongodb-connection-string" - "BLOB_STORAGE_CONN_STRING" = "blob-storage-contract-connection-string" - "STORAGE_CREDENTIAL_SECRET" = "contracts-storage-access-key" - "KAFKA_CONTRACTS_SELFCARE_WO_SASL_JAAS_CONFIG" = "eventhub-sc-contracts-selfcare-wo-connection-string-lc" - "SMTP_USR" = "smtp-usr" - "SMTP_PSW" = "smtp-psw" - "ONBOARDING_INSTITUTION_ALTERNATIVE_EMAIL" = "party-test-institution-email" - "USER_REGISTRY_API_KEY" = "user-registry-api-key" - "JWT_TOKEN_PUBLIC_KEY" = "jwt-public-key" - "KAFKA_USERS_SELFCARE_WO_SASL_JAAS_CONFIG" = "eventhub-sc-users-selfcare-wo-connection-string-lc" + "STORAGE_APPLICATION_SECRET" = "contracts-storage-access-key" + "ADDRESS_EMAIL_NOTIFICATION_ADMIN" = "portal-admin-operator-email" + "APPLICATIONINSIGHTS_CONNECTION_STRING" = "appinsights-connection-string" + "MAIL_SENDER_ADDRESS" = "smtp-usr" + "MONGODB_CONNECTION_URI" = "mongodb-connection-string" + "BLOB_STORAGE_CONN_STRING" = "blob-storage-contract-connection-string" + "STORAGE_CREDENTIAL_SECRET" = "contracts-storage-access-key" + "KAFKA_CONTRACTS_SELFCARE_WO_SASL_JAAS_CONFIG" = "eventhub-sc-contracts-selfcare-wo-connection-string-lc" + "SMTP_USR" = "smtp-usr" + "SMTP_PSW" = "smtp-psw" + "ONBOARDING_INSTITUTION_ALTERNATIVE_EMAIL" = "party-test-institution-email" + "USER_REGISTRY_API_KEY" = "user-registry-api-key" + "JWT_TOKEN_PUBLIC_KEY" = "jwt-public-key" + "KAFKA_USERS_SELFCARE_WO_SASL_JAAS_CONFIG" = "eventhub-sc-users-selfcare-wo-connection-string-lc" } diff --git a/infra/container_apps/env/prod-pnpg/terraform.tfvars b/infra/container_apps/env/prod-pnpg/terraform.tfvars index ca9e726dc..121f18cfa 100644 --- a/infra/container_apps/env/prod-pnpg/terraform.tfvars +++ b/infra/container_apps/env/prod-pnpg/terraform.tfvars @@ -35,11 +35,11 @@ app_settings = [ { name = "MAIL_TEMPLATE_COMPLETE_PATH" value = "contracts/template/mail/onboarding-complete/1.0.0.json" - }, + }, { name = "MAIL_TEMPLATE_PT_COMPLETE_PATH" value = "contracts/template/mail/registration-complete-pt/1.0.0.json" - }, + }, { name = "MAIL_TEMPLATE_FD_COMPLETE_NOTIFICATION_PATH" value = "contracts/template/mail/onboarding-complete-fd/1.0.0.json" @@ -47,7 +47,7 @@ app_settings = [ { name = "SELFCARE_URL" value = "https://selfcare.pagopa.it" - }, + }, { name = "MAIL_TEMPLATE_AUTOCOMPLETE_PATH" value = "contracts/template/mail/import-massivo-io/1.0.0.json" @@ -62,18 +62,18 @@ app_settings = [ }, { name = "MAIL_TEMPLATE_PATH" - value = "resources/templates/email/onboarding_1.0.0.json" //pnpg - }, + value = "resources/templates/email/onboarding_1.0.0.json" //pnpg + }, { name = "MAIL_ONBOARDING_CONFIRMATION_LINK" value = "https://selfcare.pagopa.it/onboarding/confirm?jwt=" }, - + { name = "MAIL_ONBOARDING_REJECTION_LINK" value = "https://selfcare.pagopa.it/onboarding/cancel?jwt=" }, - + { name = "SELFCARE_ADMIN_NOTIFICATION_URL" value = "https://selfcare.pagopa.it/dashboard/admin/onboarding/" @@ -82,12 +82,12 @@ app_settings = [ name = "MAIL_TEMPLATE_NOTIFICATION_PATH" value = "contracts/template/mail/onboarding-notification/1.0.0.json" }, - + { name = "MAIL_TEMPLATE_REGISTRATION_REQUEST_PT_PATH" value = "contracts/template/mail/registration-request-pt/1.0.0.json" }, - + { name = "MAIL_TEMPLATE_REGISTRATION_NOTIFICATION_ADMIN_PATH" value = "contracts/template/mail/registration-notification-admin/1.0.0.json" @@ -95,29 +95,29 @@ app_settings = [ { name = "MAIL_TEMPLATE_REJECT_PATH" value = "contracts/template/mail/onboarding-refused/1.0.0.json" - }, + }, { - name = "MAIL_ONBOARDING_URL" + name = "MAIL_ONBOARDING_URL" value = "https://selfcare.pagopa.it/onboarding/" }, { name = "STORAGE_CONTAINER" value = "$web" - }, + }, { name = "STORAGE_ENDPOINT" value = "core.windows.net" }, - + { name = "STORAGE_APPLICATION_ID" value = "selcpweupnpgcheckoutsa" }, - + { name = "STORAGE_CREDENTIAL_ID" value = "selcpweupnpgcheckoutsa" - }, + }, { name = "STORAGE_TEMPLATE_URL" value = "https://selcpweupnpgcheckoutsa.z6.web.core.windows.net" @@ -125,13 +125,13 @@ app_settings = [ { name = "KAFKA_BROKER" value = "selc-p-pnpg-eventhub-ns.servicebus.windows.net:9093" - }, + }, { - name = "KAFKA_CONTRACTS_TOPIC" + name = "KAFKA_CONTRACTS_TOPIC" value = "SC-Contracts" }, { - name = "KAFKA_USER_TOPIC" + name = "KAFKA_USER_TOPIC" value = "SC-Users" }, { @@ -148,18 +148,18 @@ app_settings = [ }, { name = "EXTERNAL_API_LOG_LEVEL" - value = "INFO" + value = "INFO" }, { name = "SMTP_HOST" value = "smtps.pec.aruba.it" - }, + }, { name = "SMTP_PORT" value = "465" }, { - name = "SMTP_SSL" + name = "SMTP_SSL" value = "true" }, { @@ -171,7 +171,7 @@ app_settings = [ value = "https://selc-p-pnpg-party-reg-proxy-ca.salmonpond-60269923.westeurope.azurecontainerapps.io" }, { - name = "MS_PRODUCT_URL" + name = "MS_PRODUCT_URL" value = "https://prod01.pnpg.internal.selfcare.pagopa.it/ms-product/v1" }, { @@ -182,16 +182,16 @@ app_settings = [ secrets_names = { - "STORAGE_APPLICATION_SECRET" = "contracts-storage-access-key" - "ADDRESS_EMAIL_NOTIFICATION_ADMIN" = "portal-admin-operator-email" - "APPLICATIONINSIGHTS_CONNECTION_STRING" = "appinsights-connection-string" - "MAIL_SENDER_ADDRESS" = "smtp-usr" - "MONGODB_CONNECTION_URI" = "mongodb-connection-string" - "BLOB_STORAGE_CONN_STRING" = "blob-storage-contract-connection-string" - "STORAGE_CREDENTIAL_SECRET" = "contracts-storage-access-key" - "SMTP_USR" = "smtp-usr" - "SMTP_PSW" = "smtp-psw" - "ONBOARDING_INSTITUTION_ALTERNATIVE_EMAIL" = "party-test-institution-email" - "USER_REGISTRY_API_KEY" = "user-registry-api-key" - "JWT_TOKEN_PUBLIC_KEY" = "jwt-public-key" + "STORAGE_APPLICATION_SECRET" = "contracts-storage-access-key" + "ADDRESS_EMAIL_NOTIFICATION_ADMIN" = "portal-admin-operator-email" + "APPLICATIONINSIGHTS_CONNECTION_STRING" = "appinsights-connection-string" + "MAIL_SENDER_ADDRESS" = "smtp-usr" + "MONGODB_CONNECTION_URI" = "mongodb-connection-string" + "BLOB_STORAGE_CONN_STRING" = "blob-storage-contract-connection-string" + "STORAGE_CREDENTIAL_SECRET" = "contracts-storage-access-key" + "SMTP_USR" = "smtp-usr" + "SMTP_PSW" = "smtp-psw" + "ONBOARDING_INSTITUTION_ALTERNATIVE_EMAIL" = "party-test-institution-email" + "USER_REGISTRY_API_KEY" = "user-registry-api-key" + "JWT_TOKEN_PUBLIC_KEY" = "jwt-public-key" } \ No newline at end of file diff --git a/infra/container_apps/env/prod/terraform.tfvars b/infra/container_apps/env/prod/terraform.tfvars index 9d4168193..b98103228 100644 --- a/infra/container_apps/env/prod/terraform.tfvars +++ b/infra/container_apps/env/prod/terraform.tfvars @@ -31,18 +31,18 @@ container_app = { app_settings = [ - { - name = "ONBOARDING_SEND_EMAIL_TO_INSTITUTION" - value = "true" - }, + { + name = "ONBOARDING_SEND_EMAIL_TO_INSTITUTION" + value = "true" + }, { name = "MAIL_TEMPLATE_COMPLETE_PATH" value = "contracts/template/mail/onboarding-complete/1.0.0.json" - }, + }, { name = "MAIL_TEMPLATE_PT_COMPLETE_PATH" value = "contracts/template/mail/registration-complete-pt/1.0.0.json" - }, + }, { name = "MAIL_TEMPLATE_FD_COMPLETE_NOTIFICATION_PATH" value = "contracts/template/mail/onboarding-complete-fd/1.0.0.json" @@ -50,7 +50,7 @@ app_settings = [ { name = "SELFCARE_URL" value = "https://selfcare.pagopa.it" - }, + }, { name = "MAIL_TEMPLATE_AUTOCOMPLETE_PATH" value = "contracts/template/mail/import-massivo-io/1.0.0.json" @@ -64,19 +64,19 @@ app_settings = [ value = "contracts/template/mail/delegation-notification/user-1.0.0.json" }, { - name = "MAIL_TEMPLATE_PATH" - value = "contracts/template/mail/1.0.0.json" //selfcare + name = "MAIL_TEMPLATE_PATH" + value = "contracts/template/mail/1.0.0.json" //selfcare }, { name = "MAIL_ONBOARDING_CONFIRMATION_LINK" value = "https://selfcare.pagopa.it/onboarding/confirm?jwt=" }, - + { name = "MAIL_ONBOARDING_REJECTION_LINK" value = "https://selfcare.pagopa.it/onboarding/cancel?jwt=" }, - + { name = "SELFCARE_ADMIN_NOTIFICATION_URL" value = "https://selfcare.pagopa.it/dashboard/admin/onboarding/" @@ -85,12 +85,12 @@ app_settings = [ name = "MAIL_TEMPLATE_NOTIFICATION_PATH" value = "contracts/template/mail/onboarding-notification/1.0.0.json" }, - + { name = "MAIL_TEMPLATE_REGISTRATION_REQUEST_PT_PATH" value = "contracts/template/mail/registration-request-pt/1.0.0.json" }, - + { name = "MAIL_TEMPLATE_REGISTRATION_NOTIFICATION_ADMIN_PATH" value = "contracts/template/mail/registration-notification-admin/1.0.0.json" @@ -98,29 +98,29 @@ app_settings = [ { name = "MAIL_TEMPLATE_REJECT_PATH" value = "contracts/template/mail/onboarding-refused/1.0.0.json" - }, + }, { - name = "MAIL_ONBOARDING_URL" + name = "MAIL_ONBOARDING_URL" value = "https://selfcare.pagopa.it/onboarding/" }, { name = "STORAGE_CONTAINER" value = "selc-p-contracts-blob" - }, + }, { name = "STORAGE_ENDPOINT" value = "core.windows.net" }, - + { name = "STORAGE_APPLICATION_ID" value = "selcpcontractsstorage" }, - + { name = "STORAGE_CREDENTIAL_ID" value = "selcpcontractsstorage" - }, + }, { name = "STORAGE_TEMPLATE_URL" value = "https://selcpcheckoutsa.z6.web.core.windows.net" @@ -128,13 +128,13 @@ app_settings = [ { name = "KAFKA_BROKER" value = "selc-p-eventhub-ns.servicebus.windows.net:9093" - }, + }, { - name = "KAFKA_CONTRACTS_TOPIC" + name = "KAFKA_CONTRACTS_TOPIC" value = "SC-Contracts" }, { - name = "KAFKA_USER_TOPIC" + name = "KAFKA_USER_TOPIC" value = "SC-Users" }, { @@ -151,27 +151,27 @@ app_settings = [ }, { name = "EXTERNAL_API_LOG_LEVEL" - value = "“INFO" + value = "“INFO" }, { name = "CORE_USER_EVENT_SERVICE_TYPE" - value = "send" + value = "send" }, { name = "CORE_CONTRACT_EVENT_SERVICE_TYPE" - value = "send" + value = "send" }, { name = "SMTP_HOST" value = "smtps.pec.aruba.it" }, - + { name = "SMTP_PORT" value = "465" }, { - name = "SMTP_SSL" + name = "SMTP_SSL" value = "true" }, { @@ -183,7 +183,7 @@ app_settings = [ value = "https://selc-p-party-reg-proxy-ca.bluedune-cc0f8752.westeurope.azurecontainerapps.io" }, { - name = "MS_PRODUCT_URL" + name = "MS_PRODUCT_URL" value = "https://selc.internal.selfcare.pagopa.it/ms-product/v1" }, { @@ -193,18 +193,18 @@ app_settings = [ ] secrets_names = { - "STORAGE_APPLICATION_SECRET" = "contracts-storage-access-key" - "ADDRESS_EMAIL_NOTIFICATION_ADMIN" = "portal-admin-operator-email" - "APPLICATIONINSIGHTS_CONNECTION_STRING" = "appinsights-connection-string" - "MAIL_SENDER_ADDRESS" = "smtp-usr" - "MONGODB_CONNECTION_URI" = "mongodb-connection-string" - "BLOB_STORAGE_CONN_STRING" = "blob-storage-contract-connection-string" - "STORAGE_CREDENTIAL_SECRET" = "contracts-storage-access-key" - "KAFKA_CONTRACTS_SELFCARE_WO_SASL_JAAS_CONFIG" = "eventhub-sc-contracts-selfcare-wo-connection-string-lc" - "SMTP_USR" = "smtp-usr" - "SMTP_PSW" = "smtp-psw" - "ONBOARDING_INSTITUTION_ALTERNATIVE_EMAIL" = "party-test-institution-email" - "USER_REGISTRY_API_KEY" = "user-registry-api-key" - "JWT_TOKEN_PUBLIC_KEY" = "jwt-public-key" - "KAFKA_USERS_SELFCARE_WO_SASL_JAAS_CONFIG" = "eventhub-sc-users-selfcare-wo-connection-string-lc" + "STORAGE_APPLICATION_SECRET" = "contracts-storage-access-key" + "ADDRESS_EMAIL_NOTIFICATION_ADMIN" = "portal-admin-operator-email" + "APPLICATIONINSIGHTS_CONNECTION_STRING" = "appinsights-connection-string" + "MAIL_SENDER_ADDRESS" = "smtp-usr" + "MONGODB_CONNECTION_URI" = "mongodb-connection-string" + "BLOB_STORAGE_CONN_STRING" = "blob-storage-contract-connection-string" + "STORAGE_CREDENTIAL_SECRET" = "contracts-storage-access-key" + "KAFKA_CONTRACTS_SELFCARE_WO_SASL_JAAS_CONFIG" = "eventhub-sc-contracts-selfcare-wo-connection-string-lc" + "SMTP_USR" = "smtp-usr" + "SMTP_PSW" = "smtp-psw" + "ONBOARDING_INSTITUTION_ALTERNATIVE_EMAIL" = "party-test-institution-email" + "USER_REGISTRY_API_KEY" = "user-registry-api-key" + "JWT_TOKEN_PUBLIC_KEY" = "jwt-public-key" + "KAFKA_USERS_SELFCARE_WO_SASL_JAAS_CONFIG" = "eventhub-sc-users-selfcare-wo-connection-string-lc" } \ No newline at end of file diff --git a/infra/container_apps/env/uat-pnpg/terraform.tfvars b/infra/container_apps/env/uat-pnpg/terraform.tfvars index cbd1facc7..85b2bb9fd 100644 --- a/infra/container_apps/env/uat-pnpg/terraform.tfvars +++ b/infra/container_apps/env/uat-pnpg/terraform.tfvars @@ -10,11 +10,24 @@ tags = { } container_app = { - min_replicas = 1 + min_replicas = 0 max_replicas = 2 - scale_rules = [] - cpu = 0.5 - memory = "1Gi" + scale_rules = [ + { + custom = { + metadata = { + "desiredReplicas" = "1" + "start" = "0 8 * * MON-FRI" + "end" = "0 19 * * MON-FRI" + "timezone" = "Europe/Rome" + } + type = "cron" + } + name = "cron-scale-rule" + } + ] + cpu = 0.5 + memory = "1Gi" } @@ -26,11 +39,11 @@ app_settings = [ { name = "MAIL_TEMPLATE_COMPLETE_PATH" value = "contracts/template/mail/onboarding-complete/1.0.0.json" - }, + }, { name = "MAIL_TEMPLATE_PT_COMPLETE_PATH" value = "contracts/template/mail/registration-complete-pt/1.0.0.json" - }, + }, { name = "MAIL_TEMPLATE_FD_COMPLETE_NOTIFICATION_PATH" value = "contracts/template/mail/onboarding-complete-fd/1.0.0.json" @@ -38,7 +51,7 @@ app_settings = [ { name = "SELFCARE_URL" value = "https://selfcare.pagopa.it" - }, + }, { name = "MAIL_TEMPLATE_AUTOCOMPLETE_PATH" value = "contracts/template/mail/import-massivo-io/1.0.0.json" @@ -53,18 +66,18 @@ app_settings = [ }, { name = "MAIL_TEMPLATE_PATH" - value = "resources/templates/email/onboarding_1.0.0.json" //pnpg - }, + value = "resources/templates/email/onboarding_1.0.0.json" //pnpg + }, { name = "MAIL_ONBOARDING_CONFIRMATION_LINK" value = "https://uat.selfcare.pagopa.it/onboarding/confirm?jwt=" }, - + { name = "MAIL_ONBOARDING_REJECTION_LINK" value = "https://uat.selfcare.pagopa.it/onboarding/cancel?jwt=" }, - + { name = "SELFCARE_ADMIN_NOTIFICATION_URL" value = "https://uat.selfcare.pagopa.it/dashboard/admin/onboarding/" @@ -73,12 +86,12 @@ app_settings = [ name = "MAIL_TEMPLATE_NOTIFICATION_PATH" value = "contracts/template/mail/onboarding-notification/1.0.0.json" }, - + { name = "MAIL_TEMPLATE_REGISTRATION_REQUEST_PT_PATH" value = "contracts/template/mail/registration-request-pt/1.0.0.json" }, - + { name = "MAIL_TEMPLATE_REGISTRATION_NOTIFICATION_ADMIN_PATH" value = "contracts/template/mail/registration-notification-admin/1.0.0.json" @@ -86,29 +99,29 @@ app_settings = [ { name = "MAIL_TEMPLATE_REJECT_PATH" value = "contracts/template/mail/onboarding-refused/1.0.0.json" - }, + }, { - name = "MAIL_ONBOARDING_URL" + name = "MAIL_ONBOARDING_URL" value = "https://uat.selfcare.pagopa.it/onboarding/" }, { name = "STORAGE_CONTAINER" value = "$web" - }, + }, { name = "STORAGE_ENDPOINT" value = "core.windows.net" }, - + { name = "STORAGE_APPLICATION_ID" value = "selcuweupnpgcheckoutsa" }, - + { name = "STORAGE_CREDENTIAL_ID" value = "selcuweupnpgcheckoutsa" - }, + }, { name = "STORAGE_TEMPLATE_URL" value = "https://selcuweupnpgcheckoutsa.z6.web.core.windows.net" @@ -116,13 +129,13 @@ app_settings = [ { name = "KAFKA_BROKER" value = "selc-u-pnpg-eventhub-ns.servicebus.windows.net:9093" - }, + }, { - name = "KAFKA_CONTRACTS_TOPIC" + name = "KAFKA_CONTRACTS_TOPIC" value = "SC-Contracts" }, { - name = "KAFKA_USER_TOPIC" + name = "KAFKA_USER_TOPIC" value = "SC-Users" }, { @@ -139,18 +152,18 @@ app_settings = [ }, { name = "EXTERNAL_API_LOG_LEVEL" - value = "DEBUG" + value = "DEBUG" }, { name = "SMTP_HOST" value = "smtps.pec.aruba.it" - }, + }, { name = "SMTP_PORT" value = "465" }, { - name = "SMTP_SSL" + name = "SMTP_SSL" value = "true" }, { @@ -162,7 +175,7 @@ app_settings = [ value = "https://selc-u-pnpg-party-reg-proxy-ca.redground-be752d1f.westeurope.azurecontainerapps.io" }, { - name = "MS_PRODUCT_URL" + name = "MS_PRODUCT_URL" value = "https://uat01.pnpg.internal.uat.selfcare.pagopa.it/ms-product/v1" }, { @@ -172,16 +185,16 @@ app_settings = [ ] secrets_names = { - "STORAGE_APPLICATION_SECRET" = "contracts-storage-access-key" - "ADDRESS_EMAIL_NOTIFICATION_ADMIN" = "portal-admin-operator-email" - "APPLICATIONINSIGHTS_CONNECTION_STRING" = "appinsights-connection-string" - "MAIL_SENDER_ADDRESS" = "smtp-usr" - "MONGODB_CONNECTION_URI" = "mongodb-connection-string" - "BLOB_STORAGE_CONN_STRING" = "blob-storage-contract-connection-string" - "STORAGE_CREDENTIAL_SECRET" = "contracts-storage-access-key" - "SMTP_USR" = "smtp-usr" - "SMTP_PSW" = "smtp-psw" - "ONBOARDING_INSTITUTION_ALTERNATIVE_EMAIL" = "party-test-institution-email" - "USER_REGISTRY_API_KEY" = "user-registry-api-key" - "JWT_TOKEN_PUBLIC_KEY" = "jwt-public-key" + "STORAGE_APPLICATION_SECRET" = "contracts-storage-access-key" + "ADDRESS_EMAIL_NOTIFICATION_ADMIN" = "portal-admin-operator-email" + "APPLICATIONINSIGHTS_CONNECTION_STRING" = "appinsights-connection-string" + "MAIL_SENDER_ADDRESS" = "smtp-usr" + "MONGODB_CONNECTION_URI" = "mongodb-connection-string" + "BLOB_STORAGE_CONN_STRING" = "blob-storage-contract-connection-string" + "STORAGE_CREDENTIAL_SECRET" = "contracts-storage-access-key" + "SMTP_USR" = "smtp-usr" + "SMTP_PSW" = "smtp-psw" + "ONBOARDING_INSTITUTION_ALTERNATIVE_EMAIL" = "party-test-institution-email" + "USER_REGISTRY_API_KEY" = "user-registry-api-key" + "JWT_TOKEN_PUBLIC_KEY" = "jwt-public-key" } \ No newline at end of file diff --git a/infra/container_apps/env/uat/terraform.tfvars b/infra/container_apps/env/uat/terraform.tfvars index 569dc2bc5..b17f3a361 100644 --- a/infra/container_apps/env/uat/terraform.tfvars +++ b/infra/container_apps/env/uat/terraform.tfvars @@ -9,11 +9,24 @@ tags = { } container_app = { - min_replicas = 1 + min_replicas = 0 max_replicas = 2 - scale_rules = [] - cpu = 0.5 - memory = "1Gi" + scale_rules = [ + { + custom = { + metadata = { + "desiredReplicas" = "1" + "start" = "0 8 * * MON-FRI" + "end" = "0 19 * * MON-FRI" + "timezone" = "Europe/Rome" + } + type = "cron" + } + name = "cron-scale-rule" + } + ] + cpu = 0.5 + memory = "1Gi" } @@ -26,11 +39,11 @@ app_settings = [ { name = "MAIL_TEMPLATE_COMPLETE_PATH" value = "contracts/template/mail/onboarding-complete/1.0.0.json" - }, + }, { name = "MAIL_TEMPLATE_PT_COMPLETE_PATH" value = "contracts/template/mail/registration-complete-pt/1.0.0.json" - }, + }, { name = "MAIL_TEMPLATE_FD_COMPLETE_NOTIFICATION_PATH" value = "contracts/template/mail/onboarding-complete-fd/1.0.0.json" @@ -38,7 +51,7 @@ app_settings = [ { name = "SELFCARE_URL" value = "https://selfcare.pagopa.it" - }, + }, { name = "MAIL_TEMPLATE_AUTOCOMPLETE_PATH" value = "contracts/template/mail/import-massivo-io/1.0.0.json" @@ -52,19 +65,19 @@ app_settings = [ value = "contracts/template/mail/delegation-notification/user-1.0.0.json" }, { - name = "MAIL_TEMPLATE_PATH" - value = "contracts/template/mail/1.0.0.json" //selfcare + name = "MAIL_TEMPLATE_PATH" + value = "contracts/template/mail/1.0.0.json" //selfcare }, { name = "MAIL_ONBOARDING_CONFIRMATION_LINK" value = "https://uat.selfcare.pagopa.it/onboarding/confirm?jwt=" }, - + { name = "MAIL_ONBOARDING_REJECTION_LINK" value = "https://uat.selfcare.pagopa.it/onboarding/cancel?jwt=" }, - + { name = "SELFCARE_ADMIN_NOTIFICATION_URL" value = "https://uat.selfcare.pagopa.it/dashboard/admin/onboarding/" @@ -73,12 +86,12 @@ app_settings = [ name = "MAIL_TEMPLATE_NOTIFICATION_PATH" value = "contracts/template/mail/onboarding-notification/1.0.0.json" }, - + { name = "MAIL_TEMPLATE_REGISTRATION_REQUEST_PT_PATH" value = "contracts/template/mail/registration-request-pt/1.0.0.json" }, - + { name = "MAIL_TEMPLATE_REGISTRATION_NOTIFICATION_ADMIN_PATH" value = "contracts/template/mail/registration-notification-admin/1.0.0.json" @@ -86,29 +99,29 @@ app_settings = [ { name = "MAIL_TEMPLATE_REJECT_PATH" value = "contracts/template/mail/onboarding-refused/1.0.0.json" - }, + }, { - name = "MAIL_ONBOARDING_URL" + name = "MAIL_ONBOARDING_URL" value = "https://uat.selfcare.pagopa.it/onboarding/" }, { name = "STORAGE_CONTAINER" value = "selc-u-contracts-blob" - }, + }, { name = "STORAGE_ENDPOINT" value = "core.windows.net" }, - + { name = "STORAGE_APPLICATION_ID" value = "selcucontractsstorage" }, - + { name = "STORAGE_CREDENTIAL_ID" value = "selcucontractsstorage" - }, + }, { name = "STORAGE_TEMPLATE_URL" value = "https://selcucheckoutsa.z6.web.core.windows.net" @@ -116,13 +129,13 @@ app_settings = [ { name = "KAFKA_BROKER" value = "selc-u-eventhub-ns.servicebus.windows.net:9093" - }, + }, { - name = "KAFKA_CONTRACTS_TOPIC" + name = "KAFKA_CONTRACTS_TOPIC" value = "SC-Contracts" }, { - name = "KAFKA_USER_TOPIC" + name = "KAFKA_USER_TOPIC" value = "SC-Users" }, { @@ -139,28 +152,28 @@ app_settings = [ }, { name = "EXTERNAL_API_LOG_LEVEL" - value = "DEBUG" + value = "DEBUG" # // prod è “INFO" }, { name = "CORE_USER_EVENT_SERVICE_TYPE" - value = "send" + value = "send" }, { name = "CORE_CONTRACT_EVENT_SERVICE_TYPE" - value = "send" + value = "send" }, { name = "SMTP_HOST" value = "smtps.pec.aruba.it" }, - + { name = "SMTP_PORT" value = "465" }, { - name = "SMTP_SSL" + name = "SMTP_SSL" value = "true" }, { @@ -172,7 +185,7 @@ app_settings = [ value = "https://selc-u-party-reg-proxy-ca.calmsky-143987c1.westeurope.azurecontainerapps.io" }, { - name = "MS_PRODUCT_URL" + name = "MS_PRODUCT_URL" value = "https://selc.internal.uat.selfcare.pagopa.it/ms-product/v1" }, { @@ -182,18 +195,18 @@ app_settings = [ ] secrets_names = { - "STORAGE_APPLICATION_SECRET" = "contracts-storage-access-key" - "ADDRESS_EMAIL_NOTIFICATION_ADMIN" = "portal-admin-operator-email" - "APPLICATIONINSIGHTS_CONNECTION_STRING" = "appinsights-connection-string" - "MAIL_SENDER_ADDRESS" = "smtp-usr" - "MONGODB_CONNECTION_URI" = "mongodb-connection-string" - "BLOB_STORAGE_CONN_STRING" = "blob-storage-contract-connection-string" - "STORAGE_CREDENTIAL_SECRET" = "contracts-storage-access-key" - "KAFKA_CONTRACTS_SELFCARE_WO_SASL_JAAS_CONFIG" = "eventhub-sc-contracts-selfcare-wo-connection-string-lc" - "SMTP_USR" = "smtp-usr" - "SMTP_PSW" = "smtp-psw" - "ONBOARDING_INSTITUTION_ALTERNATIVE_EMAIL" = "party-test-institution-email" - "USER_REGISTRY_API_KEY" = "user-registry-api-key" - "JWT_TOKEN_PUBLIC_KEY" = "jwt-public-key" - "KAFKA_USERS_SELFCARE_WO_SASL_JAAS_CONFIG" = "eventhub-sc-users-selfcare-wo-connection-string-lc" + "STORAGE_APPLICATION_SECRET" = "contracts-storage-access-key" + "ADDRESS_EMAIL_NOTIFICATION_ADMIN" = "portal-admin-operator-email" + "APPLICATIONINSIGHTS_CONNECTION_STRING" = "appinsights-connection-string" + "MAIL_SENDER_ADDRESS" = "smtp-usr" + "MONGODB_CONNECTION_URI" = "mongodb-connection-string" + "BLOB_STORAGE_CONN_STRING" = "blob-storage-contract-connection-string" + "STORAGE_CREDENTIAL_SECRET" = "contracts-storage-access-key" + "KAFKA_CONTRACTS_SELFCARE_WO_SASL_JAAS_CONFIG" = "eventhub-sc-contracts-selfcare-wo-connection-string-lc" + "SMTP_USR" = "smtp-usr" + "SMTP_PSW" = "smtp-psw" + "ONBOARDING_INSTITUTION_ALTERNATIVE_EMAIL" = "party-test-institution-email" + "USER_REGISTRY_API_KEY" = "user-registry-api-key" + "JWT_TOKEN_PUBLIC_KEY" = "jwt-public-key" + "KAFKA_USERS_SELFCARE_WO_SASL_JAAS_CONFIG" = "eventhub-sc-users-selfcare-wo-connection-string-lc" } From 3c85a53839c0f55b1ef104a0a235012267124d1d Mon Sep 17 00:00:00 2001 From: manuraf Date: Fri, 29 Mar 2024 09:16:29 +0100 Subject: [PATCH 3/6] refer to main --- infra/container_apps/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infra/container_apps/main.tf b/infra/container_apps/main.tf index 174f6d50e..46c211ba0 100644 --- a/infra/container_apps/main.tf +++ b/infra/container_apps/main.tf @@ -9,7 +9,7 @@ provider "azurerm" { } module "container_app_core" { - source = "github.com/pagopa/selfcare-commons//infra/terraform-modules/container_app_microservice?ref=workload-profiles" + source = "github.com/pagopa/selfcare-commons//infra/terraform-modules/container_app_microservice?ref=main" is_pnpg = var.is_pnpg From 464c7cde008337c7a3579db872654ee3960fc877 Mon Sep 17 00:00:00 2001 From: manuraf Date: Fri, 29 Mar 2024 11:25:18 +0100 Subject: [PATCH 4/6] remove scales uat --- .../env/uat-pnpg/terraform.tfvars | 17 ++--------------- infra/container_apps/env/uat/terraform.tfvars | 17 ++--------------- 2 files changed, 4 insertions(+), 30 deletions(-) diff --git a/infra/container_apps/env/uat-pnpg/terraform.tfvars b/infra/container_apps/env/uat-pnpg/terraform.tfvars index 85b2bb9fd..7467eafdb 100644 --- a/infra/container_apps/env/uat-pnpg/terraform.tfvars +++ b/infra/container_apps/env/uat-pnpg/terraform.tfvars @@ -10,22 +10,9 @@ tags = { } container_app = { - min_replicas = 0 + min_replicas = 1 max_replicas = 2 - scale_rules = [ - { - custom = { - metadata = { - "desiredReplicas" = "1" - "start" = "0 8 * * MON-FRI" - "end" = "0 19 * * MON-FRI" - "timezone" = "Europe/Rome" - } - type = "cron" - } - name = "cron-scale-rule" - } - ] + scale_rules = [] cpu = 0.5 memory = "1Gi" } diff --git a/infra/container_apps/env/uat/terraform.tfvars b/infra/container_apps/env/uat/terraform.tfvars index b17f3a361..eaa733138 100644 --- a/infra/container_apps/env/uat/terraform.tfvars +++ b/infra/container_apps/env/uat/terraform.tfvars @@ -9,22 +9,9 @@ tags = { } container_app = { - min_replicas = 0 + min_replicas = 1 max_replicas = 2 - scale_rules = [ - { - custom = { - metadata = { - "desiredReplicas" = "1" - "start" = "0 8 * * MON-FRI" - "end" = "0 19 * * MON-FRI" - "timezone" = "Europe/Rome" - } - type = "cron" - } - name = "cron-scale-rule" - } - ] + scale_rules = [] cpu = 0.5 memory = "1Gi" } From 2c19ae357a0634d4eb55fde05ab4641f9e7ea512 Mon Sep 17 00:00:00 2001 From: manuraf Date: Fri, 29 Mar 2024 14:59:29 +0100 Subject: [PATCH 5/6] product ca url --- infra/container_apps/env/dev-pnpg/terraform.tfvars | 2 +- infra/container_apps/env/dev/terraform.tfvars | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/infra/container_apps/env/dev-pnpg/terraform.tfvars b/infra/container_apps/env/dev-pnpg/terraform.tfvars index 6412a99dd..9612bd4ff 100644 --- a/infra/container_apps/env/dev-pnpg/terraform.tfvars +++ b/infra/container_apps/env/dev-pnpg/terraform.tfvars @@ -177,7 +177,7 @@ app_settings = [ }, { name = "MS_PRODUCT_URL" - value = "https://dev01.pnpg.internal.dev.selfcare.pagopa.it/ms-product/v1" + value = "https://selc-d-pnpg-product-ca.whiteglacier-211c4885.westeurope.azurecontainerapps.io" }, { name = "USERVICE_USER_REGISTRY_URL" diff --git a/infra/container_apps/env/dev/terraform.tfvars b/infra/container_apps/env/dev/terraform.tfvars index ea5e462f4..1bb3871da 100644 --- a/infra/container_apps/env/dev/terraform.tfvars +++ b/infra/container_apps/env/dev/terraform.tfvars @@ -196,7 +196,7 @@ app_settings = [ }, { name = "MS_PRODUCT_URL" - value = "https://selc.internal.dev.selfcare.pagopa.it/ms-product/v1" + value = "https://selc-d-product-ca.livelydesert-633675bb.westeurope.azurecontainerapps.io" }, { name = "USERVICE_USER_REGISTRY_URL" From d5b2ee4f440cc0b7040c404913ca06a741da808d Mon Sep 17 00:00:00 2001 From: manuraf Date: Fri, 29 Mar 2024 15:19:00 +0100 Subject: [PATCH 6/6] workload_profile_name for pnpg --- infra/container_apps/env/dev-pnpg/terraform.tfvars | 1 + infra/container_apps/env/prod-pnpg/terraform.tfvars | 1 + infra/container_apps/env/uat-pnpg/terraform.tfvars | 1 + infra/container_apps/main.tf | 3 ++- infra/container_apps/variables.tf | 6 ++++++ 5 files changed, 11 insertions(+), 1 deletion(-) diff --git a/infra/container_apps/env/dev-pnpg/terraform.tfvars b/infra/container_apps/env/dev-pnpg/terraform.tfvars index 9612bd4ff..245bfadec 100644 --- a/infra/container_apps/env/dev-pnpg/terraform.tfvars +++ b/infra/container_apps/env/dev-pnpg/terraform.tfvars @@ -30,6 +30,7 @@ container_app = { memory = "1Gi" } +workload_profile_name = null app_settings = [ { diff --git a/infra/container_apps/env/prod-pnpg/terraform.tfvars b/infra/container_apps/env/prod-pnpg/terraform.tfvars index 121f18cfa..c39b9d5c0 100644 --- a/infra/container_apps/env/prod-pnpg/terraform.tfvars +++ b/infra/container_apps/env/prod-pnpg/terraform.tfvars @@ -30,6 +30,7 @@ container_app = { memory = "2.5Gi" } +workload_profile_name = null app_settings = [ { diff --git a/infra/container_apps/env/uat-pnpg/terraform.tfvars b/infra/container_apps/env/uat-pnpg/terraform.tfvars index 7467eafdb..9a6c60653 100644 --- a/infra/container_apps/env/uat-pnpg/terraform.tfvars +++ b/infra/container_apps/env/uat-pnpg/terraform.tfvars @@ -17,6 +17,7 @@ container_app = { memory = "1Gi" } +workload_profile_name = null app_settings = [ { diff --git a/infra/container_apps/main.tf b/infra/container_apps/main.tf index 46c211ba0..633100c0a 100644 --- a/infra/container_apps/main.tf +++ b/infra/container_apps/main.tf @@ -17,9 +17,10 @@ module "container_app_core" { container_app = var.container_app container_app_name = "ms-core" image_name = "selfcare-ms-core" - image_tag = var.image_tag + image_tag = "sha-61a02a8" app_settings = var.app_settings secrets_names = var.secrets_names + workload_profile_name = var.workload_profile_name tags = var.tags } diff --git a/infra/container_apps/variables.tf b/infra/container_apps/variables.tf index b9baf169a..9960e93a6 100644 --- a/infra/container_apps/variables.tf +++ b/infra/container_apps/variables.tf @@ -55,3 +55,9 @@ variable "secrets_names" { type = map(string) description = "KeyVault secrets to get values from" } + +variable "workload_profile_name" { + type = string + description = "Workload Profile name to use" + default = "Consumption" +} \ No newline at end of file