diff --git a/src/main/terraform/container_app.tf b/src/main/terraform/container_app.tf index 607f723..06147b0 100644 --- a/src/main/terraform/container_app.tf +++ b/src/main/terraform/container_app.tf @@ -119,36 +119,36 @@ resource "azurerm_container_app" "auth" { secret_name = "identity-client-id" } - liveness_probe { - path = "/q/health/live" - port = 8080 - transport = "HTTP" - initial_delay = 0 - interval_seconds = 10 - failure_count_threshold = 3 - timeout = 1 - } - - readiness_probe { - path = "/q/health/ready" - port = 8080 - transport = "HTTP" - initial_delay = 0 - interval_seconds = 10 - failure_count_threshold = 3 - success_count_threshold = 1 - timeout = 1 - } - - startup_probe { - path = "/q/health/started" - port = 8080 - transport = "HTTP" - initial_delay = 0 - interval_seconds = 10 - failure_count_threshold = 3 - timeout = 1 - } + #liveness_probe { + # path = "/q/health/live" + # port = 8080 + # transport = "HTTP" + # initial_delay = 0 + # interval_seconds = 10 + # failure_count_threshold = 3 + # timeout = 1 + #} + + #readiness_probe { + # path = "/q/health/ready" + # port = 8080 + # transport = "HTTP" + # initial_delay = 0 + # interval_seconds = 10 + # failure_count_threshold = 3 + # success_count_threshold = 1 + # timeout = 1 + #} + + #startup_probe { + # path = "/q/health/started" + # port = 8080 + # transport = "HTTP" + # initial_delay = 0 + # interval_seconds = 10 + # failure_count_threshold = 3 + # timeout = 1 + #} } max_replicas = var.mil_auth_max_replicas diff --git a/src/main/terraform/container_app_arm.off b/src/main/terraform/container_app_arm.off deleted file mode 100644 index 97785ce..0000000 --- a/src/main/terraform/container_app_arm.off +++ /dev/null @@ -1,189 +0,0 @@ -resource "azurerm_resource_group_template_deployment" "auth_arm" { - name = "${local.project}-auth-ca-arm" - resource_group_name = data.azurerm_container_app_environment.mil.resource_group_name - deployment_mode = "Incremental" - tags = local.tags - - template_content = <<-EOT - { - "$schema":"https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion":"1.0.0.0", - "parameters":{}, - "variables":{}, - "resources":[ - { - "name":"${local.project}-auth-ca-arm", - "type":"Microsoft.App/containerApps", - "apiVersion": "2024-10-02-preview", - "location":"${var.location}", - "properties":{ - "managedEnvironmentId":"${data.azurerm_container_app_environment.mil.id}", - "environmentId":"${data.azurerm_container_app_environment.mil.id}", - "configuration":{ - "secrets":[ - { - "name":"cosmosdb-account-mil-primary-mongodb-connection-string", - "keyVaultUrl":"${data.azurerm_key_vault.general.vault_uri}secrets/${var.cosmosdb_account_primary_mongodb_connection_string_kv_secret}", - "identity":"${data.azurerm_user_assigned_identity.auth.id}" - }, - { - "name":"cosmosdb-account-mil-secondary-mongodb-connection-string", - "keyVaultUrl":"${data.azurerm_key_vault.general.vault_uri}secrets/${var.cosmosdb_account_secondary_mongodb_connection_string_kv_secret}", - "identity":"${data.azurerm_user_assigned_identity.auth.id}" - }, - { - "name":"identity-client-id", - "value":"${data.azurerm_user_assigned_identity.auth.client_id}" - }, - { - "name":"key-vault-auth-vault-uri", - "keyVaultUrl":"${data.azurerm_key_vault.general.vault_uri}secrets/${var.key_vault_auth_vault_uri_kv_secret}", - "identity":"${data.azurerm_user_assigned_identity.auth.id}" - }, - { - "name":"application-insigths-mil-connection-string", - "keyVaultUrl":"${data.azurerm_key_vault.general.vault_uri}secrets/${var.application_insigths_connection_string_kv_secret}", - "identity":"${data.azurerm_user_assigned_identity.auth.id}" - } - ], - "activeRevisionsMode":"Single", - "ingress":{ - "external":true, - "targetPort":8080, - "transport":"Http", - "traffic":[ - { - "weight":100, - "latestRevision":true - } - ] - }, - "maxInactiveRevisions":5 - }, - "template":{ - "containers":[ - { - "image":"${var.mil_auth_image}", - "imageType":"ContainerImage", - "name":"mil-auth", - "env":[ - { - "name":"TZ", - "value":"Europe/Rome" - }, - { - "name":"auth.quarkus-log-level", - "value":"${var.mil_auth_quarkus_log_level}" - }, - { - "name":"auth.quarkus-rest-client-logging-scope", - "value":"${var.mil_auth_quarkus_rest_client_logging_scope}" - }, - { - "name":"auth.app-log-level", - "value":"${var.mil_auth_app_log_level}" - }, - { - "name":"auth.cryptoperiod", - "value":"${var.mil_auth_cryptoperiod}" - }, - { - "name":"auth.keysize", - "value":"${var.mil_auth_keysize}" - }, - { - "name":"auth.access.duration", - "value":"${var.mil_auth_access_duration}" - }, - { - "name":"auth.refresh.duration", - "value":"${var.mil_auth_refresh_duration}" - }, - { - "name":"auth.keyvault.url", - "secretRef":"key-vault-auth-vault-uri" - }, - { - "name":"auth.base-url", - "value":"${var.mil_auth_base_url}" - }, - { - "name":"application-insights.connection-string", - "secretRef":"application-insigths-mil-connection-string" - }, - { - "name":"auth.json-log", - "value":"${var.mil_auth_json_log}" - }, - { - "name":"auth.keyvault.maxresults", - "value":"${var.mil_auth_keyvault_maxresults}" - }, - { - "name":"auth.keyvault.backoff.number-of-attempts", - "value":"${var.mil_auth_keyvault_backoff_num_of_attempts}" - }, - { - "name":"jwt-publickey-location", - "value":"http://127.0.0.1:8080/.well-known/jwks.json" - }, - { - "name":"mongodb.connect-timeout", - "value":"${var.mil_auth_mongodb_connect_timeout}" - }, - { - "name":"mongodb.read-timeout", - "value":"${var.mil_auth_mongodb_read_timeout}" - }, - { - "name":"mongodb.server-selection-timeout", - "value":"${var.mil_auth_mongodb_server_selection_timeout}" - }, - { - "name":"mongodb.connection-string-1", - "secretRef":"cosmosdb-account-mil-primary-mongodb-connection-string" - }, - { - "name":"mongodb.connection-string-2", - "secretRef":"cosmosdb-account-mil-secondary-mongodb-connection-string" - }, - { - "name":"IDENTITY_CLIENT_ID", - "secretRef":"identity-client-id" - } - ], - "resources":{ - "cpu":"${var.mil_auth_cpu}", - "memory":"${var.mil_auth_memory}" - } - } - ], - "scale":{ - "minReplicas":"${var.mil_auth_min_replicas}", - "maxReplicas":"${var.mil_auth_max_replicas}", - "cooldownPeriod":120, - "pollingInterval":5, - "rules":[ - { - "name":"http-requests", - "http":{ - "metadata":{ - "concurrentRequests":"25" - } - } - } - ] - } - } - }, - "identity":{ - "type":"UserAssigned", - "userAssignedIdentities":{ - "${data.azurerm_user_assigned_identity.auth.id}":{} - } - } - } - ] - } - EOT -}