Vpc Peering In Terraform
This resouce allows you to accepting vpc peering request from an aws requester.
Vpc peering in terraform. Ensure that your vpcs have an appropriate name tag as these are used to name the new vpc. How to create a vpc peering between mongodb atlas and aws with terraform first of all some context for other audience members. I also touched upon some concepts of terraform like data sources split local.
This is only available for cloudamqp instance hosted in aws. Inside of doing the very manual way we can use iac tools in this case we use terraform which uses the hashicorp language it also supports json syntax. We can do this activity in an automated way as to mention below vpc peering tf.
The use of count terraform s looping construct populates the two routing tables per vpc with the routes to reach the other vpc via the vpc peering connection. The terraform aws vpc module does the heavy lifting of creating the vpcs subnets and routing tables. Only available for dedicated subscription plans.
Updating route table entries conclusion. Example usage one way to manage the vpc peering is to combine cloudamqp terraform provider with aws terraform provider and run them at the same time. There must not be a cidr block overlap between the two vpcs.
Flow diagram how to setup aws vpc peering with terraform. A terraform module to provide a vpc peering from one vpc to another. In the case it s not clear what a vpc peering is on aws it s the act of matching two networks from two different aws accounts so you can have in the same region two different vpcs from two different accounts talking together.