1 Answers
I am able to reproduce the issue!!! Here are my findings/suggestions
(1) The problem happens if you create a custom-mode VPC with a subnet restricted to only a few regions (with/without Private Google Access and Flow Logs enabled) and use this VPC/Subnet to create in instance template. As a workaround, if I copy the gcloud command instead of pressing create button for this scenario; and execute the command on cloud shell, I am able to create the template. Seems like there are some UI validations while creating JSON payload when we press the create button.
(2) There is no issue if we have auto-mode VPC.
Instance templates are global resource; it is better to have a VPC with auto-mode network or you can create a subnet with custom mode. When the instance is created within Managed Instance Group, subnet will be picked up based on the selection of region/zone where the Compute Engine VM has to be created. Auto-mode VPC provisions subnets in all the available regions, hence there will be no issue using the template as there will already be a subnet for sure for a specific region. But this is not true for custom-mode VPC and hence we have to be careful while creating templates using custom mode VPC networks.
Have a quick read here, hopefully you will understand in detail: https://cloud.google.com/vpc/docs/vpc#vpc_networks_and_subnets
Hope this helps!
Hi Iqbal – Can you please share the sequence of steps you followed? There is another learner that has reported the same issue. I would like to reproduce the issue and guide you with the fix. Thanks!