We're looking for a suggested design pattern to manage external dependencies in our CDK stack. Specifically, we utilize Atlas (mongodb) with our AWS stack. Our AWS stack is fully deployed using CDK/CF. We would like to use a VPC peering connection between our AWS account and Atlas instance. In a nutshell, the procedure to provision this peering connection is:
- Create VPC in AWS account (currently done as part of our CDK stack).
- Request VPC peering connection in Atlas account, referencing the VPC id from step 1.
- Wait a few minutes, approve the VPC peering request in the AWS account.
- In the AWS account, add a route table entry directing traffic to the Atlas CIDR to the VPC peering ID from step 3.
Has anyone found a good devops pattern to follow for this scenario? We can't perform step 4 until after the manual actions taken in steps 2 & 3. If we just do steps 2-4 manually after deploying our stack in AWS, what kind of drift issues are we going to experience in CloudFormation?