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

CRF-9-database configuration fix #104

Merged
merged 1 commit into from
Sep 18, 2024
Merged

CRF-9-database configuration fix #104

merged 1 commit into from
Sep 18, 2024

Conversation

ssivas6
Copy link
Contributor

@ssivas6 ssivas6 commented Sep 18, 2024

JIRA link (if applicable)

https://tools.hmcts.net/jira/browse/CRF-9

Change description

Adding fix to the database configuration

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

[ ] Yes
[x] No

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

Plan Result (aat)

Plan: 9 to add, 0 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_rtl_export"]
    • module.postgresql-v15.null_resource.set-user-permissions-additionaldbs["civil_rtl_export"]
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-rtl-export-aat/providers/Microsoft.KeyVault/vaults/civil-rtl-export-aat"
      + name                    = "civil-rtl-export-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-rtl-export-aat/providers/Microsoft.KeyVault/vaults/civil-rtl-export-aat"
      + name                    = "civil-rtl-export-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-rtl-export-aat/providers/Microsoft.KeyVault/vaults/civil-rtl-export-aat"
      + name                    = "civil-rtl-export-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.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/postgres-expanded"
      + fqdn                          = (known after apply)
      + geo_redundant_backup_enabled  = false
      + id                            = (known after apply)
      + location                      = "uksouth"
      + name                          = "civil-rtl-export-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 = false
      + resource_group_name           = "civil-rtl-export-v15-data-aat"
      + sku_name                      = "GP_Standard_D2s_v3"
      + storage_mb                    = 65536
      + storage_tier                  = (known after apply)
      + tags                          = {
          + "Destroy Me"          = "No"
          + "Team Contact"        = "#civil-sdt"
          + "application"         = "civil"
          + "autoShutdown"        = "true"
          + "builtFrom"           = "https://github.com/HMCTS/civil-rtl-export.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-rtl-export-v15-data-aat"
      + server_name         = "civil-rtl-export-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-rtl-export-v15-data-aat"
      + server_name         = "civil-rtl-export-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_rtl_export"] will be created
  + resource "azurerm_postgresql_flexible_server_database" "pg_databases" {
      + charset   = "utf8"
      + collation = "en_GB.utf8"
      + id        = (known after apply)
      + name      = "civil_rtl_export"
      + server_id = (known after apply)
    }

  # module.postgresql-v15.null_resource.set-user-permissions-additionaldbs["civil_rtl_export"] 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"           = "civil-rtl-export-v15"
          + "script_hash"    = "dbe0102f3129d4463913d5e01177e806bc6954005bdd98f20c242658634a1bbc"
        }
    }

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

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.

@ssivas6 ssivas6 merged commit aee4ebb into master Sep 18, 2024
6 checks passed
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