Skip to content

Conversation

adityadwadasi
Copy link
Contributor

Before creating a pull request make sure that:

  • commit messages are meaningful and follow good commit message guidelines
  • README and other documentation has been updated / added (if needed)
  • tests have been updated / new tests has been added (if needed)

Please remove this line and everything above and fill the following sections:

JIRA link (if applicable)

https://tools.hmcts.net/jira/browse/RWA-4294

Change description

Does this PR introduce a breaking change? (check one with "x")

[ ] Yes
[ ] No

Copy link

github-actions bot commented Oct 2, 2025

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Oct 2, 2025
void setUp() {
taskId = UUID.randomUUID().toString();

taskTestUtils = new TaskTestUtils(cftTaskDatabaseService);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can initiate this on a class level instead of before each test. This comment applies to all tests
private TaskTestUtils taskTestUtils = new TaskTestUtils(cftTaskDatabaseService);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed I made changes as suggested and tested them, Martin. Please verify and let me know if anything needs to be changed.

private RoleAssignmentService roleAssignmentService;

private String reconfigTaskId;
TaskTestUtils taskTestUtils;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class has initiateTask() method can we reuse any of the methods in TaskTestUtils?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, these methods were developed specifically for this test case. Unfortunately, we can't reuse the methods in TaskTest utils for this reason.

@github-actions github-actions bot removed the stale label Oct 7, 2025
@hmcts-jenkins-j-to-z
Copy link
Contributor

Plan Result (aat)

⚠️ Resource Deletion will happen

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

Plan: 2 to add, 12 to change, 14 to destroy.
  • Update
    • module.wa_task_management_api_database_flexible.azurerm_monitor_action_group.db-alerts-action-group[0]
    • module.wa_task_management_api_database_flexible.azurerm_monitor_metric_alert.db_alert_cpu[0]
    • module.wa_task_management_api_database_flexible.azurerm_monitor_metric_alert.db_alert_memory[0]
    • module.wa_task_management_api_database_flexible.azurerm_monitor_metric_alert.db_alert_storage_utilization[0]
    • module.wa_task_management_api_database_flexible.azurerm_postgresql_flexible_server.pgsql_server
    • module.wa_task_management_api_database_flexible.azurerm_resource_group.rg[0]
    • module.wa_task_management_api_database_flexible_replica.azurerm_monitor_action_group.db-alerts-action-group[0]
    • module.wa_task_management_api_database_flexible_replica.azurerm_monitor_metric_alert.db_alert_cpu[0]
    • module.wa_task_management_api_database_flexible_replica.azurerm_monitor_metric_alert.db_alert_memory[0]
    • module.wa_task_management_api_database_flexible_replica.azurerm_monitor_metric_alert.db_alert_storage_utilization[0]
    • module.wa_task_management_api_database_flexible_replica.azurerm_postgresql_flexible_server.pgsql_server
    • module.wa_task_management_api_database_flexible_replica.azurerm_resource_group.rg[0]
  • Delete
    • module.wa_task_management_api_database_flexible.azurerm_log_analytics_workspace.pgsql_log_analytics_workspace[0]
    • module.wa_task_management_api_database_flexible.azurerm_monitor_diagnostic_setting.pgsql_diag[0]
    • module.wa_task_management_api_database_flexible.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["log_lock_waits"]
    • module.wa_task_management_api_database_flexible.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["pg_qs.query_capture_mode"]
    • module.wa_task_management_api_database_flexible.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["pgms_wait_sampling.query_capture_mode"]
    • module.wa_task_management_api_database_flexible.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["track_io_timing"]
    • module.wa_task_management_api_database_flexible_replica.azurerm_log_analytics_workspace.pgsql_log_analytics_workspace[0]
    • module.wa_task_management_api_database_flexible_replica.azurerm_monitor_diagnostic_setting.pgsql_diag[0]
    • module.wa_task_management_api_database_flexible_replica.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["log_lock_waits"]
    • module.wa_task_management_api_database_flexible_replica.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["pg_qs.query_capture_mode"]
    • module.wa_task_management_api_database_flexible_replica.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["pgms_wait_sampling.query_capture_mode"]
    • module.wa_task_management_api_database_flexible_replica.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["track_io_timing"]
  • Replace
    • module.sdp_db_user.azurerm_key_vault_secret.sdp_vault_sdp_read_user_name
    • module.sdp_db_user.azurerm_key_vault_secret.sdp_vault_sdp_read_user_password
Change Result (Click me)
  # module.sdp_db_user.data.azurerm_key_vault.sdp_vault will be read during apply
  # (depends on a resource or a module with changes pending)
 <= data "azurerm_key_vault" "sdp_vault" {
      + access_policy                   = (known after apply)
      + enable_rbac_authorization       = (known after apply)
      + enabled_for_deployment          = (known after apply)
      + enabled_for_disk_encryption     = (known after apply)
      + enabled_for_template_deployment = (known after apply)
      + id                              = (known after apply)
      + location                        = (known after apply)
      + name                            = "mi-vault-dev"
      + network_acls                    = (known after apply)
      + public_network_access_enabled   = (known after apply)
      + purge_protection_enabled        = (known after apply)
      + rbac_authorization_enabled      = (known after apply)
      + resource_group_name             = "mi-dev-rg"
      + sku_name                        = (known after apply)
      + tags                            = (known after apply)
      + tenant_id                       = (known after apply)
      + vault_uri                       = (known after apply)
    }

  # module.sdp_db_user.data.azurerm_subscription.current will be read during apply
  # (depends on a resource or a module with changes pending)
 <= data "azurerm_subscription" "current" {
      + display_name          = (known after apply)
      + id                    = (known after apply)
      + location_placement_id = (known after apply)
      + quota_id              = (known after apply)
      + spending_limit        = (known after apply)
      + state                 = (known after apply)
      + subscription_id       = (known after apply)
      + tags                  = (known after apply)
      + tenant_id             = (known after apply)
    }

  # module.sdp_db_user.azurerm_key_vault_secret.sdp_vault_sdp_read_user_name must be replaced
-/+ resource "azurerm_key_vault_secret" "sdp_vault_sdp_read_user_name" {
      ~ id                      = "https://mi-vault-dev.vault.azure.net/secrets/cft-task-postgres-db-flexible-replica-read-user-name/d8164b5ea51b4da8b434548a2ab4adc9" -> (known after apply)
      ~ key_vault_id            = "/subscriptions/867a878b-cb68-4de5-9741-361ac9e178b6/resourceGroups/mi-dev-rg/providers/Microsoft.KeyVault/vaults/mi-vault-dev" -> (known after apply) # forces replacement
        name                    = "cft-task-postgres-db-flexible-replica-read-user-name"
      ~ resource_id             = "/subscriptions/867a878b-cb68-4de5-9741-361ac9e178b6/resourceGroups/mi-dev-rg/providers/Microsoft.KeyVault/vaults/mi-vault-dev/secrets/cft-task-postgres-db-flexible-replica-read-user-name/versions/d8164b5ea51b4da8b434548a2ab4adc9" -> (known after apply)
      ~ resource_versionless_id = "/subscriptions/867a878b-cb68-4de5-9741-361ac9e178b6/resourceGroups/mi-dev-rg/providers/Microsoft.KeyVault/vaults/mi-vault-dev/secrets/cft-task-postgres-db-flexible-replica-read-user-name" -> (known after apply)
      - tags                    = {} -> null
      - value_wo_version        = 0 -> null
      ~ version                 = "d8164b5ea51b4da8b434548a2ab4adc9" -> (known after apply)
      ~ versionless_id          = "https://mi-vault-dev.vault.azure.net/secrets/cft-task-postgres-db-flexible-replica-read-user-name" -> (known after apply)
        # (3 unchanged attributes hidden)
    }

  # module.sdp_db_user.azurerm_key_vault_secret.sdp_vault_sdp_read_user_password must be replaced
-/+ resource "azurerm_key_vault_secret" "sdp_vault_sdp_read_user_password" {
      ~ id                      = "https://mi-vault-dev.vault.azure.net/secrets/cft-task-postgres-db-flexible-replica-read-user-password/182aa41225714f6ab4f54618e2eb7bbd" -> (known after apply)
      ~ key_vault_id            = "/subscriptions/867a878b-cb68-4de5-9741-361ac9e178b6/resourceGroups/mi-dev-rg/providers/Microsoft.KeyVault/vaults/mi-vault-dev" -> (known after apply) # forces replacement
        name                    = "cft-task-postgres-db-flexible-replica-read-user-password"
      ~ resource_id             = "/subscriptions/867a878b-cb68-4de5-9741-361ac9e178b6/resourceGroups/mi-dev-rg/providers/Microsoft.KeyVault/vaults/mi-vault-dev/secrets/cft-task-postgres-db-flexible-replica-read-user-password/versions/182aa41225714f6ab4f54618e2eb7bbd" -> (known after apply)
      ~ resource_versionless_id = "/subscriptions/867a878b-cb68-4de5-9741-361ac9e178b6/resourceGroups/mi-dev-rg/providers/Microsoft.KeyVault/vaults/mi-vault-dev/secrets/cft-task-postgres-db-flexible-replica-read-user-password" -> (known after apply)
      - tags                    = {} -> null
      - value_wo_version        = 0 -> null
      ~ version                 = "182aa41225714f6ab4f54618e2eb7bbd" -> (known after apply)
      ~ versionless_id          = "https://mi-vault-dev.vault.azure.net/secrets/cft-task-postgres-db-flexible-replica-read-user-password" -> (known after apply)
        # (3 unchanged attributes hidden)
    }

  # module.wa_task_management_api_database_flexible.azurerm_log_analytics_workspace.pgsql_log_analytics_workspace[0] will be destroyed
  # (because index [0] is out of range for count)
  - resource "azurerm_log_analytics_workspace" "pgsql_log_analytics_workspace" {
      - allow_resource_only_permissions         = true -> null
      - cmk_for_query_forced                    = false -> null
      - daily_quota_gb                          = -1 -> null
      - id                                      = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-data-aat/providers/Microsoft.OperationalInsights/workspaces/cft-task-postgres-db-flexible-aat-workspace" -> null
      - immediate_data_purge_on_30_days_enabled = false -> null
      - internet_ingestion_enabled              = true -> null
      - internet_query_enabled                  = true -> null
      - local_authentication_disabled           = true -> null
      - local_authentication_enabled            = false -> null
      - location                                = "uksouth" -> null
      - name                                    = "cft-task-postgres-db-flexible-aat-workspace" -> null
      - primary_shared_key                      = (sensitive value) -> null
      - resource_group_name                     = "cft-task-postgres-db-flexible-data-aat" -> null
      - retention_in_days                       = 30 -> null
      - secondary_shared_key                    = (sensitive value) -> null
      - sku                                     = "PerGB2018" -> null
      - tags                                    = {
          - "application"  = "task-management"
          - "builtFrom"    = "https://github.com/HMCTS/wa-task-management-api.git"
          - "businessArea" = "CFT"
          - "environment"  = "staging"
        } -> null
      - workspace_id                            = "1b120673-50b3-4c1a-a0de-cd456e240d3b" -> null
        # (1 unchanged attribute hidden)
    }

  # module.wa_task_management_api_database_flexible.azurerm_monitor_action_group.db-alerts-action-group[0] will be updated in-place
  ~ resource "azurerm_monitor_action_group" "db-alerts-action-group" {
        id                  = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-data-aat/providers/Microsoft.Insights/actionGroups/cft-task-postgres-db-flexible-wa-support"
        name                = "cft-task-postgres-db-flexible-wa-support"
      ~ tags                = {
          - "application"         = "task-management"
          - "autoShutdown"        = "true"
          - "builtFrom"           = "https://github.com/HMCTS/wa-task-management-api.git"
          - "businessArea"        = "CFT"
          - "contactSlackChannel" = "#wa-tech"
          - "environment"         = "staging"
          - "lastUpdated"         = "2025-10-07T12:27:37Z"
          - "managedBy"           = "Work Allocation"
        } -> (known after apply)
        # (4 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

  # module.wa_task_management_api_database_flexible.azurerm_monitor_diagnostic_setting.pgsql_diag[0] will be destroyed
  # (because index [0] is out of range for count)
  - resource "azurerm_monitor_diagnostic_setting" "pgsql_diag" {
      - id                             = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-data-aat/providers/Microsoft.DBforPostgreSQL/flexibleServers/cft-task-postgres-db-flexible-aat|cft-task-postgres-db-flexible-aat-to-log-analytics" -> null
      - log_analytics_destination_type = "AzureDiagnostics" -> null
      - log_analytics_workspace_id     = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-data-aat/providers/Microsoft.OperationalInsights/workspaces/cft-task-postgres-db-flexible-aat-workspace" -> null
      - name                           = "cft-task-postgres-db-flexible-aat-to-log-analytics" -> null
      - target_resource_id             = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-data-aat/providers/Microsoft.DBforPostgreSQL/flexibleServers/cft-task-postgres-db-flexible-aat" -> null
        # (2 unchanged attributes hidden)

      - enabled_log {
          - category       = "PostgreSQLFlexDatabaseXacts" -> null
            # (1 unchanged attribute hidden)

          - retention_policy {
              - days    = 0 -> null
              - enabled = false -> null
            }
        }
      - enabled_log {
          - category       = "PostgreSQLFlexQueryStoreRuntime" -> null
            # (1 unchanged attribute hidden)

          - retention_policy {
              - days    = 0 -> null
              - enabled = false -> null
            }
        }
      - enabled_log {
          - category       = "PostgreSQLFlexQueryStoreWaitStats" -> null
            # (1 unchanged attribute hidden)

          - retention_policy {
              - days    = 0 -> null
              - enabled = false -> null
            }
        }
      - enabled_log {
          - category       = "PostgreSQLFlexSessions" -> null
            # (1 unchanged attribute hidden)

          - retention_policy {
              - days    = 0 -> null
              - enabled = false -> null
            }
        }
      - enabled_log {
          - category       = "PostgreSQLFlexTableStats" -> null
            # (1 unchanged attribute hidden)

          - retention_policy {
              - days    = 0 -> null
              - enabled = false -> null
            }
        }
      - enabled_log {
          - category       = "PostgreSQLLogs" -> null
            # (1 unchanged attribute hidden)

          - retention_policy {
              - days    = 0 -> null
              - enabled = false -> null
            }
        }

      - metric {
          - category = "AllMetrics" -> null
          - enabled  = false -> null

          - retention_policy {
              - days    = 0 -> null
              - enabled = false -> null
            }
        }
    }

  # module.wa_task_management_api_database_flexible.azurerm_monitor_metric_alert.db_alert_cpu[0] will be updated in-place
  ~ resource "azurerm_monitor_metric_alert" "db_alert_cpu" {
        id                       = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-data-aat/providers/Microsoft.Insights/metricAlerts/db_cpu_percent_cft-task-postgres-db-flexible-aat"
        name                     = "db_cpu_percent_cft-task-postgres-db-flexible-aat"
      ~ tags                     = {
          - "application"         = "task-management"
          - "autoShutdown"        = "true"
          - "builtFrom"           = "https://github.com/HMCTS/wa-task-management-api.git"
          - "businessArea"        = "CFT"
          - "contactSlackChannel" = "#wa-tech"
          - "environment"         = "staging"
          - "lastUpdated"         = "2025-10-07T12:27:37Z"
          - "managedBy"           = "Work Allocation"
        } -> (known after apply)
        # (10 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # module.wa_task_management_api_database_flexible.azurerm_monitor_metric_alert.db_alert_memory[0] will be updated in-place
  ~ resource "azurerm_monitor_metric_alert" "db_alert_memory" {
        id                       = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-data-aat/providers/Microsoft.Insights/metricAlerts/db_memory_percent_cft-task-postgres-db-flexible-aat"
        name                     = "db_memory_percent_cft-task-postgres-db-flexible-aat"
      ~ tags                     = {
          - "application"         = "task-management"
          - "autoShutdown"        = "true"
          - "builtFrom"           = "https://github.com/HMCTS/wa-task-management-api.git"
          - "businessArea"        = "CFT"
          - "contactSlackChannel" = "#wa-tech"
          - "environment"         = "staging"
          - "lastUpdated"         = "2025-10-07T12:27:37Z"
          - "managedBy"           = "Work Allocation"
        } -> (known after apply)
        # (10 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # module.wa_task_management_api_database_flexible.azurerm_monitor_metric_alert.db_alert_storage_utilization[0] will be updated in-place
  ~ resource "azurerm_monitor_metric_alert" "db_alert_storage_utilization" {
        id                       = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-data-aat/providers/Microsoft.Insights/metricAlerts/db_storage_utilization_cft-task-postgres-db-flexible-aat"
        name                     = "db_storage_utilization_cft-task-postgres-db-flexible-aat"
      ~ tags                     = {
          - "application"         = "task-management"
          - "autoShutdown"        = "true"
          - "builtFrom"           = "https://github.com/HMCTS/wa-task-management-api.git"
          - "businessArea"        = "CFT"
          - "contactSlackChannel" = "#wa-tech"
          - "environment"         = "staging"
          - "lastUpdated"         = "2025-10-07T12:27:37Z"
          - "managedBy"           = "Work Allocation"
        } -> (known after apply)
        # (10 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # module.wa_task_management_api_database_flexible.azurerm_postgresql_flexible_server.pgsql_server will be updated in-place
  ~ resource "azurerm_postgresql_flexible_server" "pgsql_server" {
        id                                = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-data-aat/providers/Microsoft.DBforPostgreSQL/flexibleServers/cft-task-postgres-db-flexible-aat"
        name                              = "cft-task-postgres-db-flexible-aat"
      ~ tags                              = {
          - "application"         = "task-management"
          - "autoShutdown"        = "true"
          - "builtFrom"           = "https://github.com/HMCTS/wa-task-management-api.git"
          - "businessArea"        = "CFT"
          - "contactSlackChannel" = "#wa-tech"
          - "environment"         = "staging"
          - "lastUpdated"         = "2025-10-07T12:27:37Z"
          - "managedBy"           = "Work Allocation"
        } -> (known after apply)
        # (22 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # module.wa_task_management_api_database_flexible.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["log_lock_waits"] will be destroyed
  # (because key ["log_lock_waits"] is not in for_each map)
  - resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      - id        = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-data-aat/providers/Microsoft.DBforPostgreSQL/flexibleServers/cft-task-postgres-db-flexible-aat/configurations/log_lock_waits" -> null
      - name      = "log_lock_waits" -> null
      - server_id = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-data-aat/providers/Microsoft.DBforPostgreSQL/flexibleServers/cft-task-postgres-db-flexible-aat" -> null
      - value     = "on" -> null
    }

  # module.wa_task_management_api_database_flexible.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["pg_qs.query_capture_mode"] will be destroyed
  # (because key ["pg_qs.query_capture_mode"] is not in for_each map)
  - resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      - id        = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-data-aat/providers/Microsoft.DBforPostgreSQL/flexibleServers/cft-task-postgres-db-flexible-aat/configurations/pg_qs.query_capture_mode" -> null
      - name      = "pg_qs.query_capture_mode" -> null
      - server_id = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-data-aat/providers/Microsoft.DBforPostgreSQL/flexibleServers/cft-task-postgres-db-flexible-aat" -> null
      - value     = "ALL" -> null
    }

  # module.wa_task_management_api_database_flexible.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["pgms_wait_sampling.query_capture_mode"] will be destroyed
  # (because key ["pgms_wait_sampling.query_capture_mode"] is not in for_each map)
  - resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      - id        = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-data-aat/providers/Microsoft.DBforPostgreSQL/flexibleServers/cft-task-postgres-db-flexible-aat/configurations/pgms_wait_sampling.query_capture_mode" -> null
      - name      = "pgms_wait_sampling.query_capture_mode" -> null
      - server_id = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-data-aat/providers/Microsoft.DBforPostgreSQL/flexibleServers/cft-task-postgres-db-flexible-aat" -> null
      - value     = "ALL" -> null
    }

  # module.wa_task_management_api_database_flexible.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["track_io_timing"] will be destroyed
  # (because key ["track_io_timing"] is not in for_each map)
  - resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      - id        = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-data-aat/providers/Microsoft.DBforPostgreSQL/flexibleServers/cft-task-postgres-db-flexible-aat/configurations/track_io_timing" -> null
      - name      = "track_io_timing" -> null
      - server_id = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-data-aat/providers/Microsoft.DBforPostgreSQL/flexibleServers/cft-task-postgres-db-flexible-aat" -> null
      - value     = "on" -> null
    }

  # module.wa_task_management_api_database_flexible.azurerm_resource_group.rg[0] will be updated in-place
  ~ resource "azurerm_resource_group" "rg" {
        id         = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-data-aat"
        name       = "cft-task-postgres-db-flexible-data-aat"
      ~ tags       = {
          - "application"         = "task-management"
          - "autoShutdown"        = "true"
          - "builtFrom"           = "https://github.com/HMCTS/wa-task-management-api.git"
          - "businessArea"        = "CFT"
          - "contactSlackChannel" = "#wa-tech"
          - "environment"         = "staging"
          - "lastUpdated"         = "2025-10-07T12:27:37Z"
          - "managedBy"           = "Work Allocation"
        } -> (known after apply)
        # (2 unchanged attributes hidden)
    }

  # module.wa_task_management_api_database_flexible_replica.azurerm_log_analytics_workspace.pgsql_log_analytics_workspace[0] will be destroyed
  # (because index [0] is out of range for count)
  - resource "azurerm_log_analytics_workspace" "pgsql_log_analytics_workspace" {
      - allow_resource_only_permissions         = true -> null
      - cmk_for_query_forced                    = false -> null
      - daily_quota_gb                          = -1 -> null
      - id                                      = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-replica-data-aat/providers/Microsoft.OperationalInsights/workspaces/cft-task-postgres-db-flexible-replica-aat-workspace" -> null
      - immediate_data_purge_on_30_days_enabled = false -> null
      - internet_ingestion_enabled              = true -> null
      - internet_query_enabled                  = true -> null
      - local_authentication_disabled           = true -> null
      - local_authentication_enabled            = false -> null
      - location                                = "uksouth" -> null
      - name                                    = "cft-task-postgres-db-flexible-replica-aat-workspace" -> null
      - primary_shared_key                      = (sensitive value) -> null
      - resource_group_name                     = "cft-task-postgres-db-flexible-replica-data-aat" -> null
      - retention_in_days                       = 30 -> null
      - secondary_shared_key                    = (sensitive value) -> null
      - sku                                     = "PerGB2018" -> null
      - tags                                    = {
          - "application"  = "task-management"
          - "builtFrom"    = "https://github.com/HMCTS/wa-task-management-api.git"
          - "businessArea" = "CFT"
          - "environment"  = "staging"
        } -> null
      - workspace_id                            = "4c8c91eb-d544-4a49-a290-7eb908e5199f" -> null
        # (1 unchanged attribute hidden)
    }

  # module.wa_task_management_api_database_flexible_replica.azurerm_monitor_action_group.db-alerts-action-group[0] will be updated in-place
  ~ resource "azurerm_monitor_action_group" "db-alerts-action-group" {
        id                  = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-replica-data-aat/providers/Microsoft.Insights/actionGroups/cft-task-postgres-db-flexible-wa-support"
        name                = "cft-task-postgres-db-flexible-wa-support"
      ~ tags                = {
          - "application"         = "task-management"
          - "autoShutdown"        = "true"
          - "builtFrom"           = "https://github.com/HMCTS/wa-task-management-api.git"
          - "businessArea"        = "CFT"
          - "contactSlackChannel" = "#wa-tech"
          - "environment"         = "staging"
          - "lastUpdated"         = "2025-10-07T12:27:37Z"
          - "managedBy"           = "Work Allocation"
        } -> (known after apply)
        # (4 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

  # module.wa_task_management_api_database_flexible_replica.azurerm_monitor_diagnostic_setting.pgsql_diag[0] will be destroyed
  # (because index [0] is out of range for count)
  - resource "azurerm_monitor_diagnostic_setting" "pgsql_diag" {
      - id                             = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-replica-data-aat/providers/Microsoft.DBforPostgreSQL/flexibleServers/cft-task-postgres-db-flexible-replica-aat|cft-task-postgres-db-flexible-replica-aat-to-log-analytics" -> null
      - log_analytics_destination_type = "AzureDiagnostics" -> null
      - log_analytics_workspace_id     = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-replica-data-aat/providers/Microsoft.OperationalInsights/workspaces/cft-task-postgres-db-flexible-replica-aat-workspace" -> null
      - name                           = "cft-task-postgres-db-flexible-replica-aat-to-log-analytics" -> null
      - target_resource_id             = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-replica-data-aat/providers/Microsoft.DBforPostgreSQL/flexibleServers/cft-task-postgres-db-flexible-replica-aat" -> null
        # (2 unchanged attributes hidden)

      - enabled_log {
          - category       = "PostgreSQLFlexDatabaseXacts" -> null
            # (1 unchanged attribute hidden)

          - retention_policy {
              - days    = 0 -> null
              - enabled = false -> null
            }
        }
      - enabled_log {
          - category       = "PostgreSQLFlexQueryStoreRuntime" -> null
            # (1 unchanged attribute hidden)

          - retention_policy {
              - days    = 0 -> null
              - enabled = false -> null
            }
        }
      - enabled_log {
          - category       = "PostgreSQLFlexQueryStoreWaitStats" -> null
            # (1 unchanged attribute hidden)

          - retention_policy {
              - days    = 0 -> null
              - enabled = false -> null
            }
        }
      - enabled_log {
          - category       = "PostgreSQLFlexSessions" -> null
            # (1 unchanged attribute hidden)

          - retention_policy {
              - days    = 0 -> null
              - enabled = false -> null
            }
        }
      - enabled_log {
          - category       = "PostgreSQLFlexTableStats" -> null
            # (1 unchanged attribute hidden)

          - retention_policy {
              - days    = 0 -> null
              - enabled = false -> null
            }
        }
      - enabled_log {
          - category       = "PostgreSQLLogs" -> null
            # (1 unchanged attribute hidden)

          - retention_policy {
              - days    = 0 -> null
              - enabled = false -> null
            }
        }

      - metric {
          - category = "AllMetrics" -> null
          - enabled  = false -> null

          - retention_policy {
              - days    = 0 -> null
              - enabled = false -> null
            }
        }
    }

  # module.wa_task_management_api_database_flexible_replica.azurerm_monitor_metric_alert.db_alert_cpu[0] will be updated in-place
  ~ resource "azurerm_monitor_metric_alert" "db_alert_cpu" {
        id                       = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-replica-data-aat/providers/Microsoft.Insights/metricAlerts/db_cpu_percent_cft-task-postgres-db-flexible-replica-aat"
        name                     = "db_cpu_percent_cft-task-postgres-db-flexible-replica-aat"
      ~ tags                     = {
          - "application"         = "task-management"
          - "autoShutdown"        = "true"
          - "builtFrom"           = "https://github.com/HMCTS/wa-task-management-api.git"
          - "businessArea"        = "CFT"
          - "contactSlackChannel" = "#wa-tech"
          - "environment"         = "staging"
          - "lastUpdated"         = "2025-10-07T12:27:37Z"
          - "managedBy"           = "Work Allocation"
        } -> (known after apply)
        # (10 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # module.wa_task_management_api_database_flexible_replica.azurerm_monitor_metric_alert.db_alert_memory[0] will be updated in-place
  ~ resource "azurerm_monitor_metric_alert" "db_alert_memory" {
        id                       = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-replica-data-aat/providers/Microsoft.Insights/metricAlerts/db_memory_percent_cft-task-postgres-db-flexible-replica-aat"
        name                     = "db_memory_percent_cft-task-postgres-db-flexible-replica-aat"
      ~ tags                     = {
          - "application"         = "task-management"
          - "autoShutdown"        = "true"
          - "builtFrom"           = "https://github.com/HMCTS/wa-task-management-api.git"
          - "businessArea"        = "CFT"
          - "contactSlackChannel" = "#wa-tech"
          - "environment"         = "staging"
          - "lastUpdated"         = "2025-10-07T12:27:37Z"
          - "managedBy"           = "Work Allocation"
        } -> (known after apply)
        # (10 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # module.wa_task_management_api_database_flexible_replica.azurerm_monitor_metric_alert.db_alert_storage_utilization[0] will be updated in-place
  ~ resource "azurerm_monitor_metric_alert" "db_alert_storage_utilization" {
        id                       = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-replica-data-aat/providers/Microsoft.Insights/metricAlerts/db_storage_utilization_cft-task-postgres-db-flexible-replica-aat"
        name                     = "db_storage_utilization_cft-task-postgres-db-flexible-replica-aat"
      ~ tags                     = {
          - "application"         = "task-management"
          - "autoShutdown"        = "true"
          - "builtFrom"           = "https://github.com/HMCTS/wa-task-management-api.git"
          - "businessArea"        = "CFT"
          - "contactSlackChannel" = "#wa-tech"
          - "environment"         = "staging"
          - "lastUpdated"         = "2025-10-07T12:27:37Z"
          - "managedBy"           = "Work Allocation"
        } -> (known after apply)
        # (10 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # module.wa_task_management_api_database_flexible_replica.azurerm_postgresql_flexible_server.pgsql_server will be updated in-place
  ~ resource "azurerm_postgresql_flexible_server" "pgsql_server" {
        id                                = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-replica-data-aat/providers/Microsoft.DBforPostgreSQL/flexibleServers/cft-task-postgres-db-flexible-replica-aat"
        name                              = "cft-task-postgres-db-flexible-replica-aat"
      ~ tags                              = {
          - "application"         = "task-management"
          - "autoShutdown"        = "true"
          - "builtFrom"           = "https://github.com/HMCTS/wa-task-management-api.git"
          - "businessArea"        = "CFT"
          - "contactSlackChannel" = "#wa-tech"
          - "environment"         = "staging"
          - "lastUpdated"         = "2025-10-07T12:27:37Z"
          - "managedBy"           = "Work Allocation"
        } -> (known after apply)
        # (22 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # module.wa_task_management_api_database_flexible_replica.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["log_lock_waits"] will be destroyed
  # (because key ["log_lock_waits"] is not in for_each map)
  - resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      - id        = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-replica-data-aat/providers/Microsoft.DBforPostgreSQL/flexibleServers/cft-task-postgres-db-flexible-replica-aat/configurations/log_lock_waits" -> null
      - name      = "log_lock_waits" -> null
      - server_id = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-replica-data-aat/providers/Microsoft.DBforPostgreSQL/flexibleServers/cft-task-postgres-db-flexible-replica-aat" -> null
      - value     = "on" -> null
    }

  # module.wa_task_management_api_database_flexible_replica.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["pg_qs.query_capture_mode"] will be destroyed
  # (because key ["pg_qs.query_capture_mode"] is not in for_each map)
  - resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      - id        = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-replica-data-aat/providers/Microsoft.DBforPostgreSQL/flexibleServers/cft-task-postgres-db-flexible-replica-aat/configurations/pg_qs.query_capture_mode" -> null
      - name      = "pg_qs.query_capture_mode" -> null
      - server_id = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-replica-data-aat/providers/Microsoft.DBforPostgreSQL/flexibleServers/cft-task-postgres-db-flexible-replica-aat" -> null
      - value     = "ALL" -> null
    }

  # module.wa_task_management_api_database_flexible_replica.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["pgms_wait_sampling.query_capture_mode"] will be destroyed
  # (because key ["pgms_wait_sampling.query_capture_mode"] is not in for_each map)
  - resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      - id        = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-replica-data-aat/providers/Microsoft.DBforPostgreSQL/flexibleServers/cft-task-postgres-db-flexible-replica-aat/configurations/pgms_wait_sampling.query_capture_mode" -> null
      - name      = "pgms_wait_sampling.query_capture_mode" -> null
      - server_id = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-replica-data-aat/providers/Microsoft.DBforPostgreSQL/flexibleServers/cft-task-postgres-db-flexible-replica-aat" -> null
      - value     = "ALL" -> null
    }

  # module.wa_task_management_api_database_flexible_replica.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["track_io_timing"] will be destroyed
  # (because key ["track_io_timing"] is not in for_each map)
  - resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      - id        = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-replica-data-aat/providers/Microsoft.DBforPostgreSQL/flexibleServers/cft-task-postgres-db-flexible-replica-aat/configurations/track_io_timing" -> null
      - name      = "track_io_timing" -> null
      - server_id = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-replica-data-aat/providers/Microsoft.DBforPostgreSQL/flexibleServers/cft-task-postgres-db-flexible-replica-aat" -> null
      - value     = "on" -> null
    }

  # module.wa_task_management_api_database_flexible_replica.azurerm_resource_group.rg[0] will be updated in-place
  ~ resource "azurerm_resource_group" "rg" {
        id         = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/cft-task-postgres-db-flexible-replica-data-aat"
        name       = "cft-task-postgres-db-flexible-replica-data-aat"
      ~ tags       = {
          - "application"         = "task-management"
          - "autoShutdown"        = "true"
          - "builtFrom"           = "https://github.com/HMCTS/wa-task-management-api.git"
          - "businessArea"        = "CFT"
          - "contactSlackChannel" = "#wa-tech"
          - "environment"         = "staging"
          - "lastUpdated"         = "2025-10-07T12:27:37Z"
          - "managedBy"           = "Work Allocation"
        } -> (known after apply)
        # (2 unchanged attributes hidden)
    }

Plan: 2 to add, 12 to change, 14 to destroy.

@hmcts-jenkins-j-to-z
Copy link
Contributor

Plan Result (prod)

⚠️ Resource Deletion will happen

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

Plan: 2 to add, 12 to change, 2 to destroy.
  • Update
    • module.wa_task_management_api_database_flexible.azurerm_monitor_action_group.db-alerts-action-group[0]
    • module.wa_task_management_api_database_flexible.azurerm_monitor_metric_alert.db_alert_cpu[0]
    • module.wa_task_management_api_database_flexible.azurerm_monitor_metric_alert.db_alert_memory[0]
    • module.wa_task_management_api_database_flexible.azurerm_monitor_metric_alert.db_alert_storage_utilization[0]
    • module.wa_task_management_api_database_flexible.azurerm_postgresql_flexible_server.pgsql_server
    • module.wa_task_management_api_database_flexible.azurerm_resource_group.rg[0]
    • module.wa_task_management_api_database_flexible_replica.azurerm_monitor_action_group.db-alerts-action-group[0]
    • module.wa_task_management_api_database_flexible_replica.azurerm_monitor_metric_alert.db_alert_cpu[0]
    • module.wa_task_management_api_database_flexible_replica.azurerm_monitor_metric_alert.db_alert_memory[0]
    • module.wa_task_management_api_database_flexible_replica.azurerm_monitor_metric_alert.db_alert_storage_utilization[0]
    • module.wa_task_management_api_database_flexible_replica.azurerm_postgresql_flexible_server.pgsql_server
    • module.wa_task_management_api_database_flexible_replica.azurerm_resource_group.rg[0]
  • Replace
    • module.sdp_db_user.azurerm_key_vault_secret.sdp_vault_sdp_read_user_name
    • module.sdp_db_user.azurerm_key_vault_secret.sdp_vault_sdp_read_user_password
Change Result (Click me)
  # module.sdp_db_user.data.azurerm_key_vault.sdp_vault will be read during apply
  # (depends on a resource or a module with changes pending)
 <= data "azurerm_key_vault" "sdp_vault" {
      + access_policy                   = (known after apply)
      + enable_rbac_authorization       = (known after apply)
      + enabled_for_deployment          = (known after apply)
      + enabled_for_disk_encryption     = (known after apply)
      + enabled_for_template_deployment = (known after apply)
      + id                              = (known after apply)
      + location                        = (known after apply)
      + name                            = "mi-vault-prod"
      + network_acls                    = (known after apply)
      + public_network_access_enabled   = (known after apply)
      + purge_protection_enabled        = (known after apply)
      + rbac_authorization_enabled      = (known after apply)
      + resource_group_name             = "mi-prod-rg"
      + sku_name                        = (known after apply)
      + tags                            = (known after apply)
      + tenant_id                       = (known after apply)
      + vault_uri                       = (known after apply)
    }

  # module.sdp_db_user.data.azurerm_subscription.current will be read during apply
  # (depends on a resource or a module with changes pending)
 <= data "azurerm_subscription" "current" {
      + display_name          = (known after apply)
      + id                    = (known after apply)
      + location_placement_id = (known after apply)
      + quota_id              = (known after apply)
      + spending_limit        = (known after apply)
      + state                 = (known after apply)
      + subscription_id       = (known after apply)
      + tags                  = (known after apply)
      + tenant_id             = (known after apply)
    }

  # module.sdp_db_user.azurerm_key_vault_secret.sdp_vault_sdp_read_user_name must be replaced
-/+ resource "azurerm_key_vault_secret" "sdp_vault_sdp_read_user_name" {
      ~ id                      = "https://mi-vault-prod.vault.azure.net/secrets/cft-task-postgres-db-flexible-replica-read-user-name/e231690f18e341568c1a01ed8dbd6b7d" -> (known after apply)
      ~ key_vault_id            = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/mi-prod-rg/providers/Microsoft.KeyVault/vaults/mi-vault-prod" -> (known after apply) # forces replacement
        name                    = "cft-task-postgres-db-flexible-replica-read-user-name"
      ~ resource_id             = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/mi-prod-rg/providers/Microsoft.KeyVault/vaults/mi-vault-prod/secrets/cft-task-postgres-db-flexible-replica-read-user-name/versions/e231690f18e341568c1a01ed8dbd6b7d" -> (known after apply)
      ~ resource_versionless_id = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/mi-prod-rg/providers/Microsoft.KeyVault/vaults/mi-vault-prod/secrets/cft-task-postgres-db-flexible-replica-read-user-name" -> (known after apply)
      - tags                    = {} -> null
      - value_wo_version        = 0 -> null
      ~ version                 = "e231690f18e341568c1a01ed8dbd6b7d" -> (known after apply)
      ~ versionless_id          = "https://mi-vault-prod.vault.azure.net/secrets/cft-task-postgres-db-flexible-replica-read-user-name" -> (known after apply)
        # (3 unchanged attributes hidden)
    }

  # module.sdp_db_user.azurerm_key_vault_secret.sdp_vault_sdp_read_user_password must be replaced
-/+ resource "azurerm_key_vault_secret" "sdp_vault_sdp_read_user_password" {
      ~ id                      = "https://mi-vault-prod.vault.azure.net/secrets/cft-task-postgres-db-flexible-replica-read-user-password/d373a0a7d6904fb691ec216efcae276c" -> (known after apply)
      ~ key_vault_id            = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/mi-prod-rg/providers/Microsoft.KeyVault/vaults/mi-vault-prod" -> (known after apply) # forces replacement
        name                    = "cft-task-postgres-db-flexible-replica-read-user-password"
      ~ resource_id             = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/mi-prod-rg/providers/Microsoft.KeyVault/vaults/mi-vault-prod/secrets/cft-task-postgres-db-flexible-replica-read-user-password/versions/d373a0a7d6904fb691ec216efcae276c" -> (known after apply)
      ~ resource_versionless_id = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/mi-prod-rg/providers/Microsoft.KeyVault/vaults/mi-vault-prod/secrets/cft-task-postgres-db-flexible-replica-read-user-password" -> (known after apply)
      - tags                    = {} -> null
      - value_wo_version        = 0 -> null
      ~ version                 = "d373a0a7d6904fb691ec216efcae276c" -> (known after apply)
      ~ versionless_id          = "https://mi-vault-prod.vault.azure.net/secrets/cft-task-postgres-db-flexible-replica-read-user-password" -> (known after apply)
        # (3 unchanged attributes hidden)
    }

  # module.wa_task_management_api_database_flexible.azurerm_monitor_action_group.db-alerts-action-group[0] will be updated in-place
  ~ resource "azurerm_monitor_action_group" "db-alerts-action-group" {
        id                  = "/subscriptions/8999dec3-0104-4a27-94ee-6588559729d1/resourceGroups/cft-task-postgres-db-flexible-data-prod/providers/Microsoft.Insights/actionGroups/cft-task-postgres-db-flexible-wa-support"
        name                = "cft-task-postgres-db-flexible-wa-support"
      ~ tags                = {
          - "application"         = "task-management"
          - "builtFrom"           = "https://github.com/HMCTS/wa-task-management-api.git"
          - "businessArea"        = "CFT"
          - "contactSlackChannel" = "#wa-tech"
          - "environment"         = "production"
          - "lastUpdated"         = "2025-10-07T12:53:59Z"
          - "managedBy"           = "Work Allocation"
        } -> (known after apply)
        # (4 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

  # module.wa_task_management_api_database_flexible.azurerm_monitor_metric_alert.db_alert_cpu[0] will be updated in-place
  ~ resource "azurerm_monitor_metric_alert" "db_alert_cpu" {
        id                       = "/subscriptions/8999dec3-0104-4a27-94ee-6588559729d1/resourceGroups/cft-task-postgres-db-flexible-data-prod/providers/Microsoft.Insights/metricAlerts/db_cpu_percent_cft-task-postgres-db-flexible-prod"
        name                     = "db_cpu_percent_cft-task-postgres-db-flexible-prod"
      ~ tags                     = {
          - "application"         = "task-management"
          - "builtFrom"           = "https://github.com/HMCTS/wa-task-management-api.git"
          - "businessArea"        = "CFT"
          - "contactSlackChannel" = "#wa-tech"
          - "environment"         = "production"
          - "lastUpdated"         = "2025-10-07T12:53:59Z"
          - "managedBy"           = "Work Allocation"
        } -> (known after apply)
        # (10 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # module.wa_task_management_api_database_flexible.azurerm_monitor_metric_alert.db_alert_memory[0] will be updated in-place
  ~ resource "azurerm_monitor_metric_alert" "db_alert_memory" {
        id                       = "/subscriptions/8999dec3-0104-4a27-94ee-6588559729d1/resourceGroups/cft-task-postgres-db-flexible-data-prod/providers/Microsoft.Insights/metricAlerts/db_memory_percent_cft-task-postgres-db-flexible-prod"
        name                     = "db_memory_percent_cft-task-postgres-db-flexible-prod"
      ~ tags                     = {
          - "application"         = "task-management"
          - "builtFrom"           = "https://github.com/HMCTS/wa-task-management-api.git"
          - "businessArea"        = "CFT"
          - "contactSlackChannel" = "#wa-tech"
          - "environment"         = "production"
          - "lastUpdated"         = "2025-10-07T12:53:59Z"
          - "managedBy"           = "Work Allocation"
        } -> (known after apply)
        # (10 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # module.wa_task_management_api_database_flexible.azurerm_monitor_metric_alert.db_alert_storage_utilization[0] will be updated in-place
  ~ resource "azurerm_monitor_metric_alert" "db_alert_storage_utilization" {
        id                       = "/subscriptions/8999dec3-0104-4a27-94ee-6588559729d1/resourceGroups/cft-task-postgres-db-flexible-data-prod/providers/Microsoft.Insights/metricAlerts/db_storage_utilization_cft-task-postgres-db-flexible-prod"
        name                     = "db_storage_utilization_cft-task-postgres-db-flexible-prod"
      ~ tags                     = {
          - "application"         = "task-management"
          - "builtFrom"           = "https://github.com/HMCTS/wa-task-management-api.git"
          - "businessArea"        = "CFT"
          - "contactSlackChannel" = "#wa-tech"
          - "environment"         = "production"
          - "lastUpdated"         = "2025-10-07T12:53:59Z"
          - "managedBy"           = "Work Allocation"
        } -> (known after apply)
        # (10 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # module.wa_task_management_api_database_flexible.azurerm_postgresql_flexible_server.pgsql_server will be updated in-place
  ~ resource "azurerm_postgresql_flexible_server" "pgsql_server" {
        id                                = "/subscriptions/8999dec3-0104-4a27-94ee-6588559729d1/resourceGroups/cft-task-postgres-db-flexible-data-prod/providers/Microsoft.DBforPostgreSQL/flexibleServers/cft-task-postgres-db-flexible-prod"
        name                              = "cft-task-postgres-db-flexible-prod"
      ~ tags                              = {
          - "application"         = "task-management"
          - "builtFrom"           = "https://github.com/HMCTS/wa-task-management-api.git"
          - "businessArea"        = "CFT"
          - "contactSlackChannel" = "#wa-tech"
          - "environment"         = "production"
          - "lastUpdated"         = "2025-10-07T12:53:59Z"
          - "managedBy"           = "Work Allocation"
        } -> (known after apply)
        # (22 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # module.wa_task_management_api_database_flexible.azurerm_resource_group.rg[0] will be updated in-place
  ~ resource "azurerm_resource_group" "rg" {
        id         = "/subscriptions/8999dec3-0104-4a27-94ee-6588559729d1/resourceGroups/cft-task-postgres-db-flexible-data-prod"
        name       = "cft-task-postgres-db-flexible-data-prod"
      ~ tags       = {
          - "application"         = "task-management"
          - "builtFrom"           = "https://github.com/HMCTS/wa-task-management-api.git"
          - "businessArea"        = "CFT"
          - "contactSlackChannel" = "#wa-tech"
          - "environment"         = "production"
          - "lastUpdated"         = "2025-10-07T12:53:59Z"
          - "managedBy"           = "Work Allocation"
        } -> (known after apply)
        # (2 unchanged attributes hidden)
    }

  # module.wa_task_management_api_database_flexible_replica.azurerm_monitor_action_group.db-alerts-action-group[0] will be updated in-place
  ~ resource "azurerm_monitor_action_group" "db-alerts-action-group" {
        id                  = "/subscriptions/8999dec3-0104-4a27-94ee-6588559729d1/resourceGroups/cft-task-postgres-db-flexible-replica-data-prod/providers/Microsoft.Insights/actionGroups/cft-task-postgres-db-flexible-wa-support"
        name                = "cft-task-postgres-db-flexible-wa-support"
      ~ tags                = {
          - "application"         = "task-management"
          - "builtFrom"           = "https://github.com/HMCTS/wa-task-management-api.git"
          - "businessArea"        = "CFT"
          - "contactSlackChannel" = "#wa-tech"
          - "environment"         = "production"
          - "lastUpdated"         = "2025-10-07T12:53:59Z"
          - "managedBy"           = "Work Allocation"
        } -> (known after apply)
        # (4 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

  # module.wa_task_management_api_database_flexible_replica.azurerm_monitor_metric_alert.db_alert_cpu[0] will be updated in-place
  ~ resource "azurerm_monitor_metric_alert" "db_alert_cpu" {
        id                       = "/subscriptions/8999dec3-0104-4a27-94ee-6588559729d1/resourceGroups/cft-task-postgres-db-flexible-replica-data-prod/providers/Microsoft.Insights/metricAlerts/db_cpu_percent_cft-task-postgres-db-flexible-replica-prod"
        name                     = "db_cpu_percent_cft-task-postgres-db-flexible-replica-prod"
      ~ tags                     = {
          - "application"         = "task-management"
          - "builtFrom"           = "https://github.com/HMCTS/wa-task-management-api.git"
          - "businessArea"        = "CFT"
          - "contactSlackChannel" = "#wa-tech"
          - "environment"         = "production"
          - "lastUpdated"         = "2025-10-07T12:53:59Z"
          - "managedBy"           = "Work Allocation"
        } -> (known after apply)
        # (10 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # module.wa_task_management_api_database_flexible_replica.azurerm_monitor_metric_alert.db_alert_memory[0] will be updated in-place
  ~ resource "azurerm_monitor_metric_alert" "db_alert_memory" {
        id                       = "/subscriptions/8999dec3-0104-4a27-94ee-6588559729d1/resourceGroups/cft-task-postgres-db-flexible-replica-data-prod/providers/Microsoft.Insights/metricAlerts/db_memory_percent_cft-task-postgres-db-flexible-replica-prod"
        name                     = "db_memory_percent_cft-task-postgres-db-flexible-replica-prod"
      ~ tags                     = {
          - "application"         = "task-management"
          - "builtFrom"           = "https://github.com/HMCTS/wa-task-management-api.git"
          - "businessArea"        = "CFT"
          - "contactSlackChannel" = "#wa-tech"
          - "environment"         = "production"
          - "lastUpdated"         = "2025-10-07T12:53:59Z"
          - "managedBy"           = "Work Allocation"
        } -> (known after apply)
        # (10 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # module.wa_task_management_api_database_flexible_replica.azurerm_monitor_metric_alert.db_alert_storage_utilization[0] will be updated in-place
  ~ resource "azurerm_monitor_metric_alert" "db_alert_storage_utilization" {
        id                       = "/subscriptions/8999dec3-0104-4a27-94ee-6588559729d1/resourceGroups/cft-task-postgres-db-flexible-replica-data-prod/providers/Microsoft.Insights/metricAlerts/db_storage_utilization_cft-task-postgres-db-flexible-replica-prod"
        name                     = "db_storage_utilization_cft-task-postgres-db-flexible-replica-prod"
      ~ tags                     = {
          - "application"         = "task-management"
          - "builtFrom"           = "https://github.com/HMCTS/wa-task-management-api.git"
          - "businessArea"        = "CFT"
          - "contactSlackChannel" = "#wa-tech"
          - "environment"         = "production"
          - "lastUpdated"         = "2025-10-07T12:53:59Z"
          - "managedBy"           = "Work Allocation"
        } -> (known after apply)
        # (10 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # module.wa_task_management_api_database_flexible_replica.azurerm_postgresql_flexible_server.pgsql_server will be updated in-place
  ~ resource "azurerm_postgresql_flexible_server" "pgsql_server" {
        id                                = "/subscriptions/8999dec3-0104-4a27-94ee-6588559729d1/resourceGroups/cft-task-postgres-db-flexible-replica-data-prod/providers/Microsoft.DBforPostgreSQL/flexibleServers/cft-task-postgres-db-flexible-replica-prod"
        name                              = "cft-task-postgres-db-flexible-replica-prod"
      ~ tags                              = {
          - "application"         = "task-management"
          - "builtFrom"           = "https://github.com/HMCTS/wa-task-management-api.git"
          - "businessArea"        = "CFT"
          - "contactSlackChannel" = "#wa-tech"
          - "environment"         = "production"
          - "lastUpdated"         = "2025-10-07T12:53:59Z"
          - "managedBy"           = "Work Allocation"
        } -> (known after apply)
        # (22 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # module.wa_task_management_api_database_flexible_replica.azurerm_resource_group.rg[0] will be updated in-place
  ~ resource "azurerm_resource_group" "rg" {
        id         = "/subscriptions/8999dec3-0104-4a27-94ee-6588559729d1/resourceGroups/cft-task-postgres-db-flexible-replica-data-prod"
        name       = "cft-task-postgres-db-flexible-replica-data-prod"
      ~ tags       = {
          - "application"         = "task-management"
          - "builtFrom"           = "https://github.com/HMCTS/wa-task-management-api.git"
          - "businessArea"        = "CFT"
          - "contactSlackChannel" = "#wa-tech"
          - "environment"         = "production"
          - "lastUpdated"         = "2025-10-07T12:53:59Z"
          - "managedBy"           = "Work Allocation"
        } -> (known after apply)
        # (2 unchanged attributes hidden)
    }

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

MartinYSpasov
MartinYSpasov previously approved these changes Oct 7, 2025
# Conflicts:
#	src/integrationTest/java/uk/gov/hmcts/reform/wataskmanagementapi/controllers/ExecuteReconfigurationTaskOperationControllerTest.java
#	src/integrationTest/java/uk/gov/hmcts/reform/wataskmanagementapi/services/TaskManagementTimeZoneTest.java
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.

3 participants