Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CES-68] Edit app backend APIM reference from weu to itn #1330

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mamu0
Copy link
Contributor

@mamu0 mamu0 commented Nov 21, 2024

Motivation and Context

For the migration of the APIM in italynorth, all the app backend resources will point to the new APIM, it will be applied after making the backup and restore on the new APIM in ITN.

Major Changes

Dependencies

Testing

Documentation

Other Considerations

Copy link

sonarcloud bot commented Nov 21, 2024

Copy link

📖 Terraform Plan ('src/common/prod') - failure

Terraform Plan
module.application_gateway_weu.data.azurerm_linux_web_app.ipatente_licences_app_itn: Still reading... [10s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.appservice_devportal_be: Still reading... [10s elapsed]
data.azurerm_linux_function_app.function_assets_cdn: Still reading... [10s elapsed]
data.azurerm_linux_function_app.io_sign_user: Still reading... [10s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.session_manager_03: Still reading... [10s elapsed]
data.azurerm_linux_function_app.lollipop_function: Still reading... [10s elapsed]
data.azurerm_linux_web_app.firmaconio_selfcare_web_app: Still reading... [10s elapsed]
data.azurerm_linux_function_app.io_fims_user: Still reading... [10s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.fims_op_app: Still reading... [10s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.ipatente_licences_app_itn: Still reading... [20s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.appservice_devportal_be: Still reading... [20s elapsed]
data.azurerm_linux_function_app.function_assets_cdn: Still reading... [20s elapsed]
data.azurerm_linux_function_app.io_sign_user: Still reading... [20s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.session_manager_03: Still reading... [20s elapsed]
data.azurerm_linux_function_app.lollipop_function: Still reading... [20s elapsed]
data.azurerm_linux_web_app.firmaconio_selfcare_web_app: Still reading... [20s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.session_manager_04: Still reading... [10s elapsed]
data.azurerm_linux_function_app.io_fims_user: Still reading... [20s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.fims_op_app: Still reading... [20s elapsed]
data.azurerm_linux_function_app.services_app_backend_function_app: Still reading... [10s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.session_manager_04: Still reading... [20s elapsed]
data.azurerm_linux_function_app.eucovidcert: Still reading... [10s elapsed]
module.application_gateway_weu.data.azurerm_key_vault_certificate.app_gw_ipatente_io: Still reading... [10s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.appservice_continua: Still reading... [10s elapsed]
data.azurerm_linux_function_app.function_profile[1]: Still reading... [10s elapsed]
data.azurerm_linux_function_app.function_profile[0]: Still reading... [10s elapsed]
data.azurerm_linux_function_app.wallet_user: Still reading... [10s elapsed]
data.azurerm_linux_function_app.services_app_backend_function_app: Still reading... [20s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.appservice_selfcare_be: Still reading... [10s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.cms_backoffice_app_itn: Still reading... [10s elapsed]
module.application_gateway_weu.data.azurerm_key_vault_certificate.app_gw_ipatente_io: Still reading... [20s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.ipatente_vehicles_app_itn: Still reading... [10s elapsed]
data.azurerm_linux_function_app.function_profile[1]: Still reading... [20s elapsed]
data.azurerm_linux_function_app.function_profile[0]: Still reading... [20s elapsed]
data.azurerm_linux_function_app.wallet_user: Still reading... [20s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.cms_backoffice_app_itn: Still reading... [20s elapsed]
data.azurerm_linux_function_app.app_messages_xl[
Error: a Certificate named "ipatente-io-pagopa-it" was not found in Key Vault at URI "https://io-p-kv.vault.azure.net/"

  with module.application_gateway_weu.data.azurerm_key_vault_certificate.app_gw_ipatente_io,
  on ../_modules/application_gateway/data.tf line 123, in data "azurerm_key_vault_certificate" "app_gw_ipatente_io":
 123: data "azurerm_key_vault_certificate" "app_gw_ipatente_io" {

0]: Still reading... [10s elapsed]
data.azurerm_linux_function_app.app_messages_xl[1]: Still reading... [10s elapsed]
module.application_gateway_weu.data.azurerm_key_vault_certificate.app_gw_ipatente_io: Still reading... [30s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.ipatente_vehicles_app_itn: Still reading... [20s elapsed]
data.azurerm_linux_function_app.app_messages_xl[0]: Still reading... [20s elapsed]
module.application_gateway_weu.data.azurerm_key_vault_certificate.app_gw_ipatente_io: Still reading... [40s elapsed]
module.application_gateway_weu.data.azurerm_key_vault_certificate.app_gw_ipatente_io: Still reading... [50s elapsed]
module.application_gateway_weu.data.azurerm_key_vault_certificate.app_gw_ipatente_io: Still reading... [1m0s elapsed]
module.application_gateway_weu.data.azurerm_key_vault_certificate.app_gw_ipatente_io: Still reading... [1m10s elapsed]
module.application_gateway_weu.data.azurerm_key_vault_certificate.app_gw_ipatente_io: Still reading... [1m20s elapsed]
module.application_gateway_weu.data.azurerm_key_vault_certificate.app_gw_ipatente_io: Still reading... [1m30s elapsed]
module.application_gateway_weu.data.azurerm_key_vault_certificate.app_gw_ipatente_io: Still reading... [1m40s elapsed]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform planned the following actions, but then encountered a problem:

  # module.application_gateway_weu.azurerm_web_application_firewall_policy.api_app will be updated in-place
  ~ resource "azurerm_web_application_firewall_policy" "api_app" {
        id                  = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-external/providers/Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies/io-p-waf-appgateway-api-app-policy"
        name                = "io-p-waf-appgateway-api-app-policy"
        tags                = {
            "CostCenter"  = "TS310 - PAGAMENTI & SERVIZI"
            "CreatedBy"   = "Terraform"
            "Environment" = "Prod"
            "Owner"       = "IO"
            "Source"      = "https://github.com/pagopa/io-infra"
        }
        # (4 unchanged attributes hidden)

      ~ policy_settings {
          ~ request_body_inspect_limit_in_kb          = 0 -> 128
            # (6 unchanged attributes hidden)
        }

        # (1 unchanged block hidden)
    }

  # module.cosmos_api_weu.azurerm_cosmosdb_sql_container.these["message-status"] will be updated in-place
  ~ resource "azurerm_cosmosdb_sql_container" "these" {
        id                  = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-internal/providers/Microsoft.DocumentDB/databaseAccounts/io-p-cosmos-api/sqlDatabases/db/containers/message-status"
        name                = "message-status"
        # (8 unchanged attributes hidden)

      ~ autoscale_settings {
          ~ max_throughput = 180000 -> 67000
        }

        # (2 unchanged blocks hidden)
    }

  # module.cosmos_api_weu.azurerm_cosmosdb_sql_container.these["messages"] will be updated in-place
  ~ resource "azurerm_cosmosdb_sql_container" "these" {
        id                  = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-internal/providers/Microsoft.DocumentDB/databaseAccounts/io-p-cosmos-api/sqlDatabases/db/containers/messages"
        name                = "messages"
        # (8 unchanged attributes hidden)

      ~ autoscale_settings {
          ~ max_throughput = 80000 -> 46000
        }

        # (2 unchanged blocks hidden)
    }

  # module.cosmos_api_weu.azurerm_cosmosdb_sql_container.these["profiles"] will be updated in-place
  ~ resource "azurerm_cosmosdb_sql_container" "these" {
        id                  = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-internal/providers/Microsoft.DocumentDB/databaseAccounts/io-p-cosmos-api/sqlDatabases/db/containers/profiles"
        name                = "profiles"
        # (7 unchanged attributes hidden)

      ~ autoscale_settings {
          ~ max_throughput = 80000 -> 48000
        }

        # (2 unchanged blocks hidden)
    }

  # module.app_backend_li_weu.module.appservice_app_backend.azurerm_linux_web_app.this will be updated in-place
  ~ resource "azurerm_linux_web_app" "this" {
      ~ app_settings                                   = {
          ~ "ALLOW_SESSION_HANDLER_IP_SOURCE_RANGE"           = "10.0.100.0/24" -> "10.20.100.0/24"
            # (112 unchanged elements hidden)
        }
        id                                             = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-linux/providers/Microsoft.Web/sites/io-p-app-appbackendli"
        name                                           = "io-p-app-appbackendli"
        tags                                           = {
            "CostCenter"                                     = "TS310 - PAGAMENTI & SERVIZI"
            "CreatedBy"                                      = "Terraform"
            "Environment"                                    = "Prod"
            "Owner"                                          = "IO"
            "Source"                                         = "https://github.com/pagopa/io-infra/blob/main/src/common/prod"
        }
        # (24 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # module.app_backend_li_weu.module.appservice_app_backend_slot_staging.azurerm_linux_web_app_slot.this will be updated in-place
  ~ resource "azurerm_linux_web_app_slot" "this" {
      ~ app_settings                                   = {
          ~ "ALLOW_SESSION_HANDLER_IP_SOURCE_RANGE"           = "10.0.100.0/24" -> "10.20.100.0/24"
            # (112 unchanged elements hidden)
        }
        id                                             = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-linux/providers/Microsoft.Web/sites/io-p-app-appbackendli/slots/staging"
        name                                           = "staging"
        tags                                           = {
            "CostCenter"  = "TS310 - PAGAMENTI & SERVIZI"
            "CreatedBy"   = "Terraform"
            "Environment" = "Prod"
            "Owner"       = "IO"
            "Source"      = "https://github.com/pagopa/io-infra/blob/main/src/common/prod"
        }
        # (24 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # module.app_backend_weu["1"].module.appservice_app_backend.azurerm_linux_web_app.this will be updated in-place
  ~ resource "azurerm_linux_web_app" "this" {
      ~ app_settings                                   = {
          ~ "ALLOW_SESSION_HANDLER_IP_SOURCE_RANGE"           = "10.0.100.0/24" -> "10.20.100.0/24"
            # (112 unchanged elements hidden)
        }
        id                                             = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-linux/providers/Microsoft.Web/sites/io-p-app-appbackendl1"
        name                                           = "io-p-app-appbackendl1"
        tags                                           = {
            "CostCenter"                                     = "TS310 - PAGAMENTI & SERVIZI"
            "CreatedBy"                                      = "Terraform"
            "Environment"                                    = "Prod"
            "Owner"                                          = "IO"
            "Source"                                         = "https://github.com/pagopa/io-infra/blob/main/src/common/prod"
        }
        # (24 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # module.app_backend_weu["1"].module.appservice_app_backend_slot_staging.azurerm_linux_web_app_slot.this will be updated in-place
  ~ resource "azurerm_linux_web_app_slot" "this" {
      ~ app_settings                                   = {
          ~ "ALLOW_SESSION_HANDLER_IP_SOURCE_RANGE"           = "10.0.100.0/24" -> "10.20.100.0/24"
            # (112 unchanged elements hidden)
        }
        id                                             = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-linux/providers/Microsoft.Web/sites/io-p-app-appbackendl1/slots/staging"
        name                                           = "staging"
        tags                                           = {
            "CostCenter"  = "TS310 - PAGAMENTI & SERVIZI"
            "CreatedBy"   = "Terraform"
            "Environment" = "Prod"
            "Owner"       = "IO"
            "Source"      = "https://github.com/pagopa/io-infra/blob/main/src/common/prod"
        }
        # (24 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # module.app_backend_weu["2"].module.appservice_app_backend.azurerm_linux_web_app.this will be updated in-place
  ~ resource "azurerm_linux_web_app" "this" {
      ~ app_settings                                   = {
          ~ "ALLOW_SESSION_HANDLER_IP_SOURCE_RANGE"           = "10.0.100.0/24" -> "10.20.100.0/24"
            # (112 unchanged elements hidden)
        }
        id                                             = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-linux/providers/Microsoft.Web/sites/io-p-app-appbackendl2"
        name                                           = "io-p-app-appbackendl2"
        tags                                           = {
            "CostCenter"                                     = "TS310 - PAGAMENTI & SERVIZI"
            "CreatedBy"                                      = "Terraform"
            "Environment"                                    = "Prod"
            "Owner"                                          = "IO"
            "Source"                                         = "https://github.com/pagopa/io-infra/blob/main/src/common/prod"
        }
        # (24 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # module.app_backend_weu["2"].module.appservice_app_backend_slot_staging.azurerm_linux_web_app_slot.this will be updated in-place
  ~ resource "azurerm_linux_web_app_slot" "this" {
      ~ app_settings                                   = {
          ~ "ALLOW_SESSION_HANDLER_IP_SOURCE_RANGE"           = "10.0.100.0/24" -> "10.20.100.0/24"
            # (112 unchanged elements hidden)
        }
        id                                             = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-linux/providers/Microsoft.Web/sites/io-p-app-appbackendl2/slots/staging"
        name                                           = "staging"
        tags                                           = {
            "CostCenter"  = "TS310 - PAGAMENTI & SERVIZI"
            "CreatedBy"   = "Terraform"
            "Environment" = "Prod"
            "Owner"       = "IO"
            "Source"      = "https://github.com/pagopa/io-infra/blob/main/src/common/prod"
        }
        # (24 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # module.app_backend_weu["3"].module.appservice_app_backend.azurerm_linux_web_app.this will be updated in-place
  ~ resource "azurerm_linux_web_app" "this" {
      ~ app_settings                                   = {
          ~ "ALLOW_SESSION_HANDLER_IP_SOURCE_RANGE"           = "10.0.100.0/24" -> "10.20.100.0/24"
            # (112 unchanged elements hidden)
        }
        id                                             = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-linux/providers/Microsoft.Web/sites/io-p-app-appbackendl3"
        name                                           = "io-p-app-appbackendl3"
        tags                                           = {
            "CostCenter"  = "TS310 - PAGAMENTI & SERVIZI"
            "CreatedBy"   = "Terraform"
            "Environment" = "Prod"
            "Owner"       = "IO"
            "Source"      = "https://github.com/pagopa/io-infra/blob/main/src/common/prod"
        }
        # (24 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # module.app_backend_weu["3"].module.appservice_app_backend_slot_staging.azurerm_linux_web_app_slot.this will be updated in-place
  ~ resource "azurerm_linux_web_app_slot" "this" {
      ~ app_settings                                   = {
          ~ "ALLOW_SESSION_HANDLER_IP_SOURCE_RANGE"           = "10.0.100.0/24" -> "10.20.100.0/24"
            # (112 unchanged elements hidden)
        }
        id                                             = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-linux/providers/Microsoft.Web/sites/io-p-app-appbackendl3/slots/staging"
        name                                           = "staging"
        tags                                           = {
            "CostCenter"  = "TS310 - PAGAMENTI & SERVIZI"
            "CreatedBy"   = "Terraform"
            "Environment" = "Prod"
            "Owner"       = "IO"
            "Source"      = "https://github.com/pagopa/io-infra/blob/main/src/common/prod"
        }
        # (24 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

Plan: 0 to add, 12 to change, 0 to destroy.

Warning: Argument is deprecated

  with module.application_gateway_weu.azurerm_web_application_firewall_policy.api_app,
  on ../_modules/application_gateway/firewall.tf line 62, in resource "azurerm_web_application_firewall_policy" "api_app":
  62:         disabled_rules = [
  63:           "942100",
  64:           "942120",
  65:           "942190",
  66:           "942200",
  67:           "942210",
  68:           "942240",
  69:           "942250",
  70:           "942260",
  71:           "942330",
  72:           "942340",
  73:           "942370",
  74:           "942380",
  75:           "942430",
  76:           "942440",
  77:           "942450",
  78:         ]

`disabled_rules` will be removed in favour of the `rule` property in version
4.0 of the AzureRM Provider.

(and 53 more similar warnings elsewhere)
::error::Terraform exited with code 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant