jetstack / terraform-google-gke-cluster

A Terraform module to create a best-practise Google Kubernetes Engine (GKE) cluster.
Apache License 2.0
161 stars 87 forks source link

Deploying GKE private cluster using Shared VPC #47

Closed viharikrishna closed 5 years ago

viharikrishna commented 5 years ago

Hello,

I’ve got a Host project - Shared VPC with subnets shared across service projects. Service project - Using one of the subnet

I've a separate terraform repo controlling all the networking configuration on the host project and a separate terraform repo for the resources in service projects. Now, In case of spinning a private GKE cluster in service project, Peering is established between the our VPC network and google VPC network. Since I’m spinning the cluster using my terraform code in the service project this info is not part of host project state file. When any changes made in host project that will wipe out the peering since it is not stored in the state file of host project’s.

How to overcome this situation?

wwwil commented 5 years ago

Hi! It's possible to import existing VPC networks into Terraform: https://www.terraform.io/docs/providers/google/r/compute_network.html#import

repo-lockdown[bot] commented 4 years ago

This project is now deprecated so we aren't accepting any further changes.