Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GCP: Duplicate an existing project in Google Cloud Platform

Is there a way to duplicate an entire project? The project contains: 2x Cloud SQL: main + backup 1x Cloud Storage 4x Google Compute Engine

We have an exactly the same project already built up and configured, so it would be much easier for us if we could just make a copy of those.

The projects are not under the same account.

like image 285
Arany Péter Avatar asked May 24 '19 09:05

Arany Péter


People also ask

How do I copy an image from one project to another in GCP?

Use Google Cloud Share command to copy image from one project to another project. Actually, you can directly use this image by choosing from custom image to create a boot disk when you create a new VM. Note: Use project_id in the command , not project name.


1 Answers

There is no such a way to replicate as-is a project. However, you can use Terraformer starting from your current project: this CLI tool will generate Terraform template files starting from the existing infrastructure (reverse Terraform). Then, you can use these files to re-create the target resources within a second GCP project in a programmatic fashion (see https://cloud.google.com/community/tutorials/getting-started-on-gcp-with-terraform).


Disclaimer: Comments and opinions are my own and not the views of my employer.

like image 86
vdenotaris Avatar answered Oct 06 '22 14:10

vdenotaris