Swagata Mondal
Swagata Mondal

Reputation: 51

AWS VPC to VPC mirror imageing?

Hi I already have one VPC in my aws for production. Now I want to create same vpc for test environment also. Is there any way to create a mirror image of VPC . Like creating one more VPC with identical of old VPC.

Upvotes: 0

Views: 130

Answers (3)

Jagatveer Singh
Jagatveer Singh

Reputation: 195

Terraform from hashicorp is the best way to do that in my opinion. You can also use the terraforming from dtan4 at this link to export the existing resources and adjust them to create another environment. For example you may want to go for another IP range, name it different etc.

Upvotes: 1

mootmoot
mootmoot

Reputation: 13176

You should use Cloudfomer to "reverse-engineer" your VPC setup, and there is a nice layout as well. Nevertheless, you need special IAM roles to do this.

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-using-cloudformer.html

Because it is "reverse-engineer", all the VPC setting will be similar(same VPC IP/CIDR , subnets) ) , AWS will assign new ID for individual component. To avoid maintenance nightmare, You should assign different tag name for your production and test environment.

Upvotes: 0

Max
Max

Reputation: 8836

There's no API for this, but you can set up a script pretty easily.

Alternatively, instead of creating the first one manually, you can create it with CloudFormation so you can make multiple identical copies (even in different Regions) whenever you want.

Upvotes: 3

Related Questions