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

PUB-2222 - Removed old postgres #372

Merged
merged 4 commits into from
Nov 3, 2023
Merged

Conversation

ChrisS1512
Copy link
Contributor

JIRA link (if applicable)

https://tools.hmcts.net/jira/browse/PUB-2222

Change description

Removed old postgres

Copy link
Contributor

Plan Result

Plan: 0 to add, 17 to change, 0 to destroy.
  • Update
    • azurerm_key_vault_secret.flexible_secret["DATABASE"]
    • azurerm_key_vault_secret.flexible_secret["HOST"]
    • azurerm_key_vault_secret.flexible_secret["PASS"]
    • azurerm_key_vault_secret.flexible_secret["PORT"]
    • azurerm_key_vault_secret.flexible_secret["USER"]
    • azurerm_key_vault_secret.sdp-database
    • azurerm_key_vault_secret.sdp-database-flexible
    • azurerm_key_vault_secret.sdp-host
    • azurerm_key_vault_secret.sdp-host-flexible
    • azurerm_key_vault_secret.sdp-port
    • azurerm_key_vault_secret.sdp-port-flexible
    • azurerm_key_vault_secret.secret["DATABASE"]
    • azurerm_key_vault_secret.secret["HOST"]
    • azurerm_key_vault_secret.secret["PASS"]
    • azurerm_key_vault_secret.secret["PORT"]
    • azurerm_key_vault_secret.secret["USER"]
    • module.database[0].azurerm_postgresql_server.postgres-paas
Change Result (Click me)
  # azurerm_key_vault_secret.flexible_secret["DATABASE"] will be updated in-place
  ~ resource "azurerm_key_vault_secret" "flexible_secret" {
      ~ expiration_date         = "2024-11-01T13:34:22Z" -> (known after apply)
        id                      = "https://pip-ss-kv-stg.vault.azure.net/secrets/account-management-POSTGRES-FLEXIBLE-DATABASE/a488df034fcd4fb5b1c0dd8419fa9d32"
        name                    = "account-management-POSTGRES-FLEXIBLE-DATABASE"
        tags                    = {
            "application"         = "publishing-information-service"
            "autoShutdown"        = "true"
            "builtFrom"           = "https://github.com/HMCTS/pip-account-management.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#publishing-and-information"
            "environment"         = "staging"
            "managedBy"           = "Future Hearings - Publishing Information Project"
            "source"              = "account-management PostgreSQL"
        }
        # (6 unchanged attributes hidden)
    }

  # azurerm_key_vault_secret.flexible_secret["HOST"] will be updated in-place
  ~ resource "azurerm_key_vault_secret" "flexible_secret" {
      ~ expiration_date         = "2024-11-01T13:34:22Z" -> (known after apply)
        id                      = "https://pip-ss-kv-stg.vault.azure.net/secrets/account-management-POSTGRES-FLEXIBLE-HOST/2fda2f3320e649b28bbaa27457d7b25f"
        name                    = "account-management-POSTGRES-FLEXIBLE-HOST"
        tags                    = {
            "application"         = "publishing-information-service"
            "autoShutdown"        = "true"
            "builtFrom"           = "https://github.com/HMCTS/pip-account-management.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#publishing-and-information"
            "environment"         = "staging"
            "managedBy"           = "Future Hearings - Publishing Information Project"
            "source"              = "account-management PostgreSQL"
        }
        # (6 unchanged attributes hidden)
    }

  # azurerm_key_vault_secret.flexible_secret["PASS"] will be updated in-place
  ~ resource "azurerm_key_vault_secret" "flexible_secret" {
      ~ expiration_date         = "2024-11-01T13:34:22Z" -> (known after apply)
        id                      = "https://pip-ss-kv-stg.vault.azure.net/secrets/account-management-POSTGRES-FLEXIBLE-PASS/079f62847b2040e2bb57475cf96ab219"
        name                    = "account-management-POSTGRES-FLEXIBLE-PASS"
        tags                    = {
            "application"         = "publishing-information-service"
            "autoShutdown"        = "true"
            "builtFrom"           = "https://github.com/HMCTS/pip-account-management.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#publishing-and-information"
            "environment"         = "staging"
            "managedBy"           = "Future Hearings - Publishing Information Project"
            "source"              = "account-management PostgreSQL"
        }
        # (6 unchanged attributes hidden)
    }

  # azurerm_key_vault_secret.flexible_secret["PORT"] will be updated in-place
  ~ resource "azurerm_key_vault_secret" "flexible_secret" {
      ~ expiration_date         = "2024-11-01T13:34:22Z" -> (known after apply)
        id                      = "https://pip-ss-kv-stg.vault.azure.net/secrets/account-management-POSTGRES-FLEXIBLE-PORT/abf10b35129d4428b7108f616dae6cec"
        name                    = "account-management-POSTGRES-FLEXIBLE-PORT"
        tags                    = {
            "application"         = "publishing-information-service"
            "autoShutdown"        = "true"
            "builtFrom"           = "https://github.com/HMCTS/pip-account-management.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#publishing-and-information"
            "environment"         = "staging"
            "managedBy"           = "Future Hearings - Publishing Information Project"
            "source"              = "account-management PostgreSQL"
        }
        # (6 unchanged attributes hidden)
    }

  # azurerm_key_vault_secret.flexible_secret["USER"] will be updated in-place
  ~ resource "azurerm_key_vault_secret" "flexible_secret" {
      ~ expiration_date         = "2024-11-01T13:34:22Z" -> (known after apply)
        id                      = "https://pip-ss-kv-stg.vault.azure.net/secrets/account-management-POSTGRES-FLEXIBLE-USER/2655fc2c75e94e549d19337152ffc7ae"
        name                    = "account-management-POSTGRES-FLEXIBLE-USER"
        tags                    = {
            "application"         = "publishing-information-service"
            "autoShutdown"        = "true"
            "builtFrom"           = "https://github.com/HMCTS/pip-account-management.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#publishing-and-information"
            "environment"         = "staging"
            "managedBy"           = "Future Hearings - Publishing Information Project"
            "source"              = "account-management PostgreSQL"
        }
        # (6 unchanged attributes hidden)
    }

  # azurerm_key_vault_secret.sdp-database will be updated in-place
  ~ resource "azurerm_key_vault_secret" "sdp-database" {
      ~ expiration_date         = "2024-11-01T13:34:22Z" -> (known after apply)
        id                      = "https://pip-ss-sdp-kv-stg.vault.azure.net/secrets/account-management-POSTGRES-DATABASE/c97a1b08f6954efda1a16a0c6dad823a"
        name                    = "account-management-POSTGRES-DATABASE"
        tags                    = {
            "application"         = "publishing-information-service"
            "autoShutdown"        = "true"
            "builtFrom"           = "https://github.com/HMCTS/pip-account-management.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#publishing-and-information"
            "environment"         = "staging"
            "managedBy"           = "Future Hearings - Publishing Information Project"
            "source"              = "account-management PostgreSQL"
        }
        # (6 unchanged attributes hidden)
    }

  # azurerm_key_vault_secret.sdp-database-flexible will be updated in-place
  ~ resource "azurerm_key_vault_secret" "sdp-database-flexible" {
      ~ expiration_date         = "2024-11-01T13:34:22Z" -> (known after apply)
        id                      = "https://pip-ss-sdp-kv-stg.vault.azure.net/secrets/account-management-POSTGRES-FLEXIBLE-DATABASE/15b276b23b5b40d1842c3cdff0e1d399"
        name                    = "account-management-POSTGRES-FLEXIBLE-DATABASE"
        tags                    = {
            "application"         = "publishing-information-service"
            "autoShutdown"        = "true"
            "builtFrom"           = "https://github.com/HMCTS/pip-account-management.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#publishing-and-information"
            "environment"         = "staging"
            "managedBy"           = "Future Hearings - Publishing Information Project"
            "source"              = "account-management PostgreSQL"
        }
        # (6 unchanged attributes hidden)
    }

  # azurerm_key_vault_secret.sdp-host will be updated in-place
  ~ resource "azurerm_key_vault_secret" "sdp-host" {
      ~ expiration_date         = "2024-11-01T13:34:22Z" -> (known after apply)
        id                      = "https://pip-ss-sdp-kv-stg.vault.azure.net/secrets/account-management-POSTGRES-HOST/46764aa9925749a487505cfcfa8f929b"
        name                    = "account-management-POSTGRES-HOST"
        tags                    = {
            "application"         = "publishing-information-service"
            "autoShutdown"        = "true"
            "builtFrom"           = "https://github.com/HMCTS/pip-account-management.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#publishing-and-information"
            "environment"         = "staging"
            "managedBy"           = "Future Hearings - Publishing Information Project"
            "source"              = "account-management PostgreSQL"
        }
        # (6 unchanged attributes hidden)
    }

  # azurerm_key_vault_secret.sdp-host-flexible will be updated in-place
  ~ resource "azurerm_key_vault_secret" "sdp-host-flexible" {
      ~ expiration_date         = "2024-11-01T13:34:22Z" -> (known after apply)
        id                      = "https://pip-ss-sdp-kv-stg.vault.azure.net/secrets/account-management-POSTGRES-FLEXIBLE-HOST/1e9ebf1b0cc1485ab9be8559a122b5bd"
        name                    = "account-management-POSTGRES-FLEXIBLE-HOST"
        tags                    = {
            "application"         = "publishing-information-service"
            "autoShutdown"        = "true"
            "builtFrom"           = "https://github.com/HMCTS/pip-account-management.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#publishing-and-information"
            "environment"         = "staging"
            "managedBy"           = "Future Hearings - Publishing Information Project"
            "source"              = "account-management PostgreSQL"
        }
        # (6 unchanged attributes hidden)
    }

  # azurerm_key_vault_secret.sdp-port will be updated in-place
  ~ resource "azurerm_key_vault_secret" "sdp-port" {
      ~ expiration_date         = "2024-11-01T13:34:22Z" -> (known after apply)
        id                      = "https://pip-ss-sdp-kv-stg.vault.azure.net/secrets/account-management-POSTGRES-PORT/4c200b3100d3422d9080f55523497219"
        name                    = "account-management-POSTGRES-PORT"
        tags                    = {
            "application"         = "publishing-information-service"
            "autoShutdown"        = "true"
            "builtFrom"           = "https://github.com/HMCTS/pip-account-management.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#publishing-and-information"
            "environment"         = "staging"
            "managedBy"           = "Future Hearings - Publishing Information Project"
            "source"              = "account-management PostgreSQL"
        }
        # (6 unchanged attributes hidden)
    }

  # azurerm_key_vault_secret.sdp-port-flexible will be updated in-place
  ~ resource "azurerm_key_vault_secret" "sdp-port-flexible" {
      ~ expiration_date         = "2024-11-01T13:34:22Z" -> (known after apply)
        id                      = "https://pip-ss-sdp-kv-stg.vault.azure.net/secrets/account-management-POSTGRES-FLEXIBLE-PORT/417c375eb2ef49c8878c2e7a498685ad"
        name                    = "account-management-POSTGRES-FLEXIBLE-PORT"
        tags                    = {
            "application"         = "publishing-information-service"
            "autoShutdown"        = "true"
            "builtFrom"           = "https://github.com/HMCTS/pip-account-management.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#publishing-and-information"
            "environment"         = "staging"
            "managedBy"           = "Future Hearings - Publishing Information Project"
            "source"              = "account-management PostgreSQL"
        }
        # (6 unchanged attributes hidden)
    }

  # azurerm_key_vault_secret.secret["DATABASE"] will be updated in-place
  ~ resource "azurerm_key_vault_secret" "secret" {
      ~ expiration_date         = "2024-11-01T13:34:22Z" -> (known after apply)
        id                      = "https://pip-ss-kv-stg.vault.azure.net/secrets/account-management-POSTGRES-DATABASE/8ce251ec48bd4777a94507a628072ef9"
        name                    = "account-management-POSTGRES-DATABASE"
        tags                    = {
            "application"         = "publishing-information-service"
            "autoShutdown"        = "true"
            "builtFrom"           = "https://github.com/HMCTS/pip-account-management.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#publishing-and-information"
            "environment"         = "staging"
            "managedBy"           = "Future Hearings - Publishing Information Project"
            "source"              = "account-management PostgreSQL"
        }
        # (6 unchanged attributes hidden)
    }

  # azurerm_key_vault_secret.secret["HOST"] will be updated in-place
  ~ resource "azurerm_key_vault_secret" "secret" {
      ~ expiration_date         = "2024-11-01T13:34:22Z" -> (known after apply)
        id                      = "https://pip-ss-kv-stg.vault.azure.net/secrets/account-management-POSTGRES-HOST/813d16b2426144869c81ffef9b220709"
        name                    = "account-management-POSTGRES-HOST"
        tags                    = {
            "application"         = "publishing-information-service"
            "autoShutdown"        = "true"
            "builtFrom"           = "https://github.com/HMCTS/pip-account-management.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#publishing-and-information"
            "environment"         = "staging"
            "managedBy"           = "Future Hearings - Publishing Information Project"
            "source"              = "account-management PostgreSQL"
        }
        # (6 unchanged attributes hidden)
    }

  # azurerm_key_vault_secret.secret["PASS"] will be updated in-place
  ~ resource "azurerm_key_vault_secret" "secret" {
      ~ expiration_date         = "2024-11-01T13:34:22Z" -> (known after apply)
        id                      = "https://pip-ss-kv-stg.vault.azure.net/secrets/account-management-POSTGRES-PASS/5a50d60698da4b259be4d0a6865cc58d"
        name                    = "account-management-POSTGRES-PASS"
        tags                    = {
            "application"         = "publishing-information-service"
            "autoShutdown"        = "true"
            "builtFrom"           = "https://github.com/HMCTS/pip-account-management.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#publishing-and-information"
            "environment"         = "staging"
            "managedBy"           = "Future Hearings - Publishing Information Project"
            "source"              = "account-management PostgreSQL"
        }
        # (6 unchanged attributes hidden)
    }

  # azurerm_key_vault_secret.secret["PORT"] will be updated in-place
  ~ resource "azurerm_key_vault_secret" "secret" {
      ~ expiration_date         = "2024-11-01T13:34:22Z" -> (known after apply)
        id                      = "https://pip-ss-kv-stg.vault.azure.net/secrets/account-management-POSTGRES-PORT/a1035a13a62042d29439c00331f8644b"
        name                    = "account-management-POSTGRES-PORT"
        tags                    = {
            "application"         = "publishing-information-service"
            "autoShutdown"        = "true"
            "builtFrom"           = "https://github.com/HMCTS/pip-account-management.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#publishing-and-information"
            "environment"         = "staging"
            "managedBy"           = "Future Hearings - Publishing Information Project"
            "source"              = "account-management PostgreSQL"
        }
        # (6 unchanged attributes hidden)
    }

  # azurerm_key_vault_secret.secret["USER"] will be updated in-place
  ~ resource "azurerm_key_vault_secret" "secret" {
      ~ expiration_date         = "2024-11-01T13:34:22Z" -> (known after apply)
        id                      = "https://pip-ss-kv-stg.vault.azure.net/secrets/account-management-POSTGRES-USER/750355f593714144ab8626cf65a5a8ad"
        name                    = "account-management-POSTGRES-USER"
        tags                    = {
            "application"         = "publishing-information-service"
            "autoShutdown"        = "true"
            "builtFrom"           = "https://github.com/HMCTS/pip-account-management.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#publishing-and-information"
            "environment"         = "staging"
            "managedBy"           = "Future Hearings - Publishing Information Project"
            "source"              = "account-management PostgreSQL"
        }
        # (6 unchanged attributes hidden)
    }

  # module.database.azurerm_postgresql_active_directory_administrator.admin has moved to module.database[0].azurerm_postgresql_active_directory_administrator.admin
    resource "azurerm_postgresql_active_directory_administrator" "admin" {
        id                  = "/subscriptions/74dacd4f-a248-45bb-a2f0-af700dc4cf68/resourceGroups/pip-account-management-data-staging/providers/Microsoft.DBforPostgreSQL/servers/pip-account-management-staging"
        # (5 unchanged attributes hidden)
    }

  # module.database.azurerm_postgresql_database.postgres-db has moved to module.database[0].azurerm_postgresql_database.postgres-db
    resource "azurerm_postgresql_database" "postgres-db" {
        id                  = "/subscriptions/74dacd4f-a248-45bb-a2f0-af700dc4cf68/resourceGroups/pip-account-management-data-staging/providers/Microsoft.DBforPostgreSQL/servers/pip-account-management-staging/databases/accountmanagement"
        name                = "accountmanagement"
        # (4 unchanged attributes hidden)
    }

  # module.database[0].azurerm_postgresql_server.postgres-paas will be updated in-place
  # (moved from module.database.azurerm_postgresql_server.postgres-paas)
  ~ resource "azurerm_postgresql_server" "postgres-paas" {
        id                                = "/subscriptions/74dacd4f-a248-45bb-a2f0-af700dc4cf68/resourceGroups/pip-account-management-data-staging/providers/Microsoft.DBforPostgreSQL/servers/pip-account-management-staging"
        name                              = "pip-account-management-staging"
        tags                              = {
            "application"         = "publishing-information-service"
            "autoShutdown"        = "true"
            "builtFrom"           = "https://github.com/HMCTS/pip-account-management.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#publishing-and-information"
            "environment"         = "staging"
            "managedBy"           = "Future Hearings - Publishing Information Project"
        }
        # (16 unchanged attributes hidden)

      - threat_detection_policy {
          - disabled_alerts      = [] -> null
          - email_account_admins = false -> null
          - email_addresses      = [] -> null
          - enabled              = true -> null
          - retention_days       = 0 -> null
        }
    }

  # module.database.azurerm_private_endpoint.postgres[0] has moved to module.database[0].azurerm_private_endpoint.postgres[0]
    resource "azurerm_private_endpoint" "postgres" {
        id                       = "/subscriptions/74dacd4f-a248-45bb-a2f0-af700dc4cf68/resourceGroups/pip-account-management-data-staging/providers/Microsoft.Network/privateEndpoints/pip-staging-endpoint"
        name                     = "pip-staging-endpoint"
        tags                     = {
            "application"         = "publishing-information-service"
            "autoShutdown"        = "true"
            "builtFrom"           = "https://github.com/HMCTS/pip-account-management.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#publishing-and-information"
            "environment"         = "staging"
            "managedBy"           = "Future Hearings - Publishing Information Project"
        }
        # (6 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # module.database.azurerm_resource_group.data-resourcegroup has moved to module.database[0].azurerm_resource_group.data-resourcegroup
    resource "azurerm_resource_group" "data-resourcegroup" {
        id       = "/subscriptions/74dacd4f-a248-45bb-a2f0-af700dc4cf68/resourceGroups/pip-account-management-data-staging"
        name     = "pip-account-management-data-staging"
        tags     = {
            "application"         = "publishing-information-service"
            "autoShutdown"        = "true"
            "builtFrom"           = "https://github.com/HMCTS/pip-account-management.git"
            "businessArea"        = "Cross-Cutting"
            "contactSlackChannel" = "#publishing-and-information"
            "environment"         = "staging"
            "managedBy"           = "Future Hearings - Publishing Information Project"
        }
        # (1 unchanged attribute hidden)
    }

  # module.database.null_resource.set-user-permissions[0] has moved to module.database[0].null_resource.set-user-permissions[0]
    resource "null_resource" "set-user-permissions" {
        id       = "8710091761513516235"
        # (1 unchanged attribute hidden)
    }

  # module.database.random_password.password has moved to module.database[0].random_password.password
    resource "random_password" "password" {
        id          = "none"
        # (12 unchanged attributes hidden)
    }

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

@ChrisS1512 ChrisS1512 merged commit 2540938 into master Nov 3, 2023
4 checks passed
@ChrisS1512 ChrisS1512 deleted the PUB-2222-Remove-Old-Postgres branch November 3, 2023 09:04
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