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 #1406

Closed
wants to merge 4 commits into 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

@mokainos mokainos requested a review from a team as a code owner October 10, 2023 10:12
@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, 2 to change, 2 to destroy.
  • Update
    • azurerm_key_vault_secret.redis_access_key
    • azurerm_key_vault_secret.redis_connection_string
  • Replace
    • module.redis-cache.azurerm_private_endpoint.this[0]
    • module.redis-cache.azurerm_redis_cache.redis
Change Result (Click me)
  # azurerm_key_vault_secret.redis_access_key will be updated in-place
  ~ resource "azurerm_key_vault_secret" "redis_access_key" {
        id                      = "https://sscs-aat.vault.azure.net/secrets/sscs-redis-access-key/1041e3a3bc0e4f39bc868eb614e0f082"
        name                    = "sscs-redis-access-key"
        tags                    = {}
      ~ value                   = (sensitive value)
        # (5 unchanged attributes hidden)
    }

  # azurerm_key_vault_secret.redis_connection_string will be updated in-place
  ~ resource "azurerm_key_vault_secret" "redis_connection_string" {
        id                      = "https://sscs-aat.vault.azure.net/secrets/sscs-redis-connection-string/0f846170675b4b90ba1f67226bd7775f"
        name                    = "sscs-redis-connection-string"
        tags                    = {}
      ~ value                   = (sensitive value)
        # (5 unchanged attributes hidden)
    }

  # module.redis-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/sscs-cache-aat/providers/Microsoft.Network/privateEndpoints/sscs-aat" -> (known after apply)
        name                     = "sscs-aat"
      ~ network_interface        = [
          - {
              - id   = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/sscs-cache-aat/providers/Microsoft.Network/networkInterfaces/sscs-aat.nic.2c65af5a-30f4-41ab-adda-d493acb5beb6"
              - name = "sscs-aat.nic.2c65af5a-30f4-41ab-adda-d493acb5beb6"
            },
        ] -> (known after apply)
      ~ private_dns_zone_configs = [
          - {
              - id                  = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/sscs-cache-aat/providers/Microsoft.Network/privateEndpoints/sscs-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         = "sscs-aat.privatelink.redis.cache.windows.net"
                      - ip_addresses = [
                          - "10.96.136.20",
                        ]
                      - name         = "sscs-aat"
                      - ttl          = 10
                      - type         = "A"
                    },
                ]
            },
        ] -> (known after apply)
        tags                     = {
            "application"         = "social-service-child-support"
            "autoShutdown"        = "true"
            "builtFrom"           = "https://github.com/HMCTS/sscs-submit-your-appeal.git"
            "businessArea"        = "CFT"
            "contactSlackChannel" = "#sscs-tech"
            "environment"         = "staging"
            "managedBy"           = "SSCS"
        }
        # (3 unchanged attributes hidden)

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

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

  # module.redis-cache.azurerm_redis_cache.redis must be replaced
-/+ resource "azurerm_redis_cache" "redis" {
      ~ family                        = "P" -> "C"
      ~ hostname                      = "sscs-aat.redis.cache.windows.net" -> (known after apply)
      ~ id                            = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/sscs-cache-aat/providers/Microsoft.Cache/redis/sscs-aat" -> (known after apply)
        name                          = "sscs-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"         = "social-service-child-support"
            "autoShutdown"        = "true"
            "builtFrom"           = "https://github.com/HMCTS/sscs-submit-your-appeal.git"
            "businessArea"        = "CFT"
            "contactSlackChannel" = "#sscs-tech"
            "environment"         = "staging"
            "managedBy"           = "SSCS"
        }
      - 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, 2 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.

2 participants