Describe the bug
Running step "2-gke-cluster" produces error at network setup and fails
To Reproduce
Steps to reproduce the behavior:
- Go to multicloud-platform/gcp-gke/terraform/uswest1/2-gke-cluster/
- Run
terraform apply
- See error
│ Error: googleapi: Error 400: Subnetwork "projects/<edited>/regions/us-west2/subnetworks/environment01-us-west2-subnet" is not valid for Network "default"., badRequest │ │ with module.gke.google_container_cluster.primary, │ on ..\..\..\tfm\2-gke-cluster\main.tf line 7, in resource "google_container_cluster" "primary": │ 7: resource "google_container_cluster" "primary" { │
Expected behavior
GKE Cluster created
Additional context
Error appears to be the result of Line 12 of multicloud-platform/gcp-gke/tfm/2-gke-cluster/main.tf
Currently:
network = data.google_compute_network.vpc1.name
Should be:
network = "${var.network_name}"
Once updated, the cluster creation completes as expected. vpc1.name could point to expected name, or not - depending on customer's environment.
Describe the bug
Running step "2-gke-cluster" produces error at network setup and fails
To Reproduce
Steps to reproduce the behavior:
terraform apply│ Error: googleapi: Error 400: Subnetwork "projects/<edited>/regions/us-west2/subnetworks/environment01-us-west2-subnet" is not valid for Network "default"., badRequest │ │ with module.gke.google_container_cluster.primary, │ on ..\..\..\tfm\2-gke-cluster\main.tf line 7, in resource "google_container_cluster" "primary": │ 7: resource "google_container_cluster" "primary" { │Expected behavior
GKE Cluster created
Additional context
Error appears to be the result of Line 12 of multicloud-platform/gcp-gke/tfm/2-gke-cluster/main.tf
Currently:
network = data.google_compute_network.vpc1.nameShould be:
network = "${var.network_name}"Once updated, the cluster creation completes as expected. vpc1.name could point to expected name, or not - depending on customer's environment.