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

[#IOPID-2699] Add new function for async operations #194

Merged
merged 9 commits into from
Feb 17, 2025
Merged

Conversation

gquadrati
Copy link
Contributor

List of Changes

Motivation and Context

[#IOPID-2693] User re-engagement on session expiration

How Has This Been Tested?

tf plan

Screenshots (if appropriate):

Types of changes

  • Chore (nothing changes by a user perspective)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Copy link

changeset-bot bot commented Feb 12, 2025

⚠️ No Changeset found

Latest commit: 9d273f1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Feb 12, 2025

Jira Pull Request Link

This Pull Request refers to the following Jira issue IOPID-2699

@gquadrati gquadrati marked this pull request as ready for review February 12, 2025 15:27
@gquadrati gquadrati requested review from a team as code owners February 12, 2025 15:27
Copy link
Contributor

📖 Terraform Plan ('infra/resources/prod') - success

Terraform Plan
module.function_lv_autoscale.data.azurerm_linux_function_app.this[0]: Still reading... [10s elapsed]
module.function_lollipop_autoscale.data.azurerm_linux_function_app.this[0]: Still reading... [10s elapsed]
module.function_lv_autoscale.data.azurerm_linux_function_app.this[0]: Still reading... [20s elapsed]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
 <= read (data resources)

Terraform will perform the following actions:

  # azurerm_resource_group.main_resource_group will be created
  + resource "azurerm_resource_group" "main_resource_group" {
      + id       = (known after apply)
      + location = "italynorth"
      + name     = "io-p-itn-auth-main-rg-01"
      + tags     = {
          + "CostCenter"     = "TS310 - PAGAMENTI & SERVIZI"
          + "CreatedBy"      = "Terraform"
          + "Environment"    = "Prod"
          + "ManagementTeam" = "IO Auth&Identity"
          + "Owner"          = "IO"
          + "Source"         = "https://github.com/pagopa/io-auth-n-identity-domain/tree/main/infra/resources/prod"
        }
    }

  # module.function_profile_async.azurerm_linux_function_app.this will be created
  + resource "azurerm_linux_function_app" "this" {
      + app_settings                                   = (sensitive value)
      + builtin_logging_enabled                        = false
      + client_certificate_enabled                     = false
      + client_certificate_mode                        = "Optional"
      + content_share_force_disabled                   = false
      + custom_domain_verification_id                  = (sensitive value)
      + daily_memory_time_quota                        = 0
      + default_hostname                               = (known after apply)
      + enabled                                        = true
      + ftp_publish_basic_authentication_enabled       = true
      + functions_extension_version                    = "~4"
      + hosting_environment_id                         = (known after apply)
      + https_only                                     = true
      + id                                             = (known after apply)
      + key_vault_reference_identity_id                = (known after apply)
      + kind                                           = (known after apply)
      + location                                       = "italynorth"
      + name                                           = "io-p-itn-auth-profas-func-02"
      + outbound_ip_address_list                       = (known after apply)
      + outbound_ip_addresses                          = (known after apply)
      + possible_outbound_ip_address_list              = (known after apply)
      + possible_outbound_ip_addresses                 = (known after apply)
      + public_network_access_enabled                  = false
      + resource_group_name                            = "io-p-itn-auth-main-rg-01"
      + service_plan_id                                = (known after apply)
      + site_credential                                = (sensitive value)
      + storage_account_name                           = "iopitnauthprofasstfn02"
      + storage_uses_managed_identity                  = true
      + tags                                           = {
          + "CostCenter"     = "TS310 - PAGAMENTI & SERVIZI"
          + "CreatedBy"      = "Terraform"
          + "Environment"    = "Prod"
          + "ManagementTeam" = "IO Auth&Identity"
          + "Owner"          = "IO"
          + "Source"         = "https://github.com/pagopa/io-auth-n-identity-domain/tree/main/infra/resources/prod"
        }
      + virtual_network_subnet_id                      = (known after apply)
      + webdeploy_publish_basic_authentication_enabled = true
      + zip_deploy_file                                = (known after apply)

      + identity {
          + principal_id = (known after apply)
          + tenant_id    = (known after apply)
          + type         = "SystemAssigned"
        }

      + site_config {
          + always_on                               = true
          + app_scale_limit                         = (known after apply)
          + application_insights_connection_string  = (sensitive value)
          + container_registry_use_managed_identity = false
          + default_documents                       = (known after apply)
          + detailed_error_logging_enabled          = (known after apply)
          + elastic_instance_minimum                = (known after apply)
          + ftps_state                              = "Disabled"
          + health_check_eviction_time_in_min       = 2
          + health_check_path                       = "/info"
          + http2_enabled                           = true
          + ip_restriction_default_action           = "Deny"
          + linux_fx_version                        = (known after apply)
          + load_balancing_mode                     = "LeastRequests"
          + managed_pipeline_mode                   = "Integrated"
          + minimum_tls_version                     = "1.2"
          + pre_warmed_instance_count               = (known after apply)
          + remote_debugging_enabled                = false
          + remote_debugging_version                = (known after apply)
          + scm_ip_restriction_default_action       = "Allow"
          + scm_minimum_tls_version                 = "1.2"
          + scm_type                                = (known after apply)
          + scm_use_main_ip_restriction             = false
          + use_32_bit_worker                       = false
          + vnet_route_all_enabled                  = true
          + websockets_enabled                      = false
          + worker_count                            = (known after apply)

          + application_stack {
              + node_version                = "20"
              + use_dotnet_isolated_runtime = false
            }
        }

      + sticky_settings {
          + app_setting_names = [
              + "SLOT_TASK_HUBNAME",
              + "AzureFunctionsJobHost__extensions__durableTask__hubName",
              + "APPINSIGHTS_SAMPLING_PERCENTAGE",
              + "AzureFunctionsWebHost__hostid",
            ]
        }
    }

  # module.function_profile_async.azurerm_linux_function_app_slot.this[0] will be created
  + resource "azurerm_linux_function_app_slot" "this" {
      + app_settings                                   = (sensitive value)
      + builtin_logging_enabled                        = false
      + client_certificate_enabled                     = false
      + client_certificate_mode                        = "Optional"
      + content_share_force_disabled                   = false
      + custom_domain_verification_id                  = (sensitive value)
      + daily_memory_time_quota                        = 0
      + default_hostname                               = (known after apply)
      + enabled                                        = true
      + ftp_publish_basic_authentication_enabled       = true
      + function_app_id                                = (known after apply)
      + functions_extension_version                    = "~4"
      + hosting_environment_id                         = (known after apply)
      + https_only                                     = true
      + id                                             = (known after apply)
      + key_vault_reference_identity_id                = (known after apply)
      + kind                                           = (known after apply)
      + name                                           = "staging"
      + outbound_ip_address_list                       = (known after apply)
      + outbound_ip_addresses                          = (known after apply)
      + possible_outbound_ip_address_list              = (known after apply)
      + possible_outbound_ip_addresses                 = (known after apply)
      + public_network_access_enabled                  = false
      + site_credential                                = (sensitive value)
      + storage_account_name                           = "iopitnauthprofasstfn02"
      + storage_uses_managed_identity                  = true
      + tags                                           = {
          + "CostCenter"     = "TS310 - PAGAMENTI & SERVIZI"
          + "CreatedBy"      = "Terraform"
          + "Environment"    = "Prod"
          + "ManagementTeam" = "IO Auth&Identity"
          + "Owner"          = "IO"
          + "Source"         = "https://github.com/pagopa/io-auth-n-identity-domain/tree/main/infra/resources/prod"
        }
      + virtual_network_subnet_id                      = (known after apply)
      + webdeploy_publish_basic_authentication_enabled = true

      + identity {
          + principal_id = (known after apply)
          + tenant_id    = (known after apply)
          + type         = "SystemAssigned"
        }

      + site_config {
          + always_on                               = true
          + app_scale_limit                         = (known after apply)
          + application_insights_connection_string  = (sensitive value)
          + container_registry_use_managed_identity = false
          + default_documents                       = (known after apply)
          + detailed_error_logging_enabled          = (known after apply)
          + elastic_instance_minimum                = (known after apply)
          + ftps_state                              = "Disabled"
          + health_check_eviction_time_in_min       = 2
          + health_check_path                       = "/info"
          + http2_enabled                           = true
          + ip_restriction_default_action           = "Deny"
          + linux_fx_version                        = (known after apply)
          + load_balancing_mode                     = "LeastRequests"
          + managed_pipeline_mode                   = "Integrated"
          + minimum_tls_version                     = "1.2"
          + pre_warmed_instance_count               = (known after apply)
          + remote_debugging_enabled                = false
          + remote_debugging_version                = (known after apply)
          + scm_ip_restriction_default_action       = "Allow"
          + scm_minimum_tls_version                 = "1.2"
          + scm_type                                = (known after apply)
          + scm_use_main_ip_restriction             = false
          + use_32_bit_worker                       = false
          + vnet_route_all_enabled                  = true
          + websockets_enabled                      = false
          + worker_count                            = (known after apply)

          + application_stack {
              + node_version                = "20"
              + use_dotnet_isolated_runtime = false
            }
        }
    }

  # module.function_profile_async.azurerm_monitor_metric_alert.function_app_health_check[0] will be created
  + resource "azurerm_monitor_metric_alert" "function_app_health_check" {
      + auto_mitigate            = false
      + description              = "Function availability is under threshold level. Runbook: -"
      + enabled                  = true
      + frequency                = "PT5M"
      + id                       = (known after apply)
      + name                     = "io-p-itn-auth-profas-func-02] Health Check Failed"
      + resource_group_name      = "io-p-itn-auth-main-rg-01"
      + scopes                   = (known after apply)
      + severity                 = 1
      + tags                     = {
          + "CostCenter"     = "TS310 - PAGAMENTI & SERVIZI"
          + "CreatedBy"      = "Terraform"
          + "Environment"    = "Prod"
          + "ManagementTeam" = "IO Auth&Identity"
          + "Owner"          = "IO"
          + "Source"         = "https://github.com/pagopa/io-auth-n-identity-domain/tree/main/infra/resources/prod"
        }
      + target_resource_location = (known after apply)
      + target_resource_type     = (known after apply)
      + window_size              = "PT5M"

      + action {
          + action_group_id = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-itn-auth-common-rg-01/providers/Microsoft.Insights/actionGroups/io-p-itn-auth-error-ag-01"
        }

      + criteria {
          + aggregation            = "Average"
          + metric_name            = "HealthCheckStatus"
          + metric_namespace       = "Microsoft.Web/sites"
          + operator               = "LessThan"
          + skip_metric_validation = false
          + threshold              = 50
        }
    }

  # module.function_profile_async.azurerm_monitor_metric_alert.storage_account_health_check[0] will be created
  + resource "azurerm_monitor_metric_alert" "storage_account_health_check" {
      + auto_mitigate            = false
      + description              = "The average availability is less than 99.8%. Runbook: not needed."
      + enabled                  = true
      + frequency                = "PT5M"
      + id                       = (known after apply)
      + name                     = "[iopitnauthprofasstfn02] Low Availability"
      + resource_group_name      = "io-p-itn-auth-main-rg-01"
      + scopes                   = (known after apply)
      + severity                 = 0
      + tags                     = {
          + "CostCenter"     = "TS310 - PAGAMENTI & SERVIZI"
          + "CreatedBy"      = "Terraform"
          + "Environment"    = "Prod"
          + "ManagementTeam" = "IO Auth&Identity"
          + "Owner"          = "IO"
          + "Source"         = "https://github.com/pagopa/io-auth-n-identity-domain/tree/main/infra/resources/prod"
        }
      + target_resource_location = (known after apply)
      + target_resource_type     = (known after apply)
      + window_size              = "PT5M"

      + action {
          + action_group_id = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-itn-auth-common-rg-01/providers/Microsoft.Insights/actionGroups/io-p-itn-auth-error-ag-01"
        }

      + criteria {
          + aggregation            = "Average"
          + metric_name            = "Availability"
          + metric_namespace       = "Microsoft.Storage/storageAccounts"
          + operator               = "LessThan"
          + skip_metric_validation = false
          + threshold              = 99.8
        }
    }

  # module.function_profile_async.azurerm_private_endpoint.function_sites will be created
  + resource "azurerm_private_endpoint" "function_sites" {
      + custom_dns_configs       = (known after apply)
      + id                       = (known after apply)
      + location                 = "italynorth"
      + name                     = "io-p-itn-auth-profas-func-pep-02"
      + network_interface        = (known after apply)
      + private_dns_zone_configs = (known after apply)
      + resource_group_name      = "io-p-itn-auth-main-rg-01"
      + subnet_id                = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-itn-common-rg-01/providers/Microsoft.Network/virtualNetworks/io-p-itn-common-vnet-01/subnets/io-p-itn-pep-snet-01"
      + tags                     = {
          + "CostCenter"     = "TS310 - PAGAMENTI & SERVIZI"
          + "CreatedBy"      = "Terraform"
          + "Environment"    = "Prod"
          + "ManagementTeam" = "IO Auth&Identity"
          + "Owner"          = "IO"
          + "Source"         = "https://github.com/pagopa/io-auth-n-identity-domain/tree/main/infra/resources/prod"
        }

      + private_dns_zone_group {
          + id                   = (known after apply)
          + name                 = "private-dns-zone-group"
          + private_dns_zone_ids = [
              + "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-common/providers/Microsoft.Network/privateDnsZones/privatelink.azurewebsites.net",
            ]
        }

      + private_service_connection {
          + is_manual_connection           = false
          + name                           = "io-p-itn-auth-profas-func-pep-02"
          + private_connection_resource_id = (known after apply)
          + private_ip_address             = (known after apply)
          + subresource_names              = [
              + "sites",
            ]
        }
    }

  # module.function_profile_async.azurerm_private_endpoint.st_blob will be created
  + resource "azurerm_private_endpoint" "st_blob" {
      + custom_dns_configs       = (known after apply)
      + id                       = (known after apply)
      + location                 = "italynorth"
      + name                     = "io-p-itn-auth-profas-blob-pep-02"
      + network_interface        = (known after apply)
      + private_dns_zone_configs = (known after apply)
      + resource_group_name      = "io-p-itn-auth-main-rg-01"
      + subnet_id                = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-itn-common-rg-01/providers/Microsoft.Network/virtualNetworks/io-p-itn-common-vnet-01/subnets/io-p-itn-pep-snet-01"
      + tags                     = {
          + "CostCenter"     = "TS310 - PAGAMENTI & SERVIZI"
          + "CreatedBy"      = "Terraform"
          + "Environment"    = "Prod"
          + "ManagementTeam" = "IO Auth&Identity"
          + "Owner"          = "IO"
          + "Source"         = "https://github.com/pagopa/io-auth-n-identity-domain/tree/main/infra/resources/prod"
        }

      + private_dns_zone_group {
          + id                   = (known after apply)
          + name                 = "private-dns-zone-group"
          + private_dns_zone_ids = [
              + "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-common/providers/Microsoft.Network/privateDnsZones/privatelink.blob.core.windows.net",
            ]
        }

      + private_service_connection {
          + is_manual_connection           = false
          + name                           = "io-p-itn-auth-profas-blob-pep-02"
          + private_connection_resource_id = (known after apply)
          + private_ip_address             = (known after apply)
          + subresource_names              = [
              + "blob",
            ]
        }
    }

  # module.function_profile_async.azurerm_private_endpoint.st_file will be created
  + resource "azurerm_private_endpoint" "st_file" {
      + custom_dns_configs       = (known after apply)
      + id                       = (known after apply)
      + location                 = "italynorth"
      + name                     = "io-p-itn-auth-profas-file-pep-02"
      + network_interface        = (known after apply)
      + private_dns_zone_configs = (known after apply)
      + resource_group_name      = "io-p-itn-auth-main-rg-01"
      + subnet_id                = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-itn-common-rg-01/providers/Microsoft.Network/virtualNetworks/io-p-itn-common-vnet-01/subnets/io-p-itn-pep-snet-01"
      + tags                     = {
          + "CostCenter"     = "TS310 - PAGAMENTI & SERVIZI"
          + "CreatedBy"      = "Terraform"
          + "Environment"    = "Prod"
          + "ManagementTeam" = "IO Auth&Identity"
          + "Owner"          = "IO"
          + "Source"         = "https://github.com/pagopa/io-auth-n-identity-domain/tree/main/infra/resources/prod"
        }

      + private_dns_zone_group {
          + id                   = (known after apply)
          + name                 = "private-dns-zone-group"
          + private_dns_zone_ids = [
              + "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-common/providers/Microsoft.Network/privateDnsZones/privatelink.file.core.windows.net",
            ]
        }

      + private_service_connection {
          + is_manual_connection           = false
          + name                           = "io-p-itn-auth-profas-file-pep-02"
          + private_connection_resource_id = (known after apply)
          + private_ip_address             = (known after apply)
          + subresource_names              = [
              + "file",
            ]
        }
    }

  # module.function_profile_async.azurerm_private_endpoint.st_queue will be created
  + resource "azurerm_private_endpoint" "st_queue" {
      + custom_dns_configs       = (known after apply)
      + id                       = (known after apply)
      + location                 = "italynorth"
      + name                     = "io-p-itn-auth-profas-queue-pep-02"
      + network_interface        = (known after apply)
      + private_dns_zone_configs = (known after apply)
      + resource_group_name      = "io-p-itn-auth-main-rg-01"
      + subnet_id                = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-itn-common-rg-01/providers/Microsoft.Network/virtualNetworks/io-p-itn-common-vnet-01/subnets/io-p-itn-pep-snet-01"
      + tags                     = {
          + "CostCenter"     = "TS310 - PAGAMENTI & SERVIZI"
          + "CreatedBy"      = "Terraform"
          + "Environment"    = "Prod"
          + "ManagementTeam" = "IO Auth&Identity"
          + "Owner"          = "IO"
          + "Source"         = "https://github.com/pagopa/io-auth-n-identity-domain/tree/main/infra/resources/prod"
        }

      + private_dns_zone_group {
          + id                   = (known after apply)
          + name                 = "private-dns-zone-group"
          + private_dns_zone_ids = [
              + "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-common/providers/Microsoft.Network/privateDnsZones/privatelink.queue.core.windows.net",
            ]
        }

      + private_service_connection {
          + is_manual_connection           = false
          + name                           = "io-p-itn-auth-profas-queue-pep-02"
          + private_connection_resource_id = (known after apply)
          + private_ip_address             = (known after apply)
          + subresource_names              = [
              + "queue",
            ]
        }
    }

  # module.function_profile_async.azurerm_private_endpoint.staging_function_sites[0] will be created
  + resource "azurerm_private_endpoint" "staging_function_sites" {
      + custom_dns_configs       = (known after apply)
      + id                       = (known after apply)
      + location                 = "italynorth"
      + name                     = "io-p-itn-auth-profas-staging-func-pep-02"
      + network_interface        = (known after apply)
      + private_dns_zone_configs = (known after apply)
      + resource_group_name      = "io-p-itn-auth-main-rg-01"
      + subnet_id                = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-itn-common-rg-01/providers/Microsoft.Network/virtualNetworks/io-p-itn-common-vnet-01/subnets/io-p-itn-pep-snet-01"
      + tags                     = {
          + "CostCenter"     = "TS310 - PAGAMENTI & SERVIZI"
          + "CreatedBy"      = "Terraform"
          + "Environment"    = "Prod"
          + "ManagementTeam" = "IO Auth&Identity"
          + "Owner"          = "IO"
          + "Source"         = "https://github.com/pagopa/io-auth-n-identity-domain/tree/main/infra/resources/prod"
        }

      + private_dns_zone_group {
          + id                   = (known after apply)
          + name                 = "private-dns-zone-group"
          + private_dns_zone_ids = [
              + "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-common/providers/Microsoft.Network/privateDnsZones/privatelink.azurewebsites.net",
            ]
        }

      + private_service_connection {
          + is_manual_connection           = false
          + name                           = "io-p-itn-auth-profas-staging-func-pep-02"
          + private_connection_resource_id = (known after apply)
          + private_ip_address             = (known after apply)
          + subresource_names              = [
              + "sites-staging",
            ]
        }
    }

  # module.function_profile_async.azurerm_role_assignment.function_storage_account_contributor will be created
  + resource "azurerm_role_assignment" "function_storage_account_contributor" {
      + id                               = (known after apply)
      + name                             = (known after apply)
      + principal_id                     = (known after apply)
      + principal_type                   = (known after apply)
      + role_definition_id               = (known after apply)
      + role_definition_name             = "Storage Account Contributor"
      + scope                            = (known after apply)
      + skip_service_principal_aad_check = (known after apply)
    }

  # module.function_profile_async.azurerm_role_assignment.function_storage_blob_data_owner will be created
  + resource "azurerm_role_assignment" "function_storage_blob_data_owner" {
      + id                               = (known after apply)
      + name                             = (known after apply)
      + principal_id                     = (known after apply)
      + principal_type                   = (known after apply)
      + role_definition_id               = (known after apply)
      + role_definition_name             = "Storage Blob Data Owner"
      + scope                            = (known after apply)
      + skip_service_principal_aad_check = (known after apply)
    }

  # module.function_profile_async.azurerm_role_assignment.function_storage_queue_data_contributor will be created
  + resource "azurerm_role_assignment" "function_storage_queue_data_contributor" {
      + id                               = (known after apply)
      + name                             = (known after apply)
      + principal_id                     = (known after apply)
      + principal_type                   = (known after apply)
      + role_definition_id               = (known after apply)
      + role_definition_name             = "Storage Queue Data Contributor"
      + scope                            = (known after apply)
      + skip_service_principal_aad_check = (known after apply)
    }

  # module.function_profile_async.azurerm_role_assignment.staging_function_storage_account_contributor[0] will be created
  + resource "azurerm_role_assignment" "staging_function_storage_account_contributor" {
      + id                               = (known after apply)
      + name                             = (known after apply)
      + principal_id                     = (known after apply)
      + principal_type                   = (known after apply)
      + role_definition_id               = (known after apply)
      + role_definition_name             = "Storage Account Contributor"
      + scope                            = (known after apply)
      + skip_service_principal_aad_check = (known after apply)
    }

  # module.function_profile_async.azurerm_role_assignment.staging_function_storage_blob_data_owner[0] will be created
  + resource "azurerm_role_assignment" "staging_function_storage_blob_data_owner" {
      + id                               = (known after apply)
      + name                             = (known after apply)
      + principal_id                     = (known after apply)
      + principal_type                   = (known after apply)
      + role_definition_id               = (known after apply)
      + role_definition_name             = "Storage Blob Data Owner"
      + scope                            = (known after apply)
      + skip_service_principal_aad_check = (known after apply)
    }

  # module.function_profile_async.azurerm_role_assignment.staging_function_storage_queue_data_contributor[0] will be created
  + resource "azurerm_role_assignment" "staging_function_storage_queue_data_contributor" {
      + id                               = (known after apply)
      + name                             = (known after apply)
      + principal_id                     = (known after apply)
      + principal_type                   = (known after apply)
      + role_definition_id               = (known after apply)
      + role_definition_name             = "Storage Queue Data Contributor"
      + scope                            = (known after apply)
      + skip_service_principal_aad_check = (known after apply)
    }

  # module.function_profile_async.azurerm_service_plan.this[0] will be created
  + resource "azurerm_service_plan" "this" {
      + id                           = (known after apply)
      + kind                         = (known after apply)
      + location                     = "italynorth"
      + maximum_elastic_worker_count = (known after apply)
      + name                         = "io-p-itn-auth-profas-asp-02"
      + os_type                      = "Linux"
      + per_site_scaling_enabled     = false
      + reserved                     = (known after apply)
      + resource_group_name          = "io-p-itn-auth-main-rg-01"
      + sku_name                     = "P1v3"
      + tags                         = {
          + "CostCenter"     = "TS310 - PAGAMENTI & SERVIZI"
          + "CreatedBy"      = "Terraform"
          + "Environment"    = "Prod"
          + "ManagementTeam" = "IO Auth&Identity"
          + "Owner"          = "IO"
          + "Source"         = "https://github.com/pagopa/io-auth-n-identity-domain/tree/main/infra/resources/prod"
        }
      + worker_count                 = (known after apply)
      + zone_balancing_enabled       = true
    }

  # module.function_profile_async.azurerm_storage_account.this will be created
  + resource "azurerm_storage_account" "this" {
      + access_tier                        = (known after apply)
      + account_kind                       = "StorageV2"
      + account_replication_type           = "ZRS"
      + account_tier                       = "Standard"
      + allow_nested_items_to_be_public    = false
      + cross_tenant_replication_enabled   = true
      + default_to_oauth_authentication    = true
      + dns_endpoint_type                  = "Standard"
      + enable_https_traffic_only          = (known after apply)
      + https_traffic_only_enabled         = (known after apply)
      + id                                 = (known after apply)
      + infrastructure_encryption_enabled  = false
      + is_hns_enabled                     = false
      + large_file_share_enabled           = (known after apply)
      + local_user_enabled                 = true
      + location                           = "italynorth"
      + min_tls_version                    = "TLS1_2"
      + name                               = "iopitnauthprofasstfn02"
      + nfsv3_enabled                      = false
      + primary_access_key                 = (sensitive value)
      + primary_blob_connection_string     = (sensitive value)
      + primary_blob_endpoint              = (known after apply)
      + primary_blob_host                  = (known after apply)
      + primary_blob_internet_endpoint     = (known after apply)
      + primary_blob_internet_host         = (known after apply)
      + primary_blob_microsoft_endpoint    = (known after apply)
      + primary_blob_microsoft_host        = (known after apply)
      + primary_connection_string          = (sensitive value)
      + primary_dfs_endpoint               = (known after apply)
      + primary_dfs_host                   = (known after apply)
      + primary_dfs_internet_endpoint      = (known after apply)
      + primary_dfs_internet_host          = (known after apply)
      + primary_dfs_microsoft_endpoint     = (known after apply)
      + primary_dfs_microsoft_host         = (known after apply)
      + primary_file_endpoint              = (known after apply)
      + primary_file_host                  = (known after apply)
      + primary_file_internet_endpoint     = (known after apply)
      + primary_file_internet_host         = (known after apply)
      + primary_file_microsoft_endpoint    = (known after apply)
      + primary_file_microsoft_host        = (known after apply)
      + primary_location                   = (known after apply)
      + primary_queue_endpoint             = (known after apply)
      + primary_queue_host                 = (known after apply)
      + primary_queue_microsoft_endpoint   = (known after apply)
      + primary_queue_microsoft_host       = (known after apply)
      + primary_table_endpoint             = (known after apply)
      + primary_table_host                 = (known after apply)
      + primary_table_microsoft_endpoint   = (known after apply)
      + primary_table_microsoft_host       = (known after apply)
      + primary_web_endpoint               = (known after apply)
      + primary_web_host                   = (known after apply)
      + primary_web_internet_endpoint      = (known after apply)
      + primary_web_internet_host          = (known after apply)
      + primary_web_microsoft_endpoint     = (known after apply)
      + primary_web_microsoft_host         = (known after apply)
      + public_network_access_enabled      = false
      + queue_encryption_key_type          = "Service"
      + resource_group_name                = "io-p-itn-auth-main-rg-01"
      + secondary_access_key               = (sensitive value)
      + secondary_blob_connection_string   = (sensitive value)
      + secondary_blob_endpoint            = (known after apply)
      + secondary_blob_host                = (known after apply)
      + secondary_blob_internet_endpoint   = (known after apply)
      + secondary_blob_internet_host       = (known after apply)
      + secondary_blob_microsoft_endpoint  = (known after apply)
      + secondary_blob_microsoft_host      = (known after apply)
      + secondary_connection_string        = (sensitive value)
      + secondary_dfs_endpoint             = (known after apply)
      + secondary_dfs_host                 = (known after apply)
      + secondary_dfs_internet_endpoint    = (known after apply)
      + secondary_dfs_internet_host        = (known after apply)
      + secondary_dfs_microsoft_endpoint   = (known after apply)
      + secondary_dfs_microsoft_host       = (known after apply)
      + secondary_file_endpoint            = (known after apply)
      + secondary_file_host                = (known after apply)
      + secondary_file_internet_endpoint   = (known after apply)
      + secondary_file_internet_host       = (known after apply)
      + secondary_file_microsoft_endpoint  = (known after apply)
      + secondary_file_microsoft_host      = (known after apply)
      + secondary_location                 = (known after apply)
      + secondary_queue_endpoint           = (known after apply)
      + secondary_queue_host               = (known after apply)
      + secondary_queue_microsoft_endpoint = (known after apply)
      + secondary_queue_microsoft_host     = (known after apply)
      + secondary_table_endpoint           = (known after apply)
      + secondary_table_host               = (known after apply)
      + secondary_table_microsoft_endpoint = (known after apply)
      + secondary_table_microsoft_host     = (known after apply)
      + secondary_web_endpoint             = (known after apply)
      + secondary_web_host                 = (known after apply)
      + secondary_web_internet_endpoint    = (known after apply)
      + secondary_web_internet_host        = (known after apply)
      + secondary_web_microsoft_endpoint   = (known after apply)
      + secondary_web_microsoft_host       = (known after apply)
      + sftp_enabled                       = false
      + shared_access_key_enabled          = false
      + table_encryption_key_type          = "Service"
      + tags                               = {
          + "CostCenter"     = "TS310 - PAGAMENTI & SERVIZI"
          + "CreatedBy"      = "Terraform"
          + "Environment"    = "Prod"
          + "ManagementTeam" = "IO Auth&Identity"
          + "Owner"          = "IO"
          + "Source"         = "https://github.com/pagopa/io-auth-n-identity-domain/tree/main/infra/resources/prod"
        }

      + blob_properties (known after apply)

      + network_rules (known after apply)

      + queue_properties (known after apply)

      + routing (known after apply)

      + share_properties (known after apply)
    }

  # module.function_profile_async.azurerm_storage_account_network_rules.st_network_rules will be created
  + resource "azurerm_storage_account_network_rules" "st_network_rules" {
      + bypass             = [
          + "AzureServices",
          + "Logging",
          + "Metrics",
        ]
      + default_action     = "Deny"
      + id                 = (known after apply)
      + storage_account_id = (known after apply)
    }

  # module.function_profile_async.azurerm_subnet.this[0] will be created
  + resource "azurerm_subnet" "this" {
      + address_prefixes                               = [
          + "10.20.29.0/26",
        ]
      + default_outbound_access_enabled                = true
      + enforce_private_link_endpoint_network_policies = (known after apply)
      + enforce_private_link_service_network_policies  = (known after apply)
      + id                                             = (known after apply)
      + name                                           = "io-p-itn-auth-profas-func-snet-02"
      + private_endpoint_network_policies              = (known after apply)
      + private_endpoint_network_policies_enabled      = (known after apply)
      + private_link_service_network_policies_enabled  = (known after apply)
      + resource_group_name                            = "io-p-itn-common-rg-01"
      + service_endpoints                              = [
          + "Microsoft.Web",
        ]
      + virtual_network_name                           = "io-p-itn-common-vnet-01"

      + delegation {
          + name = "default"

          + service_delegation {
              + actions = [
                  + "Microsoft.Network/virtualNetworks/subnets/action",
                ]
              + name    = "Microsoft.Web/serverFarms"
            }
        }
    }

  # module.function_profile_async_autoscale.data.azurerm_linux_function_app.this[0] will be read during apply
  # (depends on a resource or a module with changes pending)
 <= data "azurerm_linux_function_app" "this" {
      + app_settings                                   = (known after apply)
      + auth_settings                                  = (known after apply)
      + auth_settings_v2                               = (known after apply)
      + availability                                   = (known after apply)
      + backup                                         = (known after apply)
      + builtin_logging_enabled                        = (known after apply)
      + client_certificate_enabled                     = (known after apply)
      + client_certificate_exclusion_paths             = (known after apply)
      + client_certificate_mode                        = (known after apply)
      + connection_string                              = (known after apply)
      + content_share_force_disabled                   = (known after apply)
      + custom_domain_verification_id                  = (sensitive value)
      + daily_memory_time_quota                        = (known after apply)
      + default_hostname                               = (known after apply)
      + enabled                                        = (known after apply)
      + ftp_publish_basic_authentication_enabled       = (known after apply)
      + functions_extension_version                    = (known after apply)
      + hosting_environment_id                         = (known after apply)
      + https_only                                     = (known after apply)
      + id                                             = (known after apply)
      + identity                                       = (known after apply)
      + kind                                           = (known after apply)
      + location                                       = (known after apply)
      + name                                           = "io-p-itn-auth-profas-func-02"
      + outbound_ip_address_list                       = (known after apply)
      + outbound_ip_addresses                          = (known after apply)
      + possible_outbound_ip_address_list              = (known after apply)
      + possible_outbound_ip_addresses                 = (known after apply)
      + public_network_access_enabled                  = (known after apply)
      + resource_group_name                            = "io-p-itn-auth-main-rg-01"
      + service_plan_id                                = (known after apply)
      + site_config                                    = (known after apply)
      + site_credential                                = (sensitive value)
      + sticky_settings                                = (known after apply)
      + storage_account_access_key                     = (sensitive value)
      + storage_account_name                           = (known after apply)
      + storage_key_vault_secret_id                    = (known after apply)
      + storage_uses_managed_identity                  = (known after apply)
      + tags                                           = (known after apply)
      + usage                                          = (known after apply)
      + virtual_network_subnet_id                      = (known after apply)
      + webdeploy_publish_basic_authentication_enabled = (known after apply)
    }

  # module.function_profile_async_autoscale.azurerm_monitor_autoscale_setting.this will be created
  + resource "azurerm_monitor_autoscale_setting" "this" {
      + enabled             = true
      + id                  = (known after apply)
      + location            = (known after apply)
      + name                = "io-p-itn-auth-profas-as-02"
      + resource_group_name = "io-p-itn-auth-main-rg-01"
      + tags                = {
          + "CostCenter"     = "TS310 - PAGAMENTI & SERVIZI"
          + "CreatedBy"      = "Terraform"
          + "Environment"    = "Prod"
          + "ManagementTeam" = "IO Auth&Identity"
          + "Owner"          = "IO"
          + "Source"         = "https://github.com/pagopa/io-auth-n-identity-domain/tree/main/infra/resources/prod"
        }
      + target_resource_id  = (known after apply)

      + profile {
          + name = "Default"

          + capacity {
              + default = 10
              + maximum = 30
              + minimum = 3
            }

          + rule {
              + metric_trigger {
                  + divide_by_instance_count = true
                  + metric_name              = "Requests"
                  + metric_namespace         = "microsoft.web/sites"
                  + metric_resource_id       = (known after apply)
                  + operator                 = "GreaterThan"
                  + statistic                = "Max"
                  + threshold                = 2500
                  + time_aggregation         = "Average"
                  + time_grain               = "PT1M"
                  + time_window              = "PT1M"
                }
              + scale_action {
                  + cooldown  = "PT1M"
                  + direction = "Increase"
                  + type      = "ChangeCount"
                  + value     = 2
                }
            }
          + rule {
              + metric_trigger {
                  + divide_by_instance_count = true
                  + metric_name              = "Requests"
                  + metric_namespace         = "microsoft.web/sites"
                  + metric_resource_id       = (known after apply)
                  + operator                 = "LessThan"
                  + statistic                = "Average"
                  + threshold                = 200
                  + time_aggregation         = "Average"
                  + time_grain               = "PT1M"
                  + time_window              = "PT5M"
                }
              + scale_action {
                  + cooldown  = "PT1M"
                  + direction = "Decrease"
                  + type      = "ChangeCount"
                  + value     = 1
                }
            }
          + rule {
              + metric_trigger {
                  + divide_by_instance_count = false
                  + metric_name              = "CpuPercentage"
                  + metric_namespace         = "microsoft.web/serverfarms"
                  + metric_resource_id       = (known after apply)
                  + operator                 = "GreaterThan"
                  + statistic                = "Max"
                  + threshold                = 35
                  + time_aggregation         = "Maximum"
                  + time_grain               = "PT1M"
                  + time_window              = "PT1M"
                }
              + scale_action {
                  + cooldown  = "PT1M"
                  + direction = "Increase"
                  + type      = "ChangeCount"
                  + value     = 3
                }
            }
          + rule {
              + metric_trigger {
                  + divide_by_instance_count = false
                  + metric_name              = "CpuPercentage"
                  + metric_namespace         = "microsoft.web/serverfarms"
                  + metric_resource_id       = (known after apply)
                  + operator                 = "LessThan"
                  + statistic                = "Average"
                  + threshold                = 15
                  + time_aggregation         = "Average"
                  + time_grain               = "PT1M"
                  + time_window              = "PT5M"
                }
              + scale_action {
                  + cooldown  = "PT20M"
                  + direction = "Decrease"
                  + type      = "ChangeCount"
                  + value     = 1
                }
            }
        }
    }

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

Warning: Deprecated Resource

  with data.azurerm_app_service_plan.shared_plan_itn,
  on data.tf line 35, in data "azurerm_app_service_plan" "shared_plan_itn":
  35: data "azurerm_app_service_plan" "shared_plan_itn" {

The `azurerm_app_service_plan` data source has been superseded by the
`azurerm_service_plan` data source. Whilst this resource will continue to be
available in the 2.x and 3.x releases it is feature-frozen for compatibility
purposes, will no longer receive any updates and will be removed in a future
major release of the Azure Provider.

(and 5 more similar warnings elsewhere)

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.

@arcogabbo arcogabbo added this pull request to the merge queue Feb 17, 2025
Merged via the queue into main with commit 736dfbf Feb 17, 2025
7 checks passed
@arcogabbo arcogabbo deleted the IOPID-2699 branch February 17, 2025 13:10
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.

2 participants