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

Migrate redis cache to Basic sku in non-prod env #1141

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mokainos
Copy link
Contributor

Jira link (if applicable)

Change description

Checklist

  • 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)
  • Does this PR introduce a breaking change

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

Plan Result

⚠️ Resource Deletion will happen ⚠️

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

Plan: 2 to add, 1 to change, 2 to destroy.
  • Update
    • azurerm_key_vault_secret.redis6_connection_string
  • Replace
    • module.redis6-cache.azurerm_private_endpoint.this[0]
    • module.redis6-cache.azurerm_redis_cache.redis
Change Result (Click me)
  # azurerm_key_vault_secret.redis6_connection_string will be updated in-place
  ~ resource "azurerm_key_vault_secret" "redis6_connection_string" {
        id                      = "https://rpx-aat.vault.azure.net/secrets/mo-webapp-redis6-connection-string/e007d539e73546fcb94f10201b653757"
        name                    = "mo-webapp-redis6-connection-string"
        tags                    = {}
      ~ value                   = (sensitive value)
        # (5 unchanged attributes hidden)
    }

  # module.redis6-cache.azurerm_private_endpoint.this[0] must be replaced
-/+ resource "azurerm_private_endpoint" "this" {
      ~ custom_dns_configs       = [] -> (known after apply)
      ~ id                       = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/rpx-mo-redis6-cache-aat/providers/Microsoft.Network/privateEndpoints/rpx-mo-redis6-aat" -> (known after apply)
        name                     = "rpx-mo-redis6-aat"
      ~ network_interface        = [
          - {
              - id   = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/rpx-mo-redis6-cache-aat/providers/Microsoft.Network/networkInterfaces/rpx-mo-redis6-aat.nic.835c0867-4882-441a-97c9-b34dba741ff5"
              - name = "rpx-mo-redis6-aat.nic.835c0867-4882-441a-97c9-b34dba741ff5"
            },
        ] -> (known after apply)
      ~ private_dns_zone_configs = [
          - {
              - id                  = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/rpx-mo-redis6-cache-aat/providers/Microsoft.Network/privateEndpoints/rpx-mo-redis6-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         = "xui-mo-webapp-aat.privatelink.redis.cache.windows.net"
                      - ip_addresses = [
                          - "10.96.136.24",
                        ]
                      - name         = "xui-mo-webapp-aat"
                      - ttl          = 10
                      - type         = "A"
                    },
                ]
            },
        ] -> (known after apply)
        tags                     = {
            "application"         = "expert-ui"
            "autoShutdown"        = "true"
            "builtFrom"           = "https://github.com/HMCTS/rpx-xui-manage-organisations.git"
            "businessArea"        = "CFT"
            "contactSlackChannel" = "#xui-pipeline"
            "environment"         = "staging"
            "managedBy"           = "Expert UI"
        }
        # (3 unchanged attributes hidden)

      ~ private_dns_zone_group {
          ~ id                   = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/rpx-mo-redis6-cache-aat/providers/Microsoft.Network/privateEndpoints/rpx-mo-redis6-aat/privateDnsZoneGroups/redis-endpoint-dnszonegroup" -> (known after apply)
            name                 = "redis-endpoint-dnszonegroup"
            # (1 unchanged attribute hidden)
        }

      ~ private_service_connection {
            name                           = "rpx-mo-redis6-aat"
          ~ private_connection_resource_id = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/rpx-mo-redis6-cache-aat/providers/Microsoft.Cache/redis/xui-mo-webapp-aat" # forces replacement -> (known after apply) # forces replacement
          ~ private_ip_address             = "10.96.136.24" -> (known after apply)
            # (2 unchanged attributes hidden)
        }
    }

  # module.redis6-cache.azurerm_redis_cache.redis must be replaced
-/+ resource "azurerm_redis_cache" "redis" {
      ~ family                        = "P" -> "C"
      ~ hostname                      = "xui-mo-webapp-aat.redis.cache.windows.net" -> (known after apply)
      ~ id                            = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/rpx-mo-redis6-cache-aat/providers/Microsoft.Cache/redis/xui-mo-webapp-aat" -> (known after apply)
        name                          = "xui-mo-webapp-aat"
      ~ port                          = 6379 -> (known after apply)
      ~ primary_access_key            = (sensitive value)
      ~ primary_connection_string     = (sensitive value)
      + private_static_ip_address     = (known after apply)
      ~ redis_version                 = "6.0" -> "6"
      ~ replicas_per_master           = 0 -> (known after apply)
      ~ replicas_per_primary          = 0 -> (known after apply)
      ~ secondary_access_key          = (sensitive value)
      ~ secondary_connection_string   = (sensitive value)
      - shard_count                   = 0 -> null
      ~ sku_name                      = "Premium" -> "Basic" # forces replacement
      ~ ssl_port                      = 6380 -> (known after apply)
        tags                          = {
            "application"         = "expert-ui"
            "autoShutdown"        = "true"
            "builtFrom"           = "https://github.com/HMCTS/rpx-xui-manage-organisations.git"
            "businessArea"        = "CFT"
            "contactSlackChannel" = "#xui-pipeline"
            "environment"         = "staging"
            "managedBy"           = "Expert UI"
        }
      - tenant_settings               = {} -> null
      - zones                         = [] -> null
        # (6 unchanged attributes hidden)

      ~ redis_configuration {
          - aof_backup_enabled              = false -> null
          ~ maxclients                      = 7500 -> (known after apply)
          - rdb_backup_enabled              = false -> null
          - rdb_backup_frequency            = 0 -> null
          - rdb_backup_max_snapshot_count   = 0 -> null
            # (5 unchanged attributes hidden)
        }
    }

Plan: 2 to add, 1 to change, 2 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.

None yet

2 participants