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

SDT-149: SDT: Timeout error when manually writing to dead letter queue #284

Closed
wants to merge 13 commits into from

Conversation

kiran-yenigala-hmcts
Copy link
Collaborator

JIRA link (if applicable)

https://tools.hmcts.net/jira/browse/SDT-149

Change description

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

[ ] Yes
[X ] No

paulridout
paulridout previously approved these changes Oct 2, 2023
Copy link
Collaborator

@paulridout paulridout left a comment

Choose a reason for hiding this comment

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

Changes look OK.

…nvironment basis (#285)

* Update Terraform azurerm to v3.75.0

* Update dependency commons-io:commons-io to v2.14.0

* SDT-168: SDT: Allow database retention period to be specified on an environment basis

* SDT-168: SDT: Allow database retention period to be specified on an environment basis

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@hmcts-jenkins-a-to-c
Copy link
Contributor

hmcts-jenkins-a-to-c bot commented Oct 2, 2023

Plan Result

Plan: 11 to add, 2 to change, 0 to destroy.
  • Create
    • azurerm_key_vault_secret.POSTGRES-HOST-V15
    • azurerm_key_vault_secret.POSTGRES-PASS-V15
    • azurerm_key_vault_secret.POSTGRES-USER-V15
    • module.postgresql-v15.azurerm_postgresql_flexible_server.pgsql_server
    • module.postgresql-v15.azurerm_postgresql_flexible_server_active_directory_administrator.pgsql_adadmin
    • module.postgresql-v15.azurerm_postgresql_flexible_server_active_directory_administrator.pgsql_principal_admin[0]
    • module.postgresql-v15.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["backslash_quote"]
    • module.postgresql-v15.azurerm_postgresql_flexible_server_database.pg_databases["civil_sdt"]
    • module.postgresql-v15.azurerm_resource_group.rg[0]
    • module.postgresql-v15.null_resource.set-user-permissions-additionaldbs["civil_sdt"]
    • module.postgresql-v15.random_password.password
  • Update
    • module.civil_sdt_key_vault.azurerm_monitor_diagnostic_setting.kv-ds
    • module.postgresql.azurerm_postgresql_flexible_server.pgsql_server
Change Result (Click me)
  # azurerm_key_vault_secret.POSTGRES-HOST-V15 will be created
  + resource "azurerm_key_vault_secret" "POSTGRES-HOST-V15" {
      + id                      = (known after apply)
      + key_vault_id            = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/civil-sdt-aat/providers/Microsoft.KeyVault/vaults/civil-sdt-aat"
      + name                    = "civil-sdt-POSTGRES-HOST-V15"
      + resource_id             = (known after apply)
      + resource_versionless_id = (known after apply)
      + value                   = (sensitive value)
      + version                 = (known after apply)
      + versionless_id          = (known after apply)
    }

  # azurerm_key_vault_secret.POSTGRES-PASS-V15 will be created
  + resource "azurerm_key_vault_secret" "POSTGRES-PASS-V15" {
      + id                      = (known after apply)
      + key_vault_id            = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/civil-sdt-aat/providers/Microsoft.KeyVault/vaults/civil-sdt-aat"
      + name                    = "civil-sdt-POSTGRES-PASS-V15"
      + resource_id             = (known after apply)
      + resource_versionless_id = (known after apply)
      + value                   = (sensitive value)
      + version                 = (known after apply)
      + versionless_id          = (known after apply)
    }

  # azurerm_key_vault_secret.POSTGRES-USER-V15 will be created
  + resource "azurerm_key_vault_secret" "POSTGRES-USER-V15" {
      + id                      = (known after apply)
      + key_vault_id            = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/civil-sdt-aat/providers/Microsoft.KeyVault/vaults/civil-sdt-aat"
      + name                    = "civil-sdt-POSTGRES-USER-V15"
      + resource_id             = (known after apply)
      + resource_versionless_id = (known after apply)
      + value                   = (sensitive value)
      + version                 = (known after apply)
      + versionless_id          = (known after apply)
    }

  # module.civil_sdt_key_vault.azurerm_monitor_diagnostic_setting.kv-ds will be updated in-place
  ~ resource "azurerm_monitor_diagnostic_setting" "kv-ds" {
        id                             = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/civil-sdt-aat/providers/Microsoft.KeyVault/vaults/civil-sdt-aat|civil-sdt-aat"
        name                           = "civil-sdt-aat"
        # (3 unchanged attributes hidden)

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

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

        # (3 unchanged blocks hidden)
    }

  # module.postgresql.azurerm_postgresql_flexible_server.pgsql_server will be updated in-place
  ~ resource "azurerm_postgresql_flexible_server" "pgsql_server" {
      ~ backup_retention_days         = 35 -> 7
        id                            = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/civil-sdt-data-aat/providers/Microsoft.DBforPostgreSQL/flexibleServers/civil-sdt-aat"
        name                          = "civil-sdt-aat"
        tags                          = {
            "Destroy Me"          = "No"
            "Team Contact"        = "#civil-sdt"
            "application"         = "civil"
            "autoShutdown"        = "true"
            "builtFrom"           = "https://github.com/HMCTS/civil-sdt.git"
            "businessArea"        = "CFT"
            "contactSlackChannel" = "#civil_contact"
            "environment"         = "staging"
            "managedBy"           = "Civil"
        }
        # (15 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # module.postgresql-v15.azurerm_postgresql_flexible_server.pgsql_server will be created
  + resource "azurerm_postgresql_flexible_server" "pgsql_server" {
      + administrator_login           = "pgadmin"
      + administrator_password        = (sensitive value)
      + auto_grow_enabled             = false
      + backup_retention_days         = 7
      + create_mode                   = "Default"
      + delegated_subnet_id           = "/subscriptions/96c274ce-846d-4e48-89a7-d528432298a7/resourceGroups/cft-aat-network-rg/providers/Microsoft.Network/virtualNetworks/cft-aat-vnet/subnets/postgresql"
      + fqdn                          = (known after apply)
      + geo_redundant_backup_enabled  = false
      + id                            = (known after apply)
      + location                      = "uksouth"
      + name                          = "civil-sdt-v15-aat"
      + private_dns_zone_id           = "/subscriptions/1baf5470-1c3e-40d3-a6f7-74bfbce4b348/resourceGroups/core-infra-intsvc-rg/providers/Microsoft.Network/privateDnsZones/private.postgres.database.azure.com"
      + public_network_access_enabled = (known after apply)
      + resource_group_name           = "civil-sdt-v15-data-aat"
      + sku_name                      = "GP_Standard_D2s_v3"
      + storage_mb                    = 65536
      + tags                          = {
          + "Destroy Me"          = "No"
          + "Team Contact"        = "#civil-sdt"
          + "application"         = "civil"
          + "autoShutdown"        = "true"
          + "builtFrom"           = "https://github.com/HMCTS/civil-sdt.git"
          + "businessArea"        = "CFT"
          + "contactSlackChannel" = "#civil_contact"
          + "environment"         = "staging"
          + "managedBy"           = "Civil"
        }
      + version                       = "15"

      + authentication {
          + active_directory_auth_enabled = true
          + password_auth_enabled         = true
          + tenant_id                     = "531ff96d-0ae9-462a-8d2d-bec7c0b42082"
        }

      + high_availability {
          + mode = "ZoneRedundant"
        }

      + maintenance_window {
          + day_of_week  = 0
          + start_hour   = 3
          + start_minute = 0
        }
    }

  # module.postgresql-v15.azurerm_postgresql_flexible_server_active_directory_administrator.pgsql_adadmin will be created
  + resource "azurerm_postgresql_flexible_server_active_directory_administrator" "pgsql_adadmin" {
      + id                  = (known after apply)
      + object_id           = "e7ea2042-4ced-45dd-8ae3-e051c6551789"
      + principal_name      = "DTS Platform Operations"
      + principal_type      = "Group"
      + resource_group_name = "civil-sdt-v15-data-aat"
      + server_name         = "civil-sdt-v15-aat"
      + tenant_id           = "531ff96d-0ae9-462a-8d2d-bec7c0b42082"
    }

  # module.postgresql-v15.azurerm_postgresql_flexible_server_active_directory_administrator.pgsql_principal_admin[0] will be created
  + resource "azurerm_postgresql_flexible_server_active_directory_administrator" "pgsql_principal_admin" {
      + id                  = (known after apply)
      + object_id           = "ca6d5085-485a-417d-8480-c3cefa29df31"
      + principal_name      = "jenkins-cftptl-intsvc-mi"
      + principal_type      = "ServicePrincipal"
      + resource_group_name = "civil-sdt-v15-data-aat"
      + server_name         = "civil-sdt-v15-aat"
      + tenant_id           = "531ff96d-0ae9-462a-8d2d-bec7c0b42082"
    }

  # module.postgresql-v15.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["backslash_quote"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "backslash_quote"
      + server_id = (known after apply)
      + value     = "on"
    }

  # module.postgresql-v15.azurerm_postgresql_flexible_server_database.pg_databases["civil_sdt"] will be created
  + resource "azurerm_postgresql_flexible_server_database" "pg_databases" {
      + charset   = "utf8"
      + collation = "en_GB.utf8"
      + id        = (known after apply)
      + name      = "civil_sdt"
      + server_id = (known after apply)
    }

  # module.postgresql-v15.azurerm_resource_group.rg[0] will be created
  + resource "azurerm_resource_group" "rg" {
      + id       = (known after apply)
      + location = "uksouth"
      + name     = "civil-sdt-v15-data-aat"
      + tags     = {
          + "Destroy Me"          = "No"
          + "Team Contact"        = "#civil-sdt"
          + "application"         = "civil"
          + "autoShutdown"        = "true"
          + "builtFrom"           = "https://github.com/HMCTS/civil-sdt.git"
          + "businessArea"        = "CFT"
          + "contactSlackChannel" = "#civil_contact"
          + "environment"         = "staging"
          + "managedBy"           = "Civil"
        }
    }

  # module.postgresql-v15.null_resource.set-user-permissions-additionaldbs["civil_sdt"] will be created
  + resource "null_resource" "set-user-permissions-additionaldbs" {
      + id       = (known after apply)
      + triggers = {
          + "db_reader_user" = "DTS CFT DB Access Reader"
          + "name"           = "civil-sdt-v15"
          + "script_hash"    = "f1b050abe4f2e8fc188c106259b04ba5034688164070e5ebb3e10137ad569f93"
        }
    }

  # module.postgresql-v15.random_password.password will be created
  + resource "random_password" "password" {
      + bcrypt_hash      = (sensitive value)
      + id               = (known after apply)
      + length           = 20
      + lower            = true
      + min_lower        = 0
      + min_numeric      = 0
      + min_special      = 0
      + min_upper        = 0
      + number           = true
      + numeric          = true
      + override_special = "()-_"
      + result           = (sensitive value)
      + special          = true
      + upper            = true
    }

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

@hmcts-jenkins-a-to-c hmcts-jenkins-a-to-c bot deployed to preview October 2, 2023 14:08 Active
paulridout
paulridout previously approved these changes Oct 3, 2023
Copy link
Collaborator

@paulridout paulridout left a comment

Choose a reason for hiding this comment

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

Changes look OK.

@hmcts-jenkins-a-to-c hmcts-jenkins-a-to-c bot deployed to preview October 9, 2023 10:06 Active
@paulridout
Copy link
Collaborator

Closing as changes were incorporated in pull request #320.

@paulridout paulridout closed this Oct 26, 2023
@paulridout paulridout deleted the SDT-149 branch October 26, 2023 09:58
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