Skip to content

DMP-5287 Create new index to improve retention performance#3092

Open
karen-hedges wants to merge 12 commits intomasterfrom
DMP-5287-CreateNewRetentionIndex
Open

DMP-5287 Create new index to improve retention performance#3092
karen-hedges wants to merge 12 commits intomasterfrom
DMP-5287-CreateNewRetentionIndex

Conversation

@karen-hedges
Copy link
Copy Markdown
Contributor

JIRA link (if applicable)

https://tools.hmcts.net/jira/browse/DMP-5287

Change description

Added new index

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

[ ] Yes
[x] No

@karen-hedges karen-hedges requested a review from a team as a code owner October 11, 2025 11:45
@karen-hedges karen-hedges requested review from DavidTMann, cakeben and jackmaloney and removed request for a team October 11, 2025 11:45
@hmcts-jenkins-cnp hmcts-jenkins-cnp bot requested a deployment to preview October 12, 2025 08:27 Abandoned
@karen-hedges karen-hedges force-pushed the DMP-5287-CreateNewRetentionIndex branch from dc1874b to 3c8927c Compare October 23, 2025 08:27
@karen-hedges karen-hedges force-pushed the DMP-5287-CreateNewRetentionIndex branch 4 times, most recently from 6bc6cee to 71fbd5f Compare October 29, 2025 14:28
@karen-hedges karen-hedges force-pushed the DMP-5287-CreateNewRetentionIndex branch 2 times, most recently from 53b8e6d to 19ee3bb Compare November 10, 2025 18:08
@karen-hedges karen-hedges force-pushed the DMP-5287-CreateNewRetentionIndex branch from 19ee3bb to 8ca8a86 Compare November 12, 2025 09:57
@karen-hedges karen-hedges force-pushed the DMP-5287-CreateNewRetentionIndex branch from 8ca8a86 to 2705492 Compare November 12, 2025 16:07
@hmcts-jenkins-cnp hmcts-jenkins-cnp bot requested a deployment to preview November 13, 2025 09:55 Abandoned
@karen-hedges karen-hedges force-pushed the DMP-5287-CreateNewRetentionIndex branch from 2705492 to cedc4fb Compare November 19, 2025 10:51
@karen-hedges karen-hedges force-pushed the DMP-5287-CreateNewRetentionIndex branch from cedc4fb to 125de79 Compare December 12, 2025 12:13
@hmcts-jenkins-cnp hmcts-jenkins-cnp bot requested a deployment to preview January 21, 2026 07:28 Abandoned
@hmcts-jenkins-cnp hmcts-jenkins-cnp bot requested a deployment to preview January 22, 2026 12:14 Abandoned
@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: 0 to add, 2 to change, 1 to destroy.
  • Update
    • module.armsa.azurerm_storage_account.storage_account
    • module.postgresql_flexible.azurerm_log_analytics_workspace.pgsql_log_analytics_workspace[0]
  • Delete
    • azurerm_postgresql_flexible_server_active_directory_administrator.jit_admin
Change Result (Click me)
  # azurerm_postgresql_flexible_server_active_directory_administrator.jit_admin will be destroyed
  # (because azurerm_postgresql_flexible_server_active_directory_administrator.jit_admin is not in configuration)
  - resource "azurerm_postgresql_flexible_server_active_directory_administrator" "jit_admin" {
      - id                  = "/subscriptions/74dacd4f-a248-45bb-a2f0-af700dc4cf68/resourceGroups/darts-stg-rg/providers/Microsoft.DBforPostgreSQL/flexibleServers/darts-api-stg/administrators/1f8cd6dc-7b59-4936-9e30-0aec58c6d355" -> null
      - object_id           = "1f8cd6dc-7b59-4936-9e30-0aec58c6d355" -> null
      - principal_name      = "DTS JIT Access Darts DB Admin" -> null
      - principal_type      = "Group" -> null
      - resource_group_name = "darts-stg-rg" -> null
      - server_name         = "darts-api-stg" -> null
      - tenant_id           = "531ff96d-0ae9-462a-8d2d-bec7c0b42082" -> null
    }

  # module.armsa.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/dartsarmstg"
        name                               = "dartsarmstg"
      ~ sftp_enabled                       = true -> false
        tags                               = {
            "application"         = "darts"
            "autoShutdown"        = "true"
            "builtFrom"           = "https://github.com/HMCTS/darts-api.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#darts-devs"
            "environment"         = "staging"
            "managedBy"           = "Darts Modernisation"
        }
        # (95 unchanged attributes hidden)

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

        # (3 unchanged blocks hidden)
    }

  # module.postgresql_flexible.azurerm_log_analytics_workspace.pgsql_log_analytics_workspace[0] will be updated in-place
  ~ resource "azurerm_log_analytics_workspace" "pgsql_log_analytics_workspace" {
        id                                      = "/subscriptions/74dacd4f-a248-45bb-a2f0-af700dc4cf68/resourceGroups/darts-stg-rg/providers/Microsoft.OperationalInsights/workspaces/darts-api-stg-workspace"
        name                                    = "darts-api-stg-workspace"
      ~ tags                                    = {
          - "application"  = "darts" -> null
          - "builtFrom"    = "https://github.com/HMCTS/darts-shared-infrastructure.git" -> null
          - "businessArea" = "Cross-Cutting" -> null
          - "environment"  = "staging" -> null
        }
        # (15 unchanged attributes hidden)
    }

Plan: 0 to add, 2 to change, 1 to destroy.

@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: 0 to add, 2 to change, 1 to destroy.
  • Update
    • module.armsa.azurerm_storage_account.storage_account
    • module.postgresql_flexible.azurerm_log_analytics_workspace.pgsql_log_analytics_workspace[0]
  • Delete
    • azurerm_postgresql_flexible_server_active_directory_administrator.jit_admin
Change Result (Click me)
  # azurerm_postgresql_flexible_server_active_directory_administrator.jit_admin will be destroyed
  # (because azurerm_postgresql_flexible_server_active_directory_administrator.jit_admin is not in configuration)
  - resource "azurerm_postgresql_flexible_server_active_directory_administrator" "jit_admin" {
      - id                  = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/darts-prod-rg/providers/Microsoft.DBforPostgreSQL/flexibleServers/darts-api-prod/administrators/1f8cd6dc-7b59-4936-9e30-0aec58c6d355" -> null
      - object_id           = "1f8cd6dc-7b59-4936-9e30-0aec58c6d355" -> null
      - principal_name      = "DTS JIT Access Darts DB Admin" -> null
      - principal_type      = "Group" -> null
      - resource_group_name = "darts-prod-rg" -> null
      - server_name         = "darts-api-prod" -> null
      - tenant_id           = "531ff96d-0ae9-462a-8d2d-bec7c0b42082" -> null
    }

  # module.armsa.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/dartsarmprod"
        name                               = "dartsarmprod"
        tags                               = {
            "application"         = "darts"
            "builtFrom"           = "https://github.com/HMCTS/darts-api.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.postgresql_flexible.azurerm_log_analytics_workspace.pgsql_log_analytics_workspace[0] will be updated in-place
  ~ resource "azurerm_log_analytics_workspace" "pgsql_log_analytics_workspace" {
        id                                      = "/subscriptions/5ca62022-6aa2-4cee-aaa7-e7536c8d566c/resourceGroups/darts-prod-rg/providers/Microsoft.OperationalInsights/workspaces/darts-api-prod-workspace"
        name                                    = "darts-api-prod-workspace"
      ~ tags                                    = {
          - "application"  = "darts" -> null
          - "builtFrom"    = "https://github.com/HMCTS/darts-shared-infrastructure.git" -> null
          - "businessArea" = "Cross-Cutting" -> null
          - "environment"  = "production" -> null
        }
        # (15 unchanged attributes hidden)
    }

Plan: 0 to add, 2 to change, 1 to destroy.

@karen-hedges karen-hedges force-pushed the DMP-5287-CreateNewRetentionIndex branch from 17bcfd5 to a74bdac Compare March 11, 2026 15:09
@hmcts-jenkins-cnp hmcts-jenkins-cnp bot requested a deployment to preview March 11, 2026 15:36 Abandoned
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