Skip to content

update appinsights to use 100gb daily cap#376

Open
npv0 wants to merge 1 commit intomasterfrom
update-appinsights-to-100
Open

update appinsights to use 100gb daily cap#376
npv0 wants to merge 1 commit intomasterfrom
update-appinsights-to-100

Conversation

@npv0
Copy link
Copy Markdown

@npv0 npv0 commented Mar 6, 2026

No description provided.

@hmcts-jenkins-cnp
Copy link
Copy Markdown
Contributor

Plan Result (stg)

⚠️ Resource Deletion will happen

This plan contains resource delete operation. Please check the plan result very carefully!

Plan: 38 to add, 8 to change, 7 to destroy.
  • Create
    • azurerm_monitor_diagnostic_setting.migration-diagnostic[0]
    • module.postgresql_flexible[0].azurerm_postgresql_flexible_server.pgsql_server
    • module.postgresql_flexible[0].azurerm_postgresql_flexible_server_active_directory_administrator.pgsql_adadmin
    • module.postgresql_flexible[0].azurerm_postgresql_flexible_server_active_directory_administrator.pgsql_principal_admin[0]
    • module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["azure.enable_temp_tablespaces_on_local_ssd"]
    • module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["azure.extensions"]
    • module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["backslash_quote"]
    • module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["checkpoint_timeout"]
    • module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["effective_io_concurrency"]
    • module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["logfiles.download_enable"]
    • module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["logfiles.retention_days"]
    • module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["maintenance_work_mem"]
    • module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["max_parallel_maintenance_workers"]
    • module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["max_parallel_workers"]
    • module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["max_parallel_workers_per_gather"]
    • module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["max_wal_size"]
    • module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["max_worker_processes"]
    • module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["metrics.collector_database_activity"]
    • module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["min_wal_size"]
    • module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["pg_qs.query_capture_mode"]
    • module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["pgms_wait_sampling.query_capture_mode"]
    • module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["random_page_cost"]
    • module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["shared_buffers"]
    • module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["track_io_timing"]
    • module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["work_mem"]
    • module.postgresql_flexible[0].azurerm_postgresql_flexible_server_database.pg_databases["psql-stg-darts-replica"]
    • module.postgresql_flexible[0].azurerm_postgresql_flexible_server_database.pg_databases["psql-stg-dartsmig-01"]
    • module.postgresql_flexible[0].azurerm_postgresql_flexible_server_database.pg_databases["psql-stg-detsmig-01"]
    • module.sa.time_rotating.rotate
    • module.sa-dets-standard[0].time_rotating.rotate
    • module.sa-migration-standard[0].time_rotating.rotate
  • Update
    • azurerm_key_vault_secret.POSTGRES_HOST[0]
    • azurerm_linux_virtual_machine.migration[0]
    • azurerm_windows_virtual_machine.modernisation_windows["stgdartsmidmock"]
    • module.application_insights.azurerm_application_insights.this
    • module.sa.azurerm_storage_account.storage_account
    • module.sa.azurerm_storage_container.container["darts-inbound-container"]
    • module.sa-dets-standard[0].azurerm_storage_account.storage_account
    • module.sa-migration-standard[0].azurerm_storage_account.storage_account
  • Replace
    • module.application_insights.azurerm_monitor_activity_log_alert.main[0]
    • module.postgresql_flexible[0].null_resource.set-user-permissions-additionaldbs["psql-stg-darts-replica"]
    • module.postgresql_flexible[0].null_resource.set-user-permissions-additionaldbs["psql-stg-dartsmig-01"]
    • module.postgresql_flexible[0].null_resource.set-user-permissions-additionaldbs["psql-stg-detsmig-01"]
    • module.sa.time_static.pim_expiry
    • module.sa-dets-standard[0].time_static.pim_expiry
    • module.sa-migration-standard[0].time_static.pim_expiry
Change Result (Click me)
  # azurerm_key_vault_secret.POSTGRES_HOST[0] will be updated in-place
  ~ resource "azurerm_key_vault_secret" "POSTGRES_HOST" {
        id                      = "https://darts-migration-stg.vault.azure.net/secrets/POSTGRES-HOST/55074b2fb123472a9437a07392f0f43a"
        name                    = "POSTGRES-HOST"
        tags                    = {}
      ~ value                   = (sensitive value)
        # (7 unchanged attributes hidden)
    }

  # azurerm_linux_virtual_machine.migration[0] will be updated in-place
  ~ resource "azurerm_linux_virtual_machine" "migration" {
        id                                                     = "/subscriptions/74dacd4f-a248-45bb-a2f0-af700dc4cf68/resourceGroups/darts-migration-stg-rg/providers/Microsoft.Compute/virtualMachines/migration-vm"
        name                                                   = "migration-vm"
      ~ patch_assessment_mode                                  = "AutomaticByPlatform" -> "ImageDefault"
        tags                                                   = {
            "application"         = "darts"
            "autoShutdown"        = "true"
            "builtFrom"           = "https://github.com/HMCTS/darts-shared-infrastructure.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#darts-devs"
            "environment"         = "staging"
            "managedBy"           = "Darts Modernisation"
        }
        # (39 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # azurerm_monitor_diagnostic_setting.migration-diagnostic[0] will be created
  + resource "azurerm_monitor_diagnostic_setting" "migration-diagnostic" {
      + id                             = (known after apply)
      + log_analytics_destination_type = (known after apply)
      + log_analytics_workspace_id     = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/oms-automation/providers/Microsoft.OperationalInsights/workspaces/hmcts-nonprod"
      + name                           = "migration-postgres-diagnostics"
      + target_resource_id             = (known after apply)

      + enabled_log {
          + category       = "PostgreSQLFlexDatabaseXacts"
            # (1 unchanged attribute hidden)
        }
      + enabled_log {
          + category       = "PostgreSQLFlexQueryStoreRuntime"
            # (1 unchanged attribute hidden)
        }
      + enabled_log {
          + category       = "PostgreSQLFlexQueryStoreWaitStats"
            # (1 unchanged attribute hidden)
        }
      + enabled_log {
          + category       = "PostgreSQLFlexSessions"
            # (1 unchanged attribute hidden)
        }
      + enabled_log {
          + category       = "PostgreSQLFlexTableStats"
            # (1 unchanged attribute hidden)
        }
      + enabled_log {
          + category       = "PostgreSQLLogs"
            # (1 unchanged attribute hidden)
        }

      + metric {
          + category = "AllMetrics"
          + enabled  = true
        }
    }

  # azurerm_windows_virtual_machine.modernisation_windows["stgdartsmidmock"] will be updated in-place
  ~ resource "azurerm_windows_virtual_machine" "modernisation_windows" {
        id                                                     = "/subscriptions/74dacd4f-a248-45bb-a2f0-af700dc4cf68/resourceGroups/darts-stg-rg/providers/Microsoft.Compute/virtualMachines/stgdartsmidmock"
        name                                                   = "stgdartsmidmock"
      ~ patch_assessment_mode                                  = "AutomaticByPlatform" -> "ImageDefault"
        tags                                                   = {
            "application"         = "darts"
            "autoShutdown"        = "true"
            "builtFrom"           = "https://github.com/HMCTS/darts-shared-infrastructure.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#darts-devs"
            "environment"         = "staging"
            "managedBy"           = "Darts Modernisation"
        }
        # (41 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # module.application_insights.azurerm_application_insights.this will be updated in-place
  ~ resource "azurerm_application_insights" "this" {
        id                                    = "/subscriptions/74dacd4f-a248-45bb-a2f0-af700dc4cf68/resourceGroups/darts-stg-rg/providers/Microsoft.Insights/components/darts-stg"
        name                                  = "darts-stg"
      ~ sampling_percentage                   = 100 -> 1
        tags                                  = {
            "application"         = "darts"
            "autoShutdown"        = "true"
            "builtFrom"           = "https://github.com/HMCTS/darts-shared-infrastructure.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#darts-devs"
            "environment"         = "staging"
            "managedBy"           = "Darts Modernisation"
        }
        # (15 unchanged attributes hidden)
    }

  # module.application_insights.azurerm_monitor_activity_log_alert.main[0] must be replaced
-/+ resource "azurerm_monitor_activity_log_alert" "main" {
      ~ id                  = "/subscriptions/74dacd4f-a248-45bb-a2f0-af700dc4cf68/resourceGroups/darts-stg-rg/providers/Microsoft.Insights/activityLogAlerts/Application Insights daily cap reached - darts-stg" -> (known after apply)
      ~ name                = "Application Insights daily cap reached - darts-stg" -> "Application-Insights-daily-cap-reached-darts-stg" # forces replacement
        tags                = {
            "application"         = "darts"
            "autoShutdown"        = "true"
            "builtFrom"           = "https://github.com/HMCTS/darts-shared-infrastructure.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#darts-devs"
            "environment"         = "staging"
            "managedBy"           = "Darts Modernisation"
        }
        # (5 unchanged attributes hidden)

      ~ criteria {
          - levels                  = [] -> null
          - resource_groups         = [] -> null
          - resource_ids            = [] -> null
          - resource_providers      = [] -> null
          - resource_types          = [] -> null
          - statuses                = [] -> null
          - sub_statuses            = [] -> null
            # (13 unchanged attributes hidden)

          ~ resource_health (known after apply)

          ~ service_health (known after apply)
        }

        # (1 unchanged block hidden)
    }

  # module.postgresql_flexible[0].azurerm_postgresql_flexible_server.pgsql_server will be created
  + resource "azurerm_postgresql_flexible_server" "pgsql_server" {
      + administrator_login           = "pgadmin"
      + administrator_password        = (sensitive value)
      + auto_grow_enabled             = true
      + backup_retention_days         = 35
      + create_mode                   = "Default"
      + delegated_subnet_id           = "/subscriptions/74dacd4f-a248-45bb-a2f0-af700dc4cf68/resourceGroups/darts-migration-stg-rg/providers/Microsoft.Network/virtualNetworks/migration-vnet/subnets/postgres-sn"
      + fqdn                          = (known after apply)
      + geo_redundant_backup_enabled  = false
      + id                            = (known after apply)
      + location                      = "uksouth"
      + name                          = "darts-migration-stg"
      + private_dns_zone_id           = "/subscriptions/1baf5470-1c3e-40d3-a6f7-74bfbce4b348/resourceGroups/core-infra-intsvc-rg/providers/Microsoft.Network/privateDnsZones/private.postgres.database.azure.com"
      + public_network_access_enabled = false
      + resource_group_name           = "darts-migration-stg-rg"
      + sku_name                      = "GP_Standard_D32ds_v5"
      + storage_mb                    = 8388608
      + storage_tier                  = (known after apply)
      + tags                          = {
          + "application"         = "darts"
          + "autoShutdown"        = "true"
          + "builtFrom"           = "https://github.com/HMCTS/darts-shared-infrastructure.git"
          + "businessArea"        = "Cross-Cutting"
          + "contactSlackChannel" = "#darts-devs"
          + "environment"         = "staging"
          + "managedBy"           = "Darts Modernisation"
        }
      + version                       = "16"

      + authentication {
          + active_directory_auth_enabled = true
          + password_auth_enabled         = true
          + tenant_id                     = "531ff96d-0ae9-462a-8d2d-bec7c0b42082"
        }

      + high_availability {
          + mode = "ZoneRedundant"
        }

      + maintenance_window {
          + day_of_week  = 0
          + start_hour   = 3
          + start_minute = 0
        }
    }

  # module.postgresql_flexible[0].azurerm_postgresql_flexible_server_active_directory_administrator.pgsql_adadmin will be created
  + resource "azurerm_postgresql_flexible_server_active_directory_administrator" "pgsql_adadmin" {
      + id                  = (known after apply)
      + object_id           = "3c52c98b-07a3-4a97-92b9-298e86bb1ca9"
      + principal_name      = "DTS Platform Operations PostgreSQL Admin Access"
      + principal_type      = "Group"
      + resource_group_name = "darts-migration-stg-rg"
      + server_name         = "darts-migration-stg"
      + tenant_id           = "531ff96d-0ae9-462a-8d2d-bec7c0b42082"
    }

  # module.postgresql_flexible[0].azurerm_postgresql_flexible_server_active_directory_administrator.pgsql_principal_admin[0] will be created
  + resource "azurerm_postgresql_flexible_server_active_directory_administrator" "pgsql_principal_admin" {
      + id                  = (known after apply)
      + object_id           = "7ef3b6ce-3974-41ab-8512-c3ef4bb8ae01"
      + principal_name      = "jenkins-ptl-mi"
      + principal_type      = "ServicePrincipal"
      + resource_group_name = "darts-migration-stg-rg"
      + server_name         = "darts-migration-stg"
      + tenant_id           = "531ff96d-0ae9-462a-8d2d-bec7c0b42082"
    }

  # module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["azure.enable_temp_tablespaces_on_local_ssd"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "azure.enable_temp_tablespaces_on_local_ssd"
      + server_id = (known after apply)
      + value     = "off"
    }

  # module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["azure.extensions"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "azure.extensions"
      + server_id = (known after apply)
      + value     = "PG_STAT_STATEMENTS,PG_TRGM"
    }

  # module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["backslash_quote"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "backslash_quote"
      + server_id = (known after apply)
      + value     = "on"
    }

  # module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["checkpoint_timeout"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "checkpoint_timeout"
      + server_id = (known after apply)
      + value     = "1800"
    }

  # module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["effective_io_concurrency"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "effective_io_concurrency"
      + server_id = (known after apply)
      + value     = "200"
    }

  # module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["logfiles.download_enable"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "logfiles.download_enable"
      + server_id = (known after apply)
      + value     = "ON"
    }

  # module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["logfiles.retention_days"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "logfiles.retention_days"
      + server_id = (known after apply)
      + value     = "7"
    }

  # module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["maintenance_work_mem"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "maintenance_work_mem"
      + server_id = (known after apply)
      + value     = "2097151"
    }

  # module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["max_parallel_maintenance_workers"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "max_parallel_maintenance_workers"
      + server_id = (known after apply)
      + value     = "4"
    }

  # module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["max_parallel_workers"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "max_parallel_workers"
      + server_id = (known after apply)
      + value     = "32"
    }

  # module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["max_parallel_workers_per_gather"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "max_parallel_workers_per_gather"
      + server_id = (known after apply)
      + value     = "4"
    }

  # module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["max_wal_size"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "max_wal_size"
      + server_id = (known after apply)
      + value     = "4096"
    }

  # module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["max_worker_processes"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "max_worker_processes"
      + server_id = (known after apply)
      + value     = "32"
    }

  # module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["metrics.collector_database_activity"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "metrics.collector_database_activity"
      + server_id = (known after apply)
      + value     = "ON"
    }

  # module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["min_wal_size"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "min_wal_size"
      + server_id = (known after apply)
      + value     = "1024"
    }

  # module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["pg_qs.query_capture_mode"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "pg_qs.query_capture_mode"
      + server_id = (known after apply)
      + value     = "ALL"
    }

  # module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["pgms_wait_sampling.query_capture_mode"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "pgms_wait_sampling.query_capture_mode"
      + server_id = (known after apply)
      + value     = "ALL"
    }

  # module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["random_page_cost"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "random_page_cost"
      + server_id = (known after apply)
      + value     = "1.1"
    }

  # module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["shared_buffers"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "shared_buffers"
      + server_id = (known after apply)
      + value     = "6835200"
    }

  # module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["track_io_timing"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "track_io_timing"
      + server_id = (known after apply)
      + value     = "ON"
    }

  # module.postgresql_flexible[0].azurerm_postgresql_flexible_server_configuration.pgsql_server_config["work_mem"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "work_mem"
      + server_id = (known after apply)
      + value     = "83886"
    }

  # module.postgresql_flexible[0].azurerm_postgresql_flexible_server_database.pg_databases["psql-stg-darts-replica"] will be created
  + resource "azurerm_postgresql_flexible_server_database" "pg_databases" {
      + charset   = "utf8"
      + collation = "en_GB.utf8"
      + id        = (known after apply)
      + name      = "psql-stg-darts-replica"
      + server_id = (known after apply)
    }

  # module.postgresql_flexible[0].azurerm_postgresql_flexible_server_database.pg_databases["psql-stg-dartsmig-01"] will be created
  + resource "azurerm_postgresql_flexible_server_database" "pg_databases" {
      + charset   = "utf8"
      + collation = "en_GB.utf8"
      + id        = (known after apply)
      + name      = "psql-stg-dartsmig-01"
      + server_id = (known after apply)
    }

  # module.postgresql_flexible[0].azurerm_postgresql_flexible_server_database.pg_databases["psql-stg-detsmig-01"] will be created
  + resource "azurerm_postgresql_flexible_server_database" "pg_databases" {
      + charset   = "utf8"
      + collation = "en_GB.utf8"
      + id        = (known after apply)
      + name      = "psql-stg-detsmig-01"
      + server_id = (known after apply)
    }

  # module.postgresql_flexible[0].null_resource.set-user-permissions-additionaldbs["psql-stg-darts-replica"] must be replaced
-/+ resource "null_resource" "set-user-permissions-additionaldbs" {
      ~ id       = "2488335066106243249" -> (known after apply)
      ~ triggers = { # forces replacement
          + "db_reader_schemas" = "public"
          ~ "script_hash"       = "dbe0102f3129d4463913d5e01177e806bc6954005bdd98f20c242658634a1bbc" -> "88abfc1a97fc27a8f4d01362525f3b65e85409d3a475ecc79b11ad09a019e469"
            # (3 unchanged elements hidden)
        }
    }

  # module.postgresql_flexible[0].null_resource.set-user-permissions-additionaldbs["psql-stg-dartsmig-01"] must be replaced
-/+ resource "null_resource" "set-user-permissions-additionaldbs" {
      ~ id       = "4394650145881236016" -> (known after apply)
      ~ triggers = { # forces replacement
          + "db_reader_schemas" = "public"
          ~ "script_hash"       = "dbe0102f3129d4463913d5e01177e806bc6954005bdd98f20c242658634a1bbc" -> "88abfc1a97fc27a8f4d01362525f3b65e85409d3a475ecc79b11ad09a019e469"
            # (3 unchanged elements hidden)
        }
    }

  # module.postgresql_flexible[0].null_resource.set-user-permissions-additionaldbs["psql-stg-detsmig-01"] must be replaced
-/+ resource "null_resource" "set-user-permissions-additionaldbs" {
      ~ id       = "233501147688105496" -> (known after apply)
      ~ triggers = { # forces replacement
          + "db_reader_schemas" = "public"
          ~ "script_hash"       = "dbe0102f3129d4463913d5e01177e806bc6954005bdd98f20c242658634a1bbc" -> "88abfc1a97fc27a8f4d01362525f3b65e85409d3a475ecc79b11ad09a019e469"
            # (3 unchanged elements hidden)
        }
    }

  # module.sa.azurerm_storage_account.storage_account will be updated in-place
  ~ resource "azurerm_storage_account" "storage_account" {
        id                                 = "/subscriptions/74dacd4f-a248-45bb-a2f0-af700dc4cf68/resourceGroups/darts-stg-rg/providers/Microsoft.Storage/storageAccounts/dartssastg"
        name                               = "dartssastg"
      ~ tags                               = {
            "application"         = "darts"
          ~ "autoShutdown"        = "false" -> "true"
            "builtFrom"           = "https://github.com/HMCTS/darts-shared-infrastructure.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#darts-devs"
            "environment"         = "staging"
            "managedBy"           = "Darts Modernisation"
        }
        # (96 unchanged attributes hidden)

      + network_rules {
          + bypass         = [
              + "AzureServices",
            ]
          + default_action = "Allow"
        }

        # (3 unchanged blocks hidden)
    }

  # module.sa.azurerm_storage_container.container["darts-inbound-container"] will be updated in-place
  ~ resource "azurerm_storage_container" "container" {
      ~ container_access_type             = "container" -> "private"
        id                                = "https://dartssastg.blob.core.windows.net/darts-inbound-container"
        name                              = "darts-inbound-container"
        # (7 unchanged attributes hidden)
    }

  # module.sa.time_rotating.rotate will be created
  + resource "time_rotating" "rotate" {
      + day              = (known after apply)
      + hour             = (known after apply)
      + id               = (known after apply)
      + minute           = (known after apply)
      + month            = (known after apply)
      + rfc3339          = (known after apply)
      + rotation_days    = 360
      + rotation_rfc3339 = (known after apply)
      + second           = (known after apply)
      + unix             = (known after apply)
      + year             = (known after apply)
    }

  # module.sa.time_static.pim_expiry must be replaced
-/+ resource "time_static" "pim_expiry" {
      ~ day     = 7 -> (known after apply)
      ~ hour    = 10 -> (known after apply)
      ~ id      = "2025-11-07T10:47:15Z" -> (known after apply)
      ~ minute  = 47 -> (known after apply)
      ~ month   = 11 -> (known after apply)
      ~ rfc3339 = "2025-11-07T10:47:15Z" -> (known after apply) # forces replacement
      ~ second  = 15 -> (known after apply)
      ~ unix    = 1762512435 -> (known after apply)
      ~ year    = 2025 -> (known after apply)
    }

  # module.sa-dets-standard[0].azurerm_storage_account.storage_account will be updated in-place
  ~ resource "azurerm_storage_account" "storage_account" {
        id                                 = "/subscriptions/74dacd4f-a248-45bb-a2f0-af700dc4cf68/resourceGroups/darts-stg-rg/providers/Microsoft.Storage/storageAccounts/stgdetsdarts"
        name                               = "stgdetsdarts"
        tags                               = {
            "application"         = "darts"
            "autoShutdown"        = "true"
            "builtFrom"           = "https://github.com/HMCTS/darts-shared-infrastructure.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#darts-devs"
            "environment"         = "staging"
            "managedBy"           = "Darts Modernisation"
        }
        # (96 unchanged attributes hidden)

      + network_rules {
          + bypass         = [
              + "AzureServices",
            ]
          + default_action = "Allow"
        }

        # (3 unchanged blocks hidden)
    }

  # module.sa-dets-standard[0].time_rotating.rotate will be created
  + resource "time_rotating" "rotate" {
      + day              = (known after apply)
      + hour             = (known after apply)
      + id               = (known after apply)
      + minute           = (known after apply)
      + month            = (known after apply)
      + rfc3339          = (known after apply)
      + rotation_days    = 360
      + rotation_rfc3339 = (known after apply)
      + second           = (known after apply)
      + unix             = (known after apply)
      + year             = (known after apply)
    }

  # module.sa-dets-standard[0].time_static.pim_expiry must be replaced
-/+ resource "time_static" "pim_expiry" {
      ~ day     = 21 -> (known after apply)
      ~ hour    = 15 -> (known after apply)
      ~ id      = "2025-06-21T15:51:13Z" -> (known after apply)
      ~ minute  = 51 -> (known after apply)
      ~ month   = 6 -> (known after apply)
      ~ rfc3339 = "2025-06-21T15:51:13Z" -> (known after apply) # forces replacement
      ~ second  = 13 -> (known after apply)
      ~ unix    = 1750521073 -> (known after apply)
      ~ year    = 2025 -> (known after apply)
    }

  # module.sa-migration-standard[0].azurerm_storage_account.storage_account will be updated in-place
  ~ resource "azurerm_storage_account" "storage_account" {
        id                                 = "/subscriptions/74dacd4f-a248-45bb-a2f0-af700dc4cf68/resourceGroups/darts-migration-stg-rg/providers/Microsoft.Storage/storageAccounts/sastgdartsmig02"
        name                               = "sastgdartsmig02"
        tags                               = {
            "application"         = "darts"
            "autoShutdown"        = "true"
            "builtFrom"           = "https://github.com/HMCTS/darts-shared-infrastructure.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#darts-devs"
            "environment"         = "staging"
            "managedBy"           = "Darts Modernisation"
        }
        # (96 unchanged attributes hidden)

      + network_rules {
          + bypass         = [
              + "AzureServices",
            ]
          + default_action = "Allow"
        }

        # (3 unchanged blocks hidden)
    }

  # module.sa-migration-standard[0].time_rotating.rotate will be created
  + resource "time_rotating" "rotate" {
      + day              = (known after apply)
      + hour             = (known after apply)
      + id               = (known after apply)
      + minute           = (known after apply)
      + month            = (known after apply)
      + rfc3339          = (known after apply)
      + rotation_days    = 360
      + rotation_rfc3339 = (known after apply)
      + second           = (known after apply)
      + unix             = (known after apply)
      + year             = (known after apply)
    }

  # module.sa-migration-standard[0].time_static.pim_expiry must be replaced
-/+ resource "time_static" "pim_expiry" {
      ~ day     = 12 -> (known after apply)
      ~ hour    = 11 -> (known after apply)
      ~ id      = "2026-01-12T11:09:29Z" -> (known after apply)
      ~ minute  = 9 -> (known after apply)
      ~ month   = 1 -> (known after apply)
      ~ rfc3339 = "2026-01-12T11:09:29Z" -> (known after apply) # forces replacement
      ~ second  = 29 -> (known after apply)
      ~ unix    = 1768216169 -> (known after apply)
      ~ year    = 2026 -> (known after apply)
    }

Plan: 38 to add, 8 to change, 7 to destroy.
ℹ️ Objects have changed outside of Terraform

This feature was introduced from Terraform v0.15.4.

Terraform detected the following changes made outside of Terraform since the
last "terraform apply" which may have affected this plan:

  # module.postgresql_flexible[0].azurerm_postgresql_flexible_server.pgsql_server has been deleted
  - resource "azurerm_postgresql_flexible_server" "pgsql_server" {
      - administrator_login               = "pgadmin" -> null
      - administrator_password            = (sensitive value) -> null
      - fqdn                              = "darts-migration-stg.postgres.database.azure.com" -> null
      - id                                = "/subscriptions/74dacd4f-a248-45bb-a2f0-af700dc4cf68/resourceGroups/darts-migration-stg-rg/providers/Microsoft.DBforPostgreSQL/flexibleServers/darts-migration-stg" -> null
      - name                              = "darts-migration-stg" -> null
      - resource_group_name               = "darts-migration-stg-rg" -> null
        tags                              = {
            "application"         = "darts"
            "autoShutdown"        = "true"
            "builtFrom"           = "https://github.com/HMCTS/darts-shared-infrastructure.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#darts-devs"
            "environment"         = "staging"
            "managedBy"           = "Darts Modernisation"
        }
        # (15 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # module.sa.time_rotating.rotate has been deleted
  - resource "time_rotating" "rotate" {
        id               = "2024-11-12T10:47:15Z"
      - rotation_rfc3339 = "2025-11-07T10:47:15Z" -> null
        # (9 unchanged attributes hidden)
    }

  # module.sa-dets-standard[0].time_rotating.rotate has been deleted
  - resource "time_rotating" "rotate" {
        id               = "2024-06-26T15:51:13Z"
      - rotation_rfc3339 = "2025-06-21T15:51:13Z" -> null
        # (9 unchanged attributes hidden)
    }

  # module.sa-migration-standard[0].time_rotating.rotate has been deleted
  - resource "time_rotating" "rotate" {
        id               = "2025-01-17T11:09:29Z"
      - rotation_rfc3339 = "2026-01-12T11:09:29Z" -> null
        # (9 unchanged attributes hidden)
    }


Unless you have made equivalent changes to your configuration, or ignored the

@hmcts-jenkins-cnp
Copy link
Copy Markdown
Contributor

Plan Result (prod)

⚠️ Resource Deletion will happen

This plan contains resource delete operation. Please check the plan result very carefully!

Plan: 18 to add, 21 to change, 8 to destroy.
  • Create
    • azurerm_managed_disk.mig-01-disk[0]
    • azurerm_managed_disk.migration_os[0]
    • azurerm_role_assignment.storage_owner_quarantine[0]
    • azurerm_role_assignment.storage_owner_standard[0]
    • module.postgresql_flexible[0].azurerm_postgresql_flexible_server_database.pg_databases["psql-prod-darts-replica"]
    • module.postgresql_flexible[0].azurerm_postgresql_flexible_server_database.pg_databases["psql-prod-dartsmig-01"]
    • module.postgresql_flexible[0].azurerm_postgresql_flexible_server_database.pg_databases["psql-prod-detsmig-01"]
    • module.sa.time_rotating.rotate
    • module.sa-migration-quarantine[0].time_rotating.rotate
    • module.sa-migration-standard[0].time_rotating.rotate
  • Update
    • azurerm_linux_virtual_machine.dock-linux["prddartsmigdock"]
    • azurerm_linux_virtual_machine.gitlab-linux["prddartsgitlab"]
    • azurerm_linux_virtual_machine.migration[0]
    • azurerm_linux_virtual_machine.migration-linux["prddartsmigdb01"]
    • azurerm_linux_virtual_machine.migration-linux2["prddartsmigdb02"]
    • azurerm_linux_virtual_machine.oracle["prddartsmigora01"]
    • azurerm_logic_app_standard.logic[0]
    • azurerm_managed_disk.shared_disk[0]
    • azurerm_managed_disk.shared_disk_backup[0]
    • azurerm_windows_virtual_machine.migration_windows["prddartsassess"]
    • azurerm_windows_virtual_machine.migration_windows["prddartsassure"]
    • azurerm_windows_virtual_machine.migration_windows["prddartsmig01"]
    • azurerm_windows_virtual_machine.migration_windows["prddartsmig02"]
    • azurerm_windows_virtual_machine.migration_windows["prddartsmig03"]
    • azurerm_windows_virtual_machine.migration_windows["prddartsmig04"]
    • azurerm_windows_virtual_machine.migration_windows["prddartsmig05"]
    • azurerm_windows_virtual_machine.migration_windows["prddartsoracle"]
    • azurerm_windows_virtual_machine.migration_windows["prddartsunstr"]
    • module.application_insights.azurerm_application_insights.this
    • module.sa.azurerm_storage_account.storage_account
    • module.sa-migration-standard[0].azurerm_storage_account.storage_account
  • Replace
    • module.application_insights.azurerm_monitor_activity_log_alert.main[0]
    • module.postgresql_flexible[0].azurerm_postgresql_flexible_server_active_directory_administrator.pgsql_adadmin
    • module.postgresql_flexible[0].null_resource.set-user-permissions-additionaldbs["psql-prod-darts-replica"]
    • module.postgresql_flexible[0].null_resource.set-user-permissions-additionaldbs["psql-prod-dartsmig-01"]
    • module.postgresql_flexible[0].null_resource.set-user-permissions-additionaldbs["psql-prod-detsmig-01"]
    • module.sa.time_static.pim_expiry
    • module.sa-migration-quarantine[0].time_static.pim_expiry
    • module.sa-migration-standard[0].time_static.pim_expiry
Change Result (Click me)
  # azurerm_linux_virtual_machine.dock-linux["prddartsmigdock"] will be updated in-place
  ~ resource "azurerm_linux_virtual_machine" "dock-linux" {
        id                                                     = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/darts-migration-prod-rg/providers/Microsoft.Compute/virtualMachines/prddartsmigdock"
        name                                                   = "prddartsmigdock"
      ~ patch_assessment_mode                                  = "AutomaticByPlatform" -> "ImageDefault"
        tags                                                   = {
            "application"         = "darts"
            "builtFrom"           = "https://github.com/HMCTS/darts-shared-infrastructure.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#darts-devs"
            "environment"         = "production"
            "managedBy"           = "Darts Modernisation"
        }
        # (39 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # azurerm_linux_virtual_machine.gitlab-linux["prddartsgitlab"] will be updated in-place
  ~ resource "azurerm_linux_virtual_machine" "gitlab-linux" {
        id                                                     = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/darts-migration-prod-rg/providers/Microsoft.Compute/virtualMachines/prddartsgitlab"
        name                                                   = "prddartsgitlab"
      ~ patch_assessment_mode                                  = "AutomaticByPlatform" -> "ImageDefault"
        tags                                                   = {
            "application"         = "darts"
            "builtFrom"           = "https://github.com/HMCTS/darts-shared-infrastructure.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#darts-devs"
            "environment"         = "production"
            "managedBy"           = "Darts Modernisation"
        }
        # (39 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # azurerm_linux_virtual_machine.migration[0] will be updated in-place
  ~ resource "azurerm_linux_virtual_machine" "migration" {
        id                                                     = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/darts-migration-prod-rg/providers/Microsoft.Compute/virtualMachines/migration-vm"
        name                                                   = "migration-vm"
      ~ patch_assessment_mode                                  = "AutomaticByPlatform" -> "ImageDefault"
        tags                                                   = {
            "application"         = "darts"
            "builtFrom"           = "https://github.com/HMCTS/darts-shared-infrastructure.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#darts-devs"
            "environment"         = "production"
            "managedBy"           = "Darts Modernisation"
        }
        # (39 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # azurerm_linux_virtual_machine.migration-linux["prddartsmigdb01"] will be updated in-place
  ~ resource "azurerm_linux_virtual_machine" "migration-linux" {
        id                                                     = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/darts-migration-prod-rg/providers/Microsoft.Compute/virtualMachines/prddartsmigdb01"
        name                                                   = "prddartsmigdb01"
      ~ patch_assessment_mode                                  = "AutomaticByPlatform" -> "ImageDefault"
        tags                                                   = {
            "application"         = "darts"
            "builtFrom"           = "https://github.com/HMCTS/darts-shared-infrastructure.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#darts-devs"
            "environment"         = "production"
            "managedBy"           = "Darts Modernisation"
        }
        # (39 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # azurerm_linux_virtual_machine.migration-linux2["prddartsmigdb02"] will be updated in-place
  ~ resource "azurerm_linux_virtual_machine" "migration-linux2" {
        id                                                     = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/darts-migration-prod-rg/providers/Microsoft.Compute/virtualMachines/prddartsmigdb02"
        name                                                   = "prddartsmigdb02"
      ~ patch_assessment_mode                                  = "AutomaticByPlatform" -> "ImageDefault"
        tags                                                   = {
            "application"         = "darts"
            "builtFrom"           = "https://github.com/HMCTS/darts-shared-infrastructure.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#darts-devs"
            "environment"         = "production"
            "managedBy"           = "Darts Modernisation"
        }
        # (39 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # azurerm_linux_virtual_machine.oracle["prddartsmigora01"] will be updated in-place
  ~ resource "azurerm_linux_virtual_machine" "oracle" {
        id                                                     = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/darts-migration-prod-rg/providers/Microsoft.Compute/virtualMachines/prddartsmigora01"
        name                                                   = "prddartsmigora01"
      ~ patch_assessment_mode                                  = "AutomaticByPlatform" -> "ImageDefault"
        tags                                                   = {
            "application"         = "darts"
            "builtFrom"           = "https://github.com/HMCTS/darts-shared-infrastructure.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#darts-devs"
            "environment"         = "production"
            "managedBy"           = "Darts Modernisation"
        }
        # (39 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # azurerm_logic_app_standard.logic[0] will be updated in-place
  ~ resource "azurerm_logic_app_standard" "logic" {
      ~ app_settings                             = {
          - "FUNCTIONS_WORKER_RUNTIME" = "dotnet" -> null
        }
        id                                       = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/darts-migration-prod-rg/providers/Microsoft.Web/sites/darts-migration-logic-prod"
        name                                     = "darts-migration-logic-prod"
        tags                                     = {
            "application"         = "darts"
            "builtFrom"           = "https://github.com/HMCTS/darts-shared-infrastructure.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#darts-devs"
            "environment"         = "production"
            "managedBy"           = "Darts Modernisation"
        }
        # (24 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # azurerm_managed_disk.mig-01-disk[0] will be created
  + resource "azurerm_managed_disk" "mig-01-disk" {
      + create_option                     = "Empty"
      + disk_iops_read_only               = (known after apply)
      + disk_iops_read_write              = (known after apply)
      + disk_mbps_read_only               = (known after apply)
      + disk_mbps_read_write              = (known after apply)
      + disk_size_gb                      = 20000
      + id                                = (known after apply)
      + location                          = "uksouth"
      + logical_sector_size               = (known after apply)
      + max_shares                        = 2
      + name                              = "migration-shared-disk"
      + network_access_policy             = "AllowAll"
      + optimized_frequent_attach_enabled = false
      + performance_plus_enabled          = false
      + public_network_access_enabled     = true
      + resource_group_name               = "darts-migration-prod-rg"
      + source_uri                        = (known after apply)
      + storage_account_type              = "Premium_LRS"
      + tier                              = (known after apply)
    }

  # azurerm_managed_disk.migration_os[0] will be created
  + resource "azurerm_managed_disk" "migration_os" {
      + create_option                     = "Empty"
      + disk_iops_read_only               = (known after apply)
      + disk_iops_read_write              = (known after apply)
      + disk_mbps_read_only               = (known after apply)
      + disk_mbps_read_write              = (known after apply)
      + disk_size_gb                      = 20
      + id                                = (known after apply)
      + location                          = "uksouth"
      + logical_sector_size               = (known after apply)
      + max_shares                        = (known after apply)
      + name                              = "migration-osdisk"
      + network_access_policy             = "AllowAll"
      + optimized_frequent_attach_enabled = false
      + performance_plus_enabled          = false
      + public_network_access_enabled     = true
      + resource_group_name               = "darts-migration-prod-rg"
      + source_uri                        = (known after apply)
      + storage_account_type              = "Standard_LRS"
      + tags                              = {
          + "application"         = "darts"
          + "builtFrom"           = "https://github.com/HMCTS/darts-shared-infrastructure.git"
          + "businessArea"        = "Cross-Cutting"
          + "contactSlackChannel" = "#darts-devs"
          + "environment"         = "production"
          + "managedBy"           = "Darts Modernisation"
        }
      + tier                              = (known after apply)
    }

  # azurerm_managed_disk.shared_disk[0] will be updated in-place
  ~ resource "azurerm_managed_disk" "shared_disk" {
        id                                = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/darts-migration-prod-rg/providers/Microsoft.Compute/disks/shared-disk"
        name                              = "shared-disk"
      ~ tags                              = {
          - "application"  = "darts" -> null
          - "builtFrom"    = "https://github.com/HMCTS/darts-shared-infrastructure.git" -> null
          - "businessArea" = "Cross-Cutting" -> null
          - "environment"  = "production" -> null
        }
        # (31 unchanged attributes hidden)
    }

  # azurerm_managed_disk.shared_disk_backup[0] will be updated in-place
  ~ resource "azurerm_managed_disk" "shared_disk_backup" {
        id                                = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/darts-migration-prod-rg/providers/Microsoft.Compute/disks/shared-disk-backup"
        name                              = "shared-disk-backup"
      ~ tags                              = {
          - "application"  = "darts" -> null
          - "builtFrom"    = "https://github.com/HMCTS/darts-shared-infrastructure.git" -> null
          - "businessArea" = "Cross-Cutting" -> null
          - "environment"  = "production" -> null
        }
        # (31 unchanged attributes hidden)
    }

  # azurerm_role_assignment.storage_owner_quarantine[0] will be created
  + resource "azurerm_role_assignment" "storage_owner_quarantine" {
      + condition_version                = (known after apply)
      + id                               = (known after apply)
      + name                             = (known after apply)
      + principal_id                     = "aee94636-8387-4a51-b5a7-a96e580a32d7"
      + principal_type                   = (known after apply)
      + role_definition_id               = (known after apply)
      + role_definition_name             = "Owner"
      + scope                            = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/darts-migration-prod-rg/providers/Microsoft.Storage/storageAccounts/saproddartsquarantine"
      + skip_service_principal_aad_check = (known after apply)
    }

  # azurerm_role_assignment.storage_owner_standard[0] will be created
  + resource "azurerm_role_assignment" "storage_owner_standard" {
      + condition_version                = (known after apply)
      + id                               = (known after apply)
      + name                             = (known after apply)
      + principal_id                     = "aee94636-8387-4a51-b5a7-a96e580a32d7"
      + principal_type                   = (known after apply)
      + role_definition_id               = (known after apply)
      + role_definition_name             = "Owner"
      + scope                            = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/darts-migration-prod-rg/providers/Microsoft.Storage/storageAccounts/saproddartsmig02"
      + skip_service_principal_aad_check = (known after apply)
    }

  # azurerm_windows_virtual_machine.migration_windows["prddartsassess"] will be updated in-place
  ~ resource "azurerm_windows_virtual_machine" "migration_windows" {
        id                                                     = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/darts-migration-prod-rg/providers/Microsoft.Compute/virtualMachines/prddartsassess"
        name                                                   = "prddartsassess"
      ~ patch_assessment_mode                                  = "AutomaticByPlatform" -> "ImageDefault"
        tags                                                   = {
            "application"         = "darts"
            "builtFrom"           = "https://github.com/HMCTS/darts-shared-infrastructure.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#darts-devs"
            "environment"         = "production"
            "managedBy"           = "Darts Modernisation"
        }
      ~ vm_agent_platform_updates_enabled                      = true -> false
        # (40 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # azurerm_windows_virtual_machine.migration_windows["prddartsassure"] will be updated in-place
  ~ resource "azurerm_windows_virtual_machine" "migration_windows" {
        id                                                     = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/darts-migration-prod-rg/providers/Microsoft.Compute/virtualMachines/prddartsassure"
        name                                                   = "prddartsassure"
      ~ patch_assessment_mode                                  = "AutomaticByPlatform" -> "ImageDefault"
        tags                                                   = {
            "application"         = "darts"
            "builtFrom"           = "https://github.com/HMCTS/darts-shared-infrastructure.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#darts-devs"
            "environment"         = "production"
            "managedBy"           = "Darts Modernisation"
        }
        # (41 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # azurerm_windows_virtual_machine.migration_windows["prddartsmig01"] will be updated in-place
  ~ resource "azurerm_windows_virtual_machine" "migration_windows" {
        id                                                     = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/darts-migration-prod-rg/providers/Microsoft.Compute/virtualMachines/prddartsmig01"
        name                                                   = "prddartsmig01"
      ~ patch_assessment_mode                                  = "AutomaticByPlatform" -> "ImageDefault"
        tags                                                   = {
            "application"         = "darts"
            "builtFrom"           = "https://github.com/HMCTS/darts-shared-infrastructure.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#darts-devs"
            "environment"         = "production"
            "managedBy"           = "Darts Modernisation"
        }
        # (41 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # azurerm_windows_virtual_machine.migration_windows["prddartsmig02"] will be updated in-place
  ~ resource "azurerm_windows_virtual_machine" "migration_windows" {
        id                                                     = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/darts-migration-prod-rg/providers/Microsoft.Compute/virtualMachines/prddartsmig02"
        name                                                   = "prddartsmig02"
      ~ patch_assessment_mode                                  = "AutomaticByPlatform" -> "ImageDefault"
        tags                                                   = {
            "application"         = "darts"
            "builtFrom"           = "https://github.com/HMCTS/darts-shared-infrastructure.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#darts-devs"
            "environment"         = "production"
            "managedBy"           = "Darts Modernisation"
        }
        # (41 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # azurerm_windows_virtual_machine.migration_windows["prddartsmig03"] will be updated in-place
  ~ resource "azurerm_windows_virtual_machine" "migration_windows" {
        id                                                     = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/darts-migration-prod-rg/providers/Microsoft.Compute/virtualMachines/prddartsmig03"
        name                                                   = "prddartsmig03"
      ~ patch_assessment_mode                                  = "AutomaticByPlatform" -> "ImageDefault"
        tags                                                   = {
            "application"         = "darts"
            "builtFrom"           = "https://github.com/HMCTS/darts-shared-infrastructure.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#darts-devs"
            "environment"         = "production"
            "managedBy"           = "Darts Modernisation"
        }
        # (41 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # azurerm_windows_virtual_machine.migration_windows["prddartsmig04"] will be updated in-place
  ~ resource "azurerm_windows_virtual_machine" "migration_windows" {
        id                                                     = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/darts-migration-prod-rg/providers/Microsoft.Compute/virtualMachines/prddartsmig04"
        name                                                   = "prddartsmig04"
      ~ patch_assessment_mode                                  = "AutomaticByPlatform" -> "ImageDefault"
        tags                                                   = {
            "application"         = "darts"
            "builtFrom"           = "https://github.com/HMCTS/darts-shared-infrastructure.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#darts-devs"
            "environment"         = "production"
            "managedBy"           = "Darts Modernisation"
        }
        # (41 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # azurerm_windows_virtual_machine.migration_windows["prddartsmig05"] will be updated in-place
  ~ resource "azurerm_windows_virtual_machine" "migration_windows" {
        id                                                     = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/darts-migration-prod-rg/providers/Microsoft.Compute/virtualMachines/prddartsmig05"
        name                                                   = "prddartsmig05"
      ~ patch_assessment_mode                                  = "AutomaticByPlatform" -> "ImageDefault"
        tags                                                   = {
            "application"         = "darts"
            "builtFrom"           = "https://github.com/HMCTS/darts-shared-infrastructure.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#darts-devs"
            "environment"         = "production"
            "managedBy"           = "Darts Modernisation"
        }
        # (41 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # azurerm_windows_virtual_machine.migration_windows["prddartsoracle"] will be updated in-place
  ~ resource "azurerm_windows_virtual_machine" "migration_windows" {
        id                                                     = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/darts-migration-prod-rg/providers/Microsoft.Compute/virtualMachines/prddartsoracle"
        name                                                   = "prddartsoracle"
      ~ patch_assessment_mode                                  = "AutomaticByPlatform" -> "ImageDefault"
        tags                                                   = {
            "application"         = "darts"
            "builtFrom"           = "https://github.com/HMCTS/darts-shared-infrastructure.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#darts-devs"
            "environment"         = "production"
            "managedBy"           = "Darts Modernisation"
        }
        # (41 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # azurerm_windows_virtual_machine.migration_windows["prddartsunstr"] will be updated in-place
  ~ resource "azurerm_windows_virtual_machine" "migration_windows" {
        id                                                     = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/darts-migration-prod-rg/providers/Microsoft.Compute/virtualMachines/prddartsunstr"
        name                                                   = "prddartsunstr"
      ~ patch_assessment_mode                                  = "AutomaticByPlatform" -> "ImageDefault"
        tags                                                   = {
            "application"         = "darts"
            "builtFrom"           = "https://github.com/HMCTS/darts-shared-infrastructure.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#darts-devs"
            "environment"         = "production"
            "managedBy"           = "Darts Modernisation"
        }
        # (41 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # module.application_insights.azurerm_application_insights.this will be updated in-place
  ~ resource "azurerm_application_insights" "this" {
      ~ daily_data_cap_in_gb                  = 50 -> 100
        id                                    = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/darts-prod-rg/providers/Microsoft.Insights/components/darts-prod"
        name                                  = "darts-prod"
        tags                                  = {
            "application"         = "darts"
            "builtFrom"           = "https://github.com/HMCTS/darts-shared-infrastructure.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#darts-devs"
            "environment"         = "production"
            "managedBy"           = "Darts Modernisation"
        }
        # (15 unchanged attributes hidden)
    }

  # module.application_insights.azurerm_monitor_activity_log_alert.main[0] must be replaced
-/+ resource "azurerm_monitor_activity_log_alert" "main" {
      ~ id                  = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/darts-prod-rg/providers/Microsoft.Insights/activityLogAlerts/Application Insights daily cap reached - darts-prod" -> (known after apply)
      ~ name                = "Application Insights daily cap reached - darts-prod" -> "Application-Insights-daily-cap-reached-darts-prod" # forces replacement
        tags                = {
            "application"         = "darts"
            "builtFrom"           = "https://github.com/HMCTS/darts-shared-infrastructure.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#darts-devs"
            "environment"         = "production"
            "managedBy"           = "Darts Modernisation"
        }
        # (5 unchanged attributes hidden)

      ~ criteria {
          - levels                  = [] -> null
          - resource_groups         = [] -> null
          - resource_ids            = [] -> null
          - resource_providers      = [] -> null
          - resource_types          = [] -> null
          - statuses                = [] -> null
          - sub_statuses            = [] -> null
            # (13 unchanged attributes hidden)

          ~ resource_health (known after apply)

          ~ service_health (known after apply)
        }

        # (1 unchanged block hidden)
    }

  # module.postgresql_flexible[0].azurerm_postgresql_flexible_server_active_directory_administrator.pgsql_adadmin must be replaced
-/+ resource "azurerm_postgresql_flexible_server_active_directory_administrator" "pgsql_adadmin" {
      ~ id                  = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/darts-migration-prod-rg/providers/Microsoft.DBforPostgreSQL/flexibleServers/darts-migration-prod/administrators/4d0554dd-fe60-424a-be9c-36636826d927" -> (known after apply)
      ~ object_id           = "4d0554dd-fe60-424a-be9c-36636826d927" -> "ef17f368-0aa5-43d5-9264-28080f83755e" # forces replacement
      ~ principal_name      = "DTS Platform Operations SC" -> "DTS Platform Operations PostgreSQL Admin Access SC" # forces replacement
        # (4 unchanged attributes hidden)
    }

  # module.postgresql_flexible[0].azurerm_postgresql_flexible_server_database.pg_databases["psql-prod-darts-replica"] will be created
  + resource "azurerm_postgresql_flexible_server_database" "pg_databases" {
      + charset   = "utf8"
      + collation = "en_GB.utf8"
      + id        = (known after apply)
      + name      = "psql-prod-darts-replica"
      + server_id = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/darts-migration-prod-rg/providers/Microsoft.DBforPostgreSQL/flexibleServers/darts-migration-prod"
    }

  # module.postgresql_flexible[0].azurerm_postgresql_flexible_server_database.pg_databases["psql-prod-dartsmig-01"] will be created
  + resource "azurerm_postgresql_flexible_server_database" "pg_databases" {
      + charset   = "utf8"
      + collation = "en_GB.utf8"
      + id        = (known after apply)
      + name      = "psql-prod-dartsmig-01"
      + server_id = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/darts-migration-prod-rg/providers/Microsoft.DBforPostgreSQL/flexibleServers/darts-migration-prod"
    }

  # module.postgresql_flexible[0].azurerm_postgresql_flexible_server_database.pg_databases["psql-prod-detsmig-01"] will be created
  + resource "azurerm_postgresql_flexible_server_database" "pg_databases" {
      + charset   = "utf8"
      + collation = "en_GB.utf8"
      + id        = (known after apply)
      + name      = "psql-prod-detsmig-01"
      + server_id = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/darts-migration-prod-rg/providers/Microsoft.DBforPostgreSQL/flexibleServers/darts-migration-prod"
    }

  # module.postgresql_flexible[0].null_resource.set-user-permissions-additionaldbs["psql-prod-darts-replica"] must be replaced
-/+ resource "null_resource" "set-user-permissions-additionaldbs" {
      ~ id       = "154290820805208931" -> (known after apply)
      ~ triggers = { # forces replacement
          + "db_reader_schemas" = "public"
          ~ "script_hash"       = "dbe0102f3129d4463913d5e01177e806bc6954005bdd98f20c242658634a1bbc" -> "88abfc1a97fc27a8f4d01362525f3b65e85409d3a475ecc79b11ad09a019e469"
            # (3 unchanged elements hidden)
        }
    }

  # module.postgresql_flexible[0].null_resource.set-user-permissions-additionaldbs["psql-prod-dartsmig-01"] must be replaced
-/+ resource "null_resource" "set-user-permissions-additionaldbs" {
      ~ id       = "4619313056984336138" -> (known after apply)
      ~ triggers = { # forces replacement
          + "db_reader_schemas" = "public"
          ~ "script_hash"       = "dbe0102f3129d4463913d5e01177e806bc6954005bdd98f20c242658634a1bbc" -> "88abfc1a97fc27a8f4d01362525f3b65e85409d3a475ecc79b11ad09a019e469"
            # (3 unchanged elements hidden)
        }
    }

  # module.postgresql_flexible[0].null_resource.set-user-permissions-additionaldbs["psql-prod-detsmig-01"] must be replaced
-/+ resource "null_resource" "set-user-permissions-additionaldbs" {
      ~ id       = "8499794368887057423" -> (known after apply)
      ~ triggers = { # forces replacement
          + "db_reader_schemas" = "public"
          ~ "script_hash"       = "dbe0102f3129d4463913d5e01177e806bc6954005bdd98f20c242658634a1bbc" -> "88abfc1a97fc27a8f4d01362525f3b65e85409d3a475ecc79b11ad09a019e469"
            # (3 unchanged elements hidden)
        }
    }

  # module.sa.azurerm_storage_account.storage_account will be updated in-place
  ~ resource "azurerm_storage_account" "storage_account" {
        id                                 = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/darts-prod-rg/providers/Microsoft.Storage/storageAccounts/dartssaprod"
        name                               = "dartssaprod"
        tags                               = {
            "application"         = "darts"
            "builtFrom"           = "https://github.com/HMCTS/darts-shared-infrastructure.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#darts-devs"
            "environment"         = "production"
            "managedBy"           = "Darts Modernisation"
        }
        # (96 unchanged attributes hidden)

      + network_rules {
          + bypass         = [
              + "AzureServices",
            ]
          + default_action = "Allow"
        }

        # (3 unchanged blocks hidden)
    }

  # module.sa.time_rotating.rotate will be created
  + resource "time_rotating" "rotate" {
      + day              = (known after apply)
      + hour             = (known after apply)
      + id               = (known after apply)
      + minute           = (known after apply)
      + month            = (known after apply)
      + rfc3339          = (known after apply)
      + rotation_days    = 360
      + rotation_rfc3339 = (known after apply)
      + second           = (known after apply)
      + unix             = (known after apply)
      + year             = (known after apply)
    }

  # module.sa.time_static.pim_expiry must be replaced
-/+ resource "time_static" "pim_expiry" {
      ~ day     = 7 -> (known after apply)
      ~ hour    = 10 -> (known after apply)
      ~ id      = "2025-11-07T10:54:35Z" -> (known after apply)
      ~ minute  = 54 -> (known after apply)
      ~ month   = 11 -> (known after apply)
      ~ rfc3339 = "2025-11-07T10:54:35Z" -> (known after apply) # forces replacement
      ~ second  = 35 -> (known after apply)
      ~ unix    = 1762512875 -> (known after apply)
      ~ year    = 2025 -> (known after apply)
    }

  # module.sa-migration-quarantine[0].time_rotating.rotate will be created
  + resource "time_rotating" "rotate" {
      + day              = (known after apply)
      + hour             = (known after apply)
      + id               = (known after apply)
      + minute           = (known after apply)
      + month            = (known after apply)
      + rfc3339          = (known after apply)
      + rotation_days    = 360
      + rotation_rfc3339 = (known after apply)
      + second           = (known after apply)
      + unix             = (known after apply)
      + year             = (known after apply)
    }

  # module.sa-migration-quarantine[0].time_static.pim_expiry must be replaced
-/+ resource "time_static" "pim_expiry" {
      ~ day     = 16 -> (known after apply)
      ~ hour    = 14 -> (known after apply)
      ~ id      = "2026-01-16T14:50:10Z" -> (known after apply)
      ~ minute  = 50 -> (known after apply)
      ~ month   = 1 -> (known after apply)
      ~ rfc3339 = "2026-01-16T14:50:10Z" -> (known after apply) # forces replacement
      ~ second  = 10 -> (known after apply)
      ~ unix    = 1768575010 -> (known after apply)
      ~ year    = 2026 -> (known after apply)
    }

  # module.sa-migration-standard[0].azurerm_storage_account.storage_account will be updated in-place
  ~ resource "azurerm_storage_account" "storage_account" {
        id                                 = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/darts-migration-prod-rg/providers/Microsoft.Storage/storageAccounts/saproddartsmig02"
        name                               = "saproddartsmig02"
        tags                               = {
            "application"         = "darts"
            "builtFrom"           = "https://github.com/HMCTS/darts-shared-infrastructure.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#darts-devs"
            "environment"         = "production"
            "managedBy"           = "Darts Modernisation"
        }
        # (96 unchanged attributes hidden)

      + network_rules {
          + bypass         = [
              + "AzureServices",
            ]
          + default_action = "Allow"
        }

        # (3 unchanged blocks hidden)
    }

  # module.sa-migration-standard[0].time_rotating.rotate will be created
  + resource "time_rotating" "rotate" {
      + day              = (known after apply)
      + hour             = (known after apply)
      + id               = (known after apply)
      + minute           = (known after apply)
      + month            = (known after apply)
      + rfc3339          = (known after apply)
      + rotation_days    = 360
      + rotation_rfc3339 = (known after apply)
      + second           = (known after apply)
      + unix             = (known after apply)
      + year             = (known after apply)
    }

  # module.sa-migration-standard[0].time_static.pim_expiry must be replaced
-/+ resource "time_static" "pim_expiry" {
      ~ day     = 12 -> (known after apply)
      ~ hour    = 16 -> (known after apply)
      ~ id      = "2026-01-12T16:16:08Z" -> (known after apply)
      ~ minute  = 16 -> (known after apply)
      ~ month   = 1 -> (known after apply)
      ~ rfc3339 = "2026-01-12T16:16:08Z" -> (known after apply) # forces replacement
      ~ second  = 8 -> (known after apply)
      ~ unix    = 1768234568 -> (known after apply)
      ~ year    = 2026 -> (known after apply)
    }

Plan: 18 to add, 21 to change, 8 to destroy.
ℹ️ Objects have changed outside of Terraform

This feature was introduced from Terraform v0.15.4.

Terraform detected the following changes made outside of Terraform since the
last "terraform apply" which may have affected this plan:

  # module.sa.time_rotating.rotate has been deleted
  - resource "time_rotating" "rotate" {
        id               = "2024-11-12T10:54:35Z"
      - rotation_rfc3339 = "2025-11-07T10:54:35Z" -> null
        # (9 unchanged attributes hidden)
    }

  # module.sa-migration-quarantine[0].time_rotating.rotate has been deleted
  - resource "time_rotating" "rotate" {
        id               = "2025-01-21T14:50:10Z"
      - rotation_rfc3339 = "2026-01-16T14:50:10Z" -> null
        # (9 unchanged attributes hidden)
    }

  # module.sa-migration-standard[0].time_rotating.rotate has been deleted
  - resource "time_rotating" "rotate" {
        id               = "2025-01-17T16:16:08Z"
      - rotation_rfc3339 = "2026-01-12T16:16:08Z" -> null
        # (9 unchanged attributes hidden)
    }


Unless you have made equivalent changes to your configuration, or ignored the

@npv0 npv0 force-pushed the update-appinsights-to-100 branch from bd5fc1c to c938896 Compare March 6, 2026 16:07
@npv0 npv0 force-pushed the update-appinsights-to-100 branch from c938896 to 4f100ab Compare March 6, 2026 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant