ministryofjustice / cloud-platform

Documentation on the MoJ cloud platform
MIT License
87 stars 44 forks source link

RDS Snapshot debugging for migrated DB scenarios #5706

Closed sj-williams closed 2 months ago

sj-williams commented 3 months ago

Background

We have a team migrating databases using shared snapshots

In the case where a team is wanting to use a shared Oracle RDS snapshot in CP account from external account, after sharing, copying and using new KMS key, the new instance created using snapshot always wants to recreate.

In testing we have observed that setting the module username param to null will passthru the snapshops existing DB username, and does not attempt to recreate DB on second run.

Create a branch with an optional username field for the module, overriding the random generated username, and have Oracle team test using this modified RDS module settings to test their Oracle DB migration, does everything work as expected?

If this change resolves force recreate issues and database functions as expected, publish module update and update user-guide entry for snapshop migration workflow.

Proposed user journey

Approach

Which part of the user docs does this impact

Communicate changes

Questions / Assumptions

Definition of done

Reference

How to write good user stories

sj-williams commented 3 months ago

rds module branch

https://github.com/ministryofjustice/cloud-platform-terraform-rds-instance/tree/migration

sj-williams commented 3 months ago

Changes introduced on test branch so far:

is_migration optional input which, when enabled, along with snapshot_identifier set:

Testing of CCLF and CCR migrated Oracle DBs using the above method appears to be working with dev application connections and port-forward DB client connection checks.