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

Ga 57 prm p4 users stale orgs #1761

Open
wants to merge 24 commits into
base: GA_PRM_Master
Choose a base branch
from

Conversation

abul-syed
Copy link
Contributor

@abul-syed abul-syed commented Feb 16, 2024

Jira link (if applicable)

https://tools.hmcts.net/jira/browse/GA-57

Change description

PRM : Process 4 - Find Users with Stale Organisations

Updates

Update to include retry logic

Update the migration to default the last_updated column to now() & rename field lastUpdated to userLastUpdated

@abul-syed abul-syed marked this pull request as draft February 16, 2024 18:48
@abul-syed abul-syed marked this pull request as ready for review February 21, 2024 13:53
@abul-syed abul-syed mentioned this pull request Feb 21, 2024
@hmcts-jenkins-a-to-c
Copy link
Contributor

hmcts-jenkins-a-to-c bot commented Mar 1, 2024

Plan Result

⚠️ Resource Deletion will happen ⚠️

This plan contains resource delete operation. Please check the plan result very carefully!

Plan: 1 to add, 0 to change, 3 to destroy.
  • Delete
    • azurerm_key_vault_secret.POSTGRES-USER
    • module.org-role-mapping-database-v15.null_resource.set-schema-ownership["org_role_mapping"]
  • Replace
    • module.org-role-mapping-database-v15.null_resource.set-user-permissions-additionaldbs["org_role_mapping"]
Change Result (Click me)
  # azurerm_key_vault_secret.POSTGRES-USER will be destroyed
  # (because azurerm_key_vault_secret.POSTGRES-USER is not in configuration)
  - resource "azurerm_key_vault_secret" "POSTGRES-USER" {
      - id                      = "https://am-aat.vault.azure.net/secrets/org-role-mapping-service-POSTGRES-USER/2f8a84fc34184afa9f4d6990788c9736" -> null
      - key_vault_id            = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/am-shared-infrastructure-aat/providers/Microsoft.KeyVault/vaults/am-aat" -> null
      - name                    = "org-role-mapping-service-POSTGRES-USER" -> null
      - resource_id             = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/am-shared-infrastructure-aat/providers/Microsoft.KeyVault/vaults/am-aat/secrets/org-role-mapping-service-POSTGRES-USER/versions/2f8a84fc34184afa9f4d6990788c9736" -> null
      - resource_versionless_id = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/am-shared-infrastructure-aat/providers/Microsoft.KeyVault/vaults/am-aat/secrets/org-role-mapping-service-POSTGRES-USER" -> null
      - tags                    = {} -> null
      - value                   = (sensitive value) -> null
      - version                 = "2f8a84fc34184afa9f4d6990788c9736" -> null
      - versionless_id          = "https://am-aat.vault.azure.net/secrets/org-role-mapping-service-POSTGRES-USER" -> null
    }

  # module.org-role-mapping-database-v15.null_resource.set-schema-ownership["org_role_mapping"] will be destroyed
  # (because key ["org_role_mapping"] is not in for_each map)
  - resource "null_resource" "set-schema-ownership" {
      - id       = "856843227819443011" -> null
      - triggers = {
          - "force_trigger" = "3"
          - "name"          = "am-org-role-mapping-service-postgres-db-v15"
          - "script_hash"   = "ab1645969422eb52f19784fd29e26fd044ec09acb082bf6000c500468232933e"
        } -> null
    }

  # module.org-role-mapping-database-v15.null_resource.set-user-permissions-additionaldbs["org_role_mapping"] must be replaced
-/+ resource "null_resource" "set-user-permissions-additionaldbs" {
      ~ id       = "8532968316779169756" -> (known after apply)
      ~ triggers = { # forces replacement
          ~ "force_trigger"  = "3" -> "1"
            # (3 unchanged elements hidden)
        }
    }

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

* GA-181 p4 with retry approach

* GA-181 review comments from Dan

* GA-181 revert show-sql change

* GA-181 review comments

* Apply suggestions from code review

fix assertEqual

Co-authored-by: Dan Lysiak <50049163+danlysiak@users.noreply.github.com>

* Ga 189 track process events v2 (#1821)

---------

Co-authored-by: Dan Lysiak <50049163+danlysiak@users.noreply.github.com>
Co-authored-by: shaed-parkar <41630528+shaed-parkar@users.noreply.github.com>
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

3 participants