You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a GKE cluster in terraform with a non-default (custom) VPC
the subnetwork must be specified otherwise the operation will fail with an expected error.
Expected error when subnetwork isn't set:
- "Error: googleapi: Error 400: Network "MY-VPC-NAME" requires specifying a subnetwork., badRequest"
User should follow the instructions in README.md and specify the required fields based on whether
the cluster will run in a default VPC or custom VPC.
Tests performed:
- Able to create cluster in default VPC in a backwards compatible way - passed
- Able to create cluster in a user defined non-default network and subnetwork - passed
Reference
- googleforgames#1641
- https://www.terraform.io/docs/providers/google/r/container_cluster.html
What happened:
I attempted to deploy Agones on a non-default VPC with the terraform scripts by changing the "network" variable to the name of my VPC network.
Creation failed with the following error:
Error: googleapi: Error 400: Network "MY-VPC-NAME" requires specifying a subnetwork., badRequest
What you expected to happen:
I expected a GKE cluster to be created in my defined network automatically.
As a workaround I expect the ability to define my subnetwork as well.
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
The root cause is there is no subnetwork flag in the "google_container_cluster" resource.
While that is not an issue with a default network a subnetwork must be specified when using a non-default network.
Additional context: https://www.terraform.io/docs/providers/google/r/container_cluster.html
Environment:
kubectl version
):1.15
Google Cloud
Terraform
The text was updated successfully, but these errors were encountered: