Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Cleanup redis cache on plum #974

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ciaranca
Copy link
Contributor

Jira link (if applicable)

https://tools.hmcts.net/jira/browse/DTSPO-17012

Change description

Cleanup redis cache on plum

@hmcts-jenkins-a-to-c
Copy link
Contributor

Plan Result (aat)

⚠️ Resource Deletion will happen ⚠️

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

Plan: 0 to add, 0 to change, 3 to destroy.
  • Delete
    • module.plum-redis-storage.azurerm_private_endpoint.this[0]
    • module.plum-redis-storage.azurerm_redis_cache.redis
    • module.plum-redis-storage.azurerm_resource_group.cache-resourcegroup[0]
Change Result (Click me)
  # module.plum-redis-storage.azurerm_private_endpoint.this[0] will be destroyed
  # (because azurerm_private_endpoint.this is not in configuration)
  - resource "azurerm_private_endpoint" "this" {
      - custom_dns_configs            = [] -> null
      - id                            = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/plum-recipe-backend-session-storage-cache-aat/providers/Microsoft.Network/privateEndpoints/plum-recipe-backend-session-storage-aat" -> null
      - location                      = "uksouth" -> null
      - name                          = "plum-recipe-backend-session-storage-aat" -> null
      - network_interface             = [
          - {
              - id   = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/plum-recipe-backend-session-storage-cache-aat/providers/Microsoft.Network/networkInterfaces/plum-recipe-backend-session-storage-aat.nic.a031e79e-f9a2-4db1-9561-ab8a09ee8478"
              - name = "plum-recipe-backend-session-storage-aat.nic.a031e79e-f9a2-4db1-9561-ab8a09ee8478"
            },
        ] -> null
      - private_dns_zone_configs      = [
          - {
              - id                  = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/plum-recipe-backend-session-storage-cache-aat/providers/Microsoft.Network/privateEndpoints/plum-recipe-backend-session-storage-aat/privateDnsZoneGroups/redis-endpoint-dnszonegroup/privateDnsZoneConfigs/privatelink.redis.cache.windows.net"
              - name                = "privatelink.redis.cache.windows.net"
              - private_dns_zone_id = "/subscriptions/1baf5470-1c3e-40d3-a6f7-74bfbce4b348/resourceGroups/core-infra-intsvc-rg/providers/Microsoft.Network/privateDnsZones/privatelink.redis.cache.windows.net"
              - record_sets         = [
                  - {
                      - fqdn         = "plum-recipe-backend-session-storage-aat.privatelink.redis.cache.windows.net"
                      - ip_addresses = [
                          - "10.96.136.31",
                        ]
                      - name         = "plum-recipe-backend-session-storage-aat"
                      - ttl          = 10
                      - type         = "A"
                    },
                ]
            },
        ] -> null
      - resource_group_name           = "plum-recipe-backend-session-storage-cache-aat" -> null
      - subnet_id                     = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/core-infra-aat/providers/Microsoft.Network/virtualNetworks/core-infra-vnet-aat/subnets/core-infra-subnet-2-aat" -> null
      - tags                          = {
          - "application"         = "core"
          - "autoShutdown"        = "true"
          - "builtFrom"           = "https://github.com/HMCTS/cnp-plum-recipes-service.git"
          - "businessArea"        = "CFT"
          - "contactSlackChannel" = "#platops-help"
          - "environment"         = "staging"
          - "managedBy"           = "CNP"
        } -> null
        # (1 unchanged attribute hidden)

      - private_dns_zone_group {
          - id                   = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/plum-recipe-backend-session-storage-cache-aat/providers/Microsoft.Network/privateEndpoints/plum-recipe-backend-session-storage-aat/privateDnsZoneGroups/redis-endpoint-dnszonegroup" -> null
          - name                 = "redis-endpoint-dnszonegroup" -> null
          - private_dns_zone_ids = [
              - "/subscriptions/1baf5470-1c3e-40d3-a6f7-74bfbce4b348/resourceGroups/core-infra-intsvc-rg/providers/Microsoft.Network/privateDnsZones/privatelink.redis.cache.windows.net",
            ] -> null
        }

      - private_service_connection {
          - is_manual_connection              = false -> null
          - name                              = "plum-recipe-backend-session-storage-aat" -> null
          - private_connection_resource_id    = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/plum-recipe-backend-session-storage-cache-aat/providers/Microsoft.Cache/redis/plum-recipe-backend-session-storage-aat" -> null
          - private_ip_address                = "10.96.136.31" -> null
          - subresource_names                 = [
              - "redisCache",
            ] -> null
            # (2 unchanged attributes hidden)
        }
    }

  # module.plum-redis-storage.azurerm_redis_cache.redis will be destroyed
  # (because azurerm_redis_cache.redis is not in configuration)
  - resource "azurerm_redis_cache" "redis" {
      - capacity                      = 1 -> null
      - enable_non_ssl_port           = false -> null
      - family                        = "C" -> null
      - hostname                      = "plum-recipe-backend-session-storage-aat.redis.cache.windows.net" -> null
      - id                            = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/plum-recipe-backend-session-storage-cache-aat/providers/Microsoft.Cache/redis/plum-recipe-backend-session-storage-aat" -> null
      - location                      = "uksouth" -> null
      - minimum_tls_version           = "1.2" -> null
      - name                          = "plum-recipe-backend-session-storage-aat" -> null
      - port                          = 6379 -> null
      - primary_access_key            = (sensitive value) -> null
      - primary_connection_string     = (sensitive value) -> null
      - public_network_access_enabled = false -> null
      - redis_version                 = "6.0" -> null
      - replicas_per_master           = 0 -> null
      - replicas_per_primary          = 0 -> null
      - resource_group_name           = "plum-recipe-backend-session-storage-cache-aat" -> null
      - secondary_access_key          = (sensitive value) -> null
      - secondary_connection_string   = (sensitive value) -> null
      - shard_count                   = 0 -> null
      - sku_name                      = "Basic" -> null
      - ssl_port                      = 6380 -> null
      - tags                          = {
          - "application"         = "core"
          - "autoShutdown"        = "true"
          - "builtFrom"           = "https://github.com/HMCTS/cnp-plum-recipes-service.git"
          - "businessArea"        = "CFT"
          - "contactSlackChannel" = "#platops-help"
          - "environment"         = "staging"
          - "managedBy"           = "CNP"
        } -> null
      - tenant_settings               = {} -> null
      - zones                         = [] -> null
        # (2 unchanged attributes hidden)

      - redis_configuration {
          - active_directory_authentication_enabled = false -> null
          - aof_backup_enabled                      = false -> null
          - data_persistence_authentication_method  = "SAS" -> null
          - enable_authentication                   = true -> null
          - maxclients                              = 1000 -> null
          - maxfragmentationmemory_reserved         = 125 -> null
          - maxmemory_delta                         = 125 -> null
          - maxmemory_policy                        = "volatile-lru" -> null
          - maxmemory_reserved                      = 125 -> null
          - rdb_backup_enabled                      = false -> null
          - rdb_backup_frequency                    = 0 -> null
          - rdb_backup_max_snapshot_count           = 0 -> null
            # (5 unchanged attributes hidden)
        }
    }

  # module.plum-redis-storage.azurerm_resource_group.cache-resourcegroup[0] will be destroyed
  # (because azurerm_resource_group.cache-resourcegroup is not in configuration)
  - resource "azurerm_resource_group" "cache-resourcegroup" {
      - id         = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/plum-recipe-backend-session-storage-cache-aat" -> null
      - location   = "uksouth" -> null
      - name       = "plum-recipe-backend-session-storage-cache-aat" -> null
      - tags       = {
          - "application"         = "core"
          - "autoShutdown"        = "true"
          - "builtFrom"           = "https://github.com/HMCTS/cnp-plum-recipes-service.git"
          - "businessArea"        = "CFT"
          - "contactSlackChannel" = "#platops-help"
          - "environment"         = "staging"
          - "managedBy"           = "CNP"
        } -> null
        # (1 unchanged attribute hidden)
    }

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

@hmcts-jenkins-a-to-c
Copy link
Contributor

Plan Result (prod)

No changes. Your infrastructure matches the configuration.

@hmcts-jenkins-cft
Copy link
Contributor

Plan Result (sandbox)

⚠️ Resource Deletion will happen ⚠️

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

Plan: 0 to add, 0 to change, 4 to destroy.
  • Delete
    • module.plum-redis-storage.azurerm_private_endpoint.this[0]
    • module.plum-redis-storage.azurerm_redis_cache.redis
    • module.plum-redis-storage.azurerm_resource_group.cache-resourcegroup[0]
    • module.plum-redis-storage.azurerm_storage_account.backup[0]
Change Result (Click me)
  # module.plum-redis-storage.azurerm_private_endpoint.this[0] will be destroyed
  # (because azurerm_private_endpoint.this is not in configuration)
  - resource "azurerm_private_endpoint" "this" {
      - custom_dns_configs            = [] -> null
      - id                            = "/subscriptions/bf308a5c-0624-4334-8ff8-8dca9fd43783/resourceGroups/crumble-recipe-backend-session-storage-cache-sandbox/providers/Microsoft.Network/privateEndpoints/crumble-recipe-backend-session-storage-sandbox" -> null
      - location                      = "uksouth" -> null
      - name                          = "crumble-recipe-backend-session-storage-sandbox" -> null
      - network_interface             = [
          - {
              - id   = "/subscriptions/bf308a5c-0624-4334-8ff8-8dca9fd43783/resourceGroups/crumble-recipe-backend-session-storage-cache-sandbox/providers/Microsoft.Network/networkInterfaces/crumble-recipe-backend-session-storage-sand.nic.e8567369-1005-47bd-8653-6a20a625c8d6"
              - name = "crumble-recipe-backend-session-storage-sand.nic.e8567369-1005-47bd-8653-6a20a625c8d6"
            },
        ] -> null
      - private_dns_zone_configs      = [
          - {
              - id                  = "/subscriptions/bf308a5c-0624-4334-8ff8-8dca9fd43783/resourceGroups/crumble-recipe-backend-session-storage-cache-sandbox/providers/Microsoft.Network/privateEndpoints/crumble-recipe-backend-session-storage-sandbox/privateDnsZoneGroups/redis-endpoint-dnszonegroup/privateDnsZoneConfigs/privatelink.redis.cache.windows.net"
              - name                = "privatelink.redis.cache.windows.net"
              - private_dns_zone_id = "/subscriptions/1baf5470-1c3e-40d3-a6f7-74bfbce4b348/resourceGroups/core-infra-intsvc-rg/providers/Microsoft.Network/privateDnsZones/privatelink.redis.cache.windows.net"
              - record_sets         = [
                  - {
                      - fqdn         = "crumble-recipe-backend-session-storage-sandbox.privatelink.redis.cache.windows.net"
                      - ip_addresses = [
                          - "10.100.136.5",
                        ]
                      - name         = "crumble-recipe-backend-session-storage-sandbox"
                      - ttl          = 10
                      - type         = "A"
                    },
                ]
            },
        ] -> null
      - resource_group_name           = "crumble-recipe-backend-session-storage-cache-sandbox" -> null
      - subnet_id                     = "/subscriptions/bf308a5c-0624-4334-8ff8-8dca9fd43783/resourceGroups/core-infra-sandbox/providers/Microsoft.Network/virtualNetworks/core-infra-vnet-sandbox/subnets/core-infra-subnet-2-sandbox" -> null
      - tags                          = {
          - "application"         = "core"
          - "autoShutdown"        = "true"
          - "builtFrom"           = "https://github.com/HMCTS/cnp-plum-recipes-service.git"
          - "businessArea"        = "CFT"
          - "contactSlackChannel" = "#platops-help"
          - "environment"         = "sandbox"
          - "expiresAfter"        = "2024-05-16"
          - "managedBy"           = "CNP"
          - "startupMode"         = "onDemand"
        } -> null
        # (1 unchanged attribute hidden)

      - private_dns_zone_group {
          - id                   = "/subscriptions/bf308a5c-0624-4334-8ff8-8dca9fd43783/resourceGroups/crumble-recipe-backend-session-storage-cache-sandbox/providers/Microsoft.Network/privateEndpoints/crumble-recipe-backend-session-storage-sandbox/privateDnsZoneGroups/redis-endpoint-dnszonegroup" -> null
          - name                 = "redis-endpoint-dnszonegroup" -> null
          - private_dns_zone_ids = [
              - "/subscriptions/1baf5470-1c3e-40d3-a6f7-74bfbce4b348/resourceGroups/core-infra-intsvc-rg/providers/Microsoft.Network/privateDnsZones/privatelink.redis.cache.windows.net",
            ] -> null
        }

      - private_service_connection {
          - is_manual_connection              = false -> null
          - name                              = "crumble-recipe-backend-session-storage-sandbox" -> null
          - private_connection_resource_id    = "/subscriptions/bf308a5c-0624-4334-8ff8-8dca9fd43783/resourceGroups/crumble-recipe-backend-session-storage-cache-sandbox/providers/Microsoft.Cache/redis/crumble-recipe-backend-session-storage-sandbox" -> null
          - private_ip_address                = "10.100.136.5" -> null
          - subresource_names                 = [
              - "redisCache",
            ] -> null
            # (2 unchanged attributes hidden)
        }
    }

  # module.plum-redis-storage.azurerm_redis_cache.redis will be destroyed
  # (because azurerm_redis_cache.redis is not in configuration)
  - resource "azurerm_redis_cache" "redis" {
      - capacity                      = 1 -> null
      - enable_non_ssl_port           = false -> null
      - family                        = "P" -> null
      - hostname                      = "crumble-recipe-backend-session-storage-sandbox.redis.cache.windows.net" -> null
      - id                            = "/subscriptions/bf308a5c-0624-4334-8ff8-8dca9fd43783/resourceGroups/crumble-recipe-backend-session-storage-cache-sandbox/providers/Microsoft.Cache/redis/crumble-recipe-backend-session-storage-sandbox" -> null
      - location                      = "uksouth" -> null
      - minimum_tls_version           = "1.2" -> null
      - name                          = "crumble-recipe-backend-session-storage-sandbox" -> null
      - port                          = 6379 -> null
      - primary_access_key            = (sensitive value) -> null
      - primary_connection_string     = (sensitive value) -> null
      - public_network_access_enabled = false -> null
      - redis_version                 = "6.0" -> null
      - replicas_per_master           = 0 -> null
      - replicas_per_primary          = 0 -> null
      - resource_group_name           = "crumble-recipe-backend-session-storage-cache-sandbox" -> null
      - secondary_access_key          = (sensitive value) -> null
      - secondary_connection_string   = (sensitive value) -> null
      - shard_count                   = 0 -> null
      - sku_name                      = "Premium" -> null
      - ssl_port                      = 6380 -> null
      - tags                          = {
          - "application"         = "core"
          - "autoShutdown"        = "true"
          - "builtFrom"           = "https://github.com/HMCTS/cnp-plum-recipes-service.git"
          - "businessArea"        = "CFT"
          - "contactSlackChannel" = "#platops-help"
          - "environment"         = "sandbox"
          - "expiresAfter"        = "2024-05-16"
          - "managedBy"           = "CNP"
          - "startupMode"         = "onDemand"
        } -> null
      - tenant_settings               = {} -> null
      - zones                         = [] -> null
        # (2 unchanged attributes hidden)

      - redis_configuration {
          - active_directory_authentication_enabled = false -> null
          - aof_backup_enabled                      = false -> null
          - data_persistence_authentication_method  = "SAS" -> null
          - enable_authentication                   = true -> null
          - maxclients                              = 7500 -> null
          - maxfragmentationmemory_reserved         = 642 -> null
          - maxmemory_delta                         = 642 -> null
          - maxmemory_policy                        = "volatile-lru" -> null
          - maxmemory_reserved                      = 642 -> null
          - rdb_backup_enabled                      = true -> null
          - rdb_backup_frequency                    = 360 -> null
          - rdb_backup_max_snapshot_count           = 0 -> null
          - rdb_storage_connection_string           = (sensitive value) -> null
            # (4 unchanged attributes hidden)
        }
    }

  # module.plum-redis-storage.azurerm_resource_group.cache-resourcegroup[0] will be destroyed
  # (because azurerm_resource_group.cache-resourcegroup is not in configuration)
  - resource "azurerm_resource_group" "cache-resourcegroup" {
      - id         = "/subscriptions/bf308a5c-0624-4334-8ff8-8dca9fd43783/resourceGroups/crumble-recipe-backend-session-storage-cache-sandbox" -> null
      - location   = "uksouth" -> null
      - name       = "crumble-recipe-backend-session-storage-cache-sandbox" -> null
      - tags       = {
          - "application"         = "core"
          - "autoShutdown"        = "true"
          - "builtFrom"           = "https://github.com/HMCTS/cnp-plum-recipes-service.git"
          - "businessArea"        = "CFT"
          - "contactSlackChannel" = "#platops-help"
          - "environment"         = "sandbox"
          - "expiresAfter"        = "2024-05-16"
          - "managedBy"           = "CNP"
          - "startupMode"         = "onDemand"
        } -> null
        # (1 unchanged attribute hidden)
    }

  # module.plum-redis-storage.azurerm_storage_account.backup[0] will be destroyed
  # (because azurerm_storage_account.backup is not in configuration)
  - resource "azurerm_storage_account" "backup" {
      - access_tier                       = "Hot" -> null
      - account_kind                      = "StorageV2" -> null
      - account_replication_type          = "GRS" -> null
      - account_tier                      = "Standard" -> null
      - allow_nested_items_to_be_public   = true -> null
      - cross_tenant_replication_enabled  = true -> null
      - default_to_oauth_authentication   = false -> null
      - dns_endpoint_type                 = "Standard" -> null
      - enable_https_traffic_only         = true -> null
      - id                                = "/subscriptions/bf308a5c-0624-4334-8ff8-8dca9fd43783/resourceGroups/crumble-recipe-backend-session-storage-cache-sandbox/providers/Microsoft.Storage/storageAccounts/crumblesandboxredissa" -> null
      - infrastructure_encryption_enabled = false -> null
      - is_hns_enabled                    = false -> null
      - local_user_enabled                = true -> null
      - location                          = "uksouth" -> null
      - min_tls_version                   = "TLS1_2" -> null
      - name                              = "crumblesandboxredissa" -> null
      - nfsv3_enabled                     = false -> null
      - primary_access_key                = (sensitive value) -> null
      - primary_blob_connection_string    = (sensitive value) -> null
      - primary_blob_endpoint             = "https://crumblesandboxredissa.blob.core.windows.net/" -> null
      - primary_blob_host                 = "crumblesandboxredissa.blob.core.windows.net" -> null
      - primary_connection_string         = (sensitive value) -> null
      - primary_dfs_endpoint              = "https://crumblesandboxredissa.dfs.core.windows.net/" -> null
      - primary_dfs_host                  = "crumblesandboxredissa.dfs.core.windows.net" -> null
      - primary_file_endpoint             = "https://crumblesandboxredissa.file.core.windows.net/" -> null
      - primary_file_host                 = "crumblesandboxredissa.file.core.windows.net" -> null
      - primary_location                  = "uksouth" -> null
      - primary_queue_endpoint            = "https://crumblesandboxredissa.queue.core.windows.net/" -> null
      - primary_queue_host                = "crumblesandboxredissa.queue.core.windows.net" -> null
      - primary_table_endpoint            = "https://crumblesandboxredissa.table.core.windows.net/" -> null
      - primary_table_host                = "crumblesandboxredissa.table.core.windows.net" -> null
      - primary_web_endpoint              = "https://crumblesandboxredissa.z33.web.core.windows.net/" -> null
      - primary_web_host                  = "crumblesandboxredissa.z33.web.core.windows.net" -> null
      - public_network_access_enabled     = true -> null
      - queue_encryption_key_type         = "Service" -> null
      - resource_group_name               = "crumble-recipe-backend-session-storage-cache-sandbox" -> null
      - secondary_access_key              = (sensitive value) -> null
      - secondary_connection_string       = (sensitive value) -> null
      - secondary_location                = "ukwest" -> null
      - sftp_enabled                      = false -> null
      - shared_access_key_enabled         = true -> null
      - table_encryption_key_type         = "Service" -> null
      - tags                              = {
          - "application"         = "core"
          - "autoShutdown"        = "true"
          - "builtFrom"           = "https://github.com/HMCTS/cnp-plum-recipes-service.git"
          - "businessArea"        = "CFT"
          - "contactSlackChannel" = "#platops-help"
          - "environment"         = "sandbox"
          - "expiresAfter"        = "2024-05-16"
          - "managedBy"           = "CNP"
          - "startupMode"         = "onDemand"
        } -> null
        # (23 unchanged attributes hidden)

      - blob_properties {
          - change_feed_enabled           = false -> null
          - change_feed_retention_in_days = 0 -> null
          - last_access_time_enabled      = false -> null
          - versioning_enabled            = false -> null
            # (1 unchanged attribute hidden)
        }

      - network_rules {
          - bypass                     = [
              - "AzureServices",
            ] -> null
          - default_action             = "Allow" -> null
          - ip_rules                   = [] -> null
          - virtual_network_subnet_ids = [] -> null
        }

      - queue_properties {
          - hour_metrics {
              - enabled               = true -> null
              - include_apis          = true -> null
              - retention_policy_days = 7 -> null
              - version               = "1.0" -> null
            }
          - logging {
              - delete                = false -> null
              - read                  = false -> null
              - retention_policy_days = 0 -> null
              - version               = "1.0" -> null
              - write                 = false -> null
            }
          - minute_metrics {
              - enabled               = false -> null
              - include_apis          = false -> null
              - retention_policy_days = 0 -> null
              - version               = "1.0" -> null
            }
        }

      - share_properties {
          - retention_policy {
              - days = 7 -> null
            }
        }
    }

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

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.

2 participants