Reputation: 351
I have done this successfully using IP allowlist connectivity type (external IP), migrated one postgres instance from one service project to another service project, but when I do try to do it using VPC peering I have an error that says it cannot connect to source DB. VPC Peering works if I try it the source and destination is in the same VPC network within the same service project but does not work if it is different network and service project. It also does not work if it is same service project but different network vpc.
I have tried the following:
There is a note in the bottom where it is "if you plan on connecting to the migration source via VPC peering choose the VPC where it resides". Does that mean you can only do VPC peering on the same VPC?
Does this mean the only way to migrate to different service projects or different vpc network is using external IP?
Upvotes: 0
Views: 1320
Reputation: 166
Shared VPC should allow migration between 2 different GCP projects using DMS, as long as you have a common shared VPC network, as Goli shared.
For example - Having project A as service project, and project B as service of the same shared VPC host project - an existing DB in project A in a shared VPC network 1, should be able to migrate to project B as long as it is a service project as well and the VPC network 1 is shared with it.
Please note that in another scenario project A can be a host project, and B can be a service project, where B is shared with (and has access to) the shared VPC network 1 where the source DB is located (in project A).
The DMS migration job connectivity method required for shared vpc cross-project migration would be ‘VPC peering’, therefore you will need to follow instructions in this documentation.
Once you have a source Database, have set up all the necessary configurations for it according to the DMS documentation (here) including all the other relevant initial settings for shared VPC (e.g. setting up the relevant service project and sharing the relevant VPC network with it) as well as finished setting up the private services access (and the VPC peering connection) for the shared VPC network following this documentation, you should be able to set up a new DMS migration job in the destination database service project, and choose that shared VPC network successfully.
If the test at the end of configuration in the migration job is failing for any reason, try to verify if you’ve managed to execute all the necessary steps mentioned in the documentation.
Upvotes: 0