smoketurner / serverless-vpc-plugin

Serverless Plugin to create a VPC
MIT License
88 stars 35 forks source link

possible to modify route table? #305

Closed mikestaub closed 4 years ago

mikestaub commented 4 years ago

I would like to setup VPC peering with this plugin

jplock commented 4 years ago

Once the route tables are created you can do anything you want to them. What specifically would you like to do?

mikestaub commented 4 years ago

Just add a route for VPC peering connection. So I have to create another stack that imports the one generated by this plugin? I don't like modifying stuff in the web console.

jplock commented 4 years ago

@mikestaub the plugin adds all of the VPC resources into the stack. You can just add an additional CF template to add the peering connection. Would that work?

mikestaub commented 4 years ago

Yes, but I will have to do it after the initial deploy as I don't see a way to reference the resources created by this plugin in the template.

jplock commented 4 years ago

@mikestaub no that’s what I’m saying. You can just do ‘!Ref VPC’ in your additional template to reference the VPC created by this plugin if you are using the same stack.

See - https://github.com/smoketurner/serverless-vpc-plugin/blob/master/example/resources/rds_cf.yml

mikestaub commented 4 years ago

Ok great, thanks!

adamkitain commented 2 years ago

I'm trying to do something similar, @mikestaub, wondering how you got the routes in the route tables in this stack to point to the peering connection? Like, I have a peering connection pcx-... that is at 10.2.0.0/16, how do I add that to all the routes created by this stack?