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

Flex server expanded subnet migration #802

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

ieuanb74
Copy link
Contributor

Jira link (if applicable)

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

Change description

Creating replica flexible servers in the expanded subnet as old aat one ran out of addresses. Moving all envs for consistency.

Will use pg_dump and pg_restore to migrate data from old servers to the new ones. Have done a test run on plum.

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-a-to-c
Copy link
Contributor

hmcts-jenkins-a-to-c bot commented Apr 12, 2024

Plan Result (aat)

Plan: 23 to add, 1 to change, 0 to destroy.
  • Create
    • azurerm_key_vault_secret.postgres-v15-password
    • azurerm_key_vault_secret.postgres-v15-user
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server.pgsql_server
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_active_directory_administrator.pgsql_adadmin
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_active_directory_administrator.pgsql_principal_admin[0]
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["azure.extensions"]
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["backslash_quote"]
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["effective_cache_size"]
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["effective_io_concurrency"]
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["maintenance_work_mem"]
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["max_parallel_workers"]
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["max_parallel_workers_per_gather"]
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["max_wal_size"]
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["min_wal_size"]
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["random_page_cost"]
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["shared_buffers"]
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["wal_buffers"]
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["work_mem"]
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_database.pg_databases["camunda"]
    • module.postgresql_flexible_expanded.azurerm_resource_group.rg[0]
    • module.postgresql_flexible_expanded.null_resource.set-user-permissions-additionaldbs["camunda"]
    • module.postgresql_flexible_expanded.random_password.password
    • module.postgresql_flexible_expanded.terraform_data.trigger_password_reset
  • Update
    • module.postgresql_flexible.azurerm_postgresql_flexible_server.pgsql_server
Change Result (Click me)
  # azurerm_key_vault_secret.postgres-v15-password will be created
  + resource "azurerm_key_vault_secret" "postgres-v15-password" {
      + id                      = (known after apply)
      + key_vault_id            = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/camunda-aat/providers/Microsoft.KeyVault/vaults/camunda-aat"
      + name                    = "bpm-POSTGRES-V15-PASS"
      + 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-v15-user will be created
  + resource "azurerm_key_vault_secret" "postgres-v15-user" {
      + id                      = (known after apply)
      + key_vault_id            = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/camunda-aat/providers/Microsoft.KeyVault/vaults/camunda-aat"
      + name                    = "bpm-POSTGRES-V15-USER"
      + resource_id             = (known after apply)
      + resource_versionless_id = (known after apply)
      + value                   = (sensitive value)
      + version                 = (known after apply)
      + versionless_id          = (known after apply)
    }

  # module.postgresql_flexible.azurerm_postgresql_flexible_server.pgsql_server will be updated in-place
  ~ resource "azurerm_postgresql_flexible_server" "pgsql_server" {
        id                            = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/hmcts-camunda-v14-flexible-data-aat/providers/Microsoft.DBforPostgreSQL/flexibleServers/hmcts-camunda-v14-flexible-aat"
        name                          = "hmcts-camunda-v14-flexible-aat"
      ~ public_network_access_enabled = false -> true
        tags                          = {
            "application"         = "core"
            "autoShutdown"        = "true"
            "builtFrom"           = "https://github.com/HMCTS/camunda-bpm.git"
            "businessArea"        = "CFT"
            "contactSlackChannel" = "#platops-help"
            "environment"         = "staging"
            "managedBy"           = "Software Engineering"
        }
        # (16 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server.pgsql_server will be created
  + resource "azurerm_postgresql_flexible_server" "pgsql_server" {
      + administrator_login           = "camundaadmin"
      + administrator_password        = (sensitive value)
      + auto_grow_enabled             = false
      + backup_retention_days         = 35
      + create_mode                   = "Update"
      + delegated_subnet_id           = "/subscriptions/96c274ce-846d-4e48-89a7-d528432298a7/resourceGroups/cft-aat-network-rg/providers/Microsoft.Network/virtualNetworks/cft-aat-vnet/subnets/postgres-expanded"
      + fqdn                          = (known after apply)
      + geo_redundant_backup_enabled  = false
      + id                            = (known after apply)
      + location                      = "uksouth"
      + name                          = "hmcts-camunda-v15-flexible-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 = false
      + resource_group_name           = "hmcts-camunda-v15-flexible-data-aat"
      + sku_name                      = "GP_Standard_D2s_v3"
      + storage_mb                    = 524288
      + storage_tier                  = (known after apply)
      + tags                          = {
          + "application"         = "core"
          + "autoShutdown"        = "true"
          + "builtFrom"           = "https://github.com/HMCTS/camunda-bpm.git"
          + "businessArea"        = "CFT"
          + "contactSlackChannel" = "#platops-help"
          + "environment"         = "staging"
          + "managedBy"           = "Software Engineering"
        }
      + 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_flexible_expanded.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 = "hmcts-camunda-v15-flexible-data-aat"
      + server_name         = "hmcts-camunda-v15-flexible-aat"
      + tenant_id           = "531ff96d-0ae9-462a-8d2d-bec7c0b42082"
    }

  # module.postgresql_flexible_expanded.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 = "hmcts-camunda-v15-flexible-data-aat"
      + server_name         = "hmcts-camunda-v15-flexible-aat"
      + tenant_id           = "531ff96d-0ae9-462a-8d2d-bec7c0b42082"
    }

  # module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["azure.extensions"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "azure.extensions"
      + server_id = (known after apply)
      + value     = "PG_BUFFERCACHE,PG_STAT_STATEMENTS,PLPGSQL"
    }

  # module.postgresql_flexible_expanded.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_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["effective_cache_size"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "effective_cache_size"
      + server_id = (known after apply)
      + value     = "3932160"
    }

  # module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["effective_io_concurrency"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "effective_io_concurrency"
      + server_id = (known after apply)
      + value     = "200"
    }

  # module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["maintenance_work_mem"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "maintenance_work_mem"
      + server_id = (known after apply)
      + value     = "512000"
    }

  # module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["max_parallel_workers"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "max_parallel_workers"
      + server_id = (known after apply)
      + value     = "0"
    }

  # module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["max_parallel_workers_per_gather"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "max_parallel_workers_per_gather"
      + server_id = (known after apply)
      + value     = "0"
    }

  # module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["max_wal_size"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "max_wal_size"
      + server_id = (known after apply)
      + value     = "4096"
    }

  # module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["min_wal_size"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "min_wal_size"
      + server_id = (known after apply)
      + value     = "1024"
    }

  # module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["random_page_cost"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "random_page_cost"
      + server_id = (known after apply)
      + value     = "1.1"
    }

  # module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["shared_buffers"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "shared_buffers"
      + server_id = (known after apply)
      + value     = "786432"
    }

  # module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["wal_buffers"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "wal_buffers"
      + server_id = (known after apply)
      + value     = "16384"
    }

  # module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["work_mem"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "work_mem"
      + server_id = (known after apply)
      + value     = "7489"
    }

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

  # module.postgresql_flexible_expanded.azurerm_resource_group.rg[0] will be created
  + resource "azurerm_resource_group" "rg" {
      + id       = (known after apply)
      + location = "uksouth"
      + name     = "hmcts-camunda-v15-flexible-data-aat"
      + tags     = {
          + "application"         = "core"
          + "autoShutdown"        = "true"
          + "builtFrom"           = "https://github.com/HMCTS/camunda-bpm.git"
          + "businessArea"        = "CFT"
          + "contactSlackChannel" = "#platops-help"
          + "environment"         = "staging"
          + "managedBy"           = "Software Engineering"
        }
    }

  # module.postgresql_flexible_expanded.null_resource.set-user-permissions-additionaldbs["camunda"] will be created
  + resource "null_resource" "set-user-permissions-additionaldbs" {
      + id       = (known after apply)
      + triggers = {
          + "db_reader_user" = "DTS CFT DB Access Reader"
          + "force_trigger"  = null
          + "name"           = "hmcts-camunda-v15-flexible"
          + "script_hash"    = "dbe0102f3129d4463913d5e01177e806bc6954005bdd98f20c242658634a1bbc"
        }
    }

  # module.postgresql_flexible_expanded.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
    }

  # module.postgresql_flexible_expanded.terraform_data.trigger_password_reset will be created
  + resource "terraform_data" "trigger_password_reset" {
      + id     = (known after apply)
      + input  = ""
      + output = (known after apply)
    }

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

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

hmcts-jenkins-a-to-c bot commented Apr 12, 2024

Plan Result (prod)

Plan: 23 to add, 1 to change, 0 to destroy.
  • Create
    • azurerm_key_vault_secret.postgres-v15-password
    • azurerm_key_vault_secret.postgres-v15-user
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server.pgsql_server
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_active_directory_administrator.pgsql_adadmin
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_active_directory_administrator.pgsql_principal_admin[0]
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["azure.extensions"]
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["backslash_quote"]
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["effective_cache_size"]
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["effective_io_concurrency"]
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["maintenance_work_mem"]
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["max_parallel_workers"]
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["max_parallel_workers_per_gather"]
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["max_wal_size"]
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["min_wal_size"]
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["random_page_cost"]
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["shared_buffers"]
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["wal_buffers"]
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["work_mem"]
    • module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_database.pg_databases["camunda"]
    • module.postgresql_flexible_expanded.azurerm_resource_group.rg[0]
    • module.postgresql_flexible_expanded.null_resource.set-user-permissions-additionaldbs["camunda"]
    • module.postgresql_flexible_expanded.random_password.password
    • module.postgresql_flexible_expanded.terraform_data.trigger_password_reset
  • Update
    • module.postgresql_flexible.azurerm_postgresql_flexible_server.pgsql_server
Change Result (Click me)
  # azurerm_key_vault_secret.postgres-v15-password will be created
  + resource "azurerm_key_vault_secret" "postgres-v15-password" {
      + id                      = (known after apply)
      + key_vault_id            = "/subscriptions/8999dec3-0104-4a27-94ee-6588559729d1/resourceGroups/camunda-prod/providers/Microsoft.KeyVault/vaults/camunda-prod"
      + name                    = "bpm-POSTGRES-V15-PASS"
      + 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-v15-user will be created
  + resource "azurerm_key_vault_secret" "postgres-v15-user" {
      + id                      = (known after apply)
      + key_vault_id            = "/subscriptions/8999dec3-0104-4a27-94ee-6588559729d1/resourceGroups/camunda-prod/providers/Microsoft.KeyVault/vaults/camunda-prod"
      + name                    = "bpm-POSTGRES-V15-USER"
      + resource_id             = (known after apply)
      + resource_versionless_id = (known after apply)
      + value                   = (sensitive value)
      + version                 = (known after apply)
      + versionless_id          = (known after apply)
    }

  # module.postgresql_flexible.azurerm_postgresql_flexible_server.pgsql_server will be updated in-place
  ~ resource "azurerm_postgresql_flexible_server" "pgsql_server" {
        id                            = "/subscriptions/8999dec3-0104-4a27-94ee-6588559729d1/resourceGroups/hmcts-camunda-v14-flexible-data-prod/providers/Microsoft.DBforPostgreSQL/flexibleServers/hmcts-camunda-v14-flexible-prod"
        name                          = "hmcts-camunda-v14-flexible-prod"
      ~ public_network_access_enabled = false -> true
        tags                          = {
            "application"         = "core"
            "builtFrom"           = "https://github.com/HMCTS/camunda-bpm.git"
            "businessArea"        = "CFT"
            "contactSlackChannel" = "#platops-help"
            "environment"         = "production"
            "managedBy"           = "Software Engineering"
        }
        # (17 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server.pgsql_server will be created
  + resource "azurerm_postgresql_flexible_server" "pgsql_server" {
      + administrator_login           = "camundaadmin"
      + administrator_password        = (sensitive value)
      + auto_grow_enabled             = false
      + backup_retention_days         = 35
      + create_mode                   = "Update"
      + delegated_subnet_id           = "/subscriptions/8cbc6f36-7c56-4963-9d36-739db5d00b27/resourceGroups/cft-prod-network-rg/providers/Microsoft.Network/virtualNetworks/cft-prod-vnet/subnets/postgres-expanded"
      + fqdn                          = (known after apply)
      + geo_redundant_backup_enabled  = false
      + id                            = (known after apply)
      + location                      = "uksouth"
      + name                          = "hmcts-camunda-v15-flexible-prod"
      + 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 = false
      + resource_group_name           = "hmcts-camunda-v15-flexible-data-prod"
      + sku_name                      = "GP_Standard_D8s_v3"
      + storage_mb                    = 524288
      + storage_tier                  = (known after apply)
      + tags                          = {
          + "application"         = "core"
          + "builtFrom"           = "https://github.com/HMCTS/camunda-bpm.git"
          + "businessArea"        = "CFT"
          + "contactSlackChannel" = "#platops-help"
          + "environment"         = "production"
          + "managedBy"           = "Software Engineering"
        }
      + 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_flexible_expanded.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           = "4d0554dd-fe60-424a-be9c-36636826d927"
      + principal_name      = "DTS Platform Operations SC"
      + principal_type      = "Group"
      + resource_group_name = "hmcts-camunda-v15-flexible-data-prod"
      + server_name         = "hmcts-camunda-v15-flexible-prod"
      + tenant_id           = "531ff96d-0ae9-462a-8d2d-bec7c0b42082"
    }

  # module.postgresql_flexible_expanded.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 = "hmcts-camunda-v15-flexible-data-prod"
      + server_name         = "hmcts-camunda-v15-flexible-prod"
      + tenant_id           = "531ff96d-0ae9-462a-8d2d-bec7c0b42082"
    }

  # module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["azure.extensions"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "azure.extensions"
      + server_id = (known after apply)
      + value     = "PG_BUFFERCACHE,PG_STAT_STATEMENTS,PLPGSQL"
    }

  # module.postgresql_flexible_expanded.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_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["effective_cache_size"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "effective_cache_size"
      + server_id = (known after apply)
      + value     = "3932160"
    }

  # module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["effective_io_concurrency"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "effective_io_concurrency"
      + server_id = (known after apply)
      + value     = "200"
    }

  # module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["maintenance_work_mem"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "maintenance_work_mem"
      + server_id = (known after apply)
      + value     = "512000"
    }

  # module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["max_parallel_workers"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "max_parallel_workers"
      + server_id = (known after apply)
      + value     = "0"
    }

  # module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["max_parallel_workers_per_gather"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "max_parallel_workers_per_gather"
      + server_id = (known after apply)
      + value     = "0"
    }

  # module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["max_wal_size"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "max_wal_size"
      + server_id = (known after apply)
      + value     = "4096"
    }

  # module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["min_wal_size"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "min_wal_size"
      + server_id = (known after apply)
      + value     = "1024"
    }

  # module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["random_page_cost"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "random_page_cost"
      + server_id = (known after apply)
      + value     = "1.1"
    }

  # module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["shared_buffers"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "shared_buffers"
      + server_id = (known after apply)
      + value     = "838860"
    }

  # module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["wal_buffers"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "wal_buffers"
      + server_id = (known after apply)
      + value     = "16384"
    }

  # module.postgresql_flexible_expanded.azurerm_postgresql_flexible_server_configuration.pgsql_server_config["work_mem"] will be created
  + resource "azurerm_postgresql_flexible_server_configuration" "pgsql_server_config" {
      + id        = (known after apply)
      + name      = "work_mem"
      + server_id = (known after apply)
      + value     = "7489"
    }

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

  # module.postgresql_flexible_expanded.azurerm_resource_group.rg[0] will be created
  + resource "azurerm_resource_group" "rg" {
      + id       = (known after apply)
      + location = "uksouth"
      + name     = "hmcts-camunda-v15-flexible-data-prod"
      + tags     = {
          + "application"         = "core"
          + "builtFrom"           = "https://github.com/HMCTS/camunda-bpm.git"
          + "businessArea"        = "CFT"
          + "contactSlackChannel" = "#platops-help"
          + "environment"         = "production"
          + "managedBy"           = "Software Engineering"
        }
    }

  # module.postgresql_flexible_expanded.null_resource.set-user-permissions-additionaldbs["camunda"] will be created
  + resource "null_resource" "set-user-permissions-additionaldbs" {
      + id       = (known after apply)
      + triggers = {
          + "db_reader_user" = "DTS JIT Access camunda DB Reader SC"
          + "force_trigger"  = null
          + "name"           = "hmcts-camunda-v15-flexible"
          + "script_hash"    = "dbe0102f3129d4463913d5e01177e806bc6954005bdd98f20c242658634a1bbc"
        }
    }

  # module.postgresql_flexible_expanded.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
    }

  # module.postgresql_flexible_expanded.terraform_data.trigger_password_reset will be created
  + resource "terraform_data" "trigger_password_reset" {
      + id     = (known after apply)
      + input  = ""
      + output = (known after apply)
    }

Plan: 23 to add, 1 to change, 0 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