Subnet is required for custom subnetmode network

4,549 views
Skip to first unread message

joseph...@providence.org

unread,
Jun 12, 2018, 2:06:14 PM6/12/18
to gce-discussion
Hello,

I'm trying to create a new GCP instance in my project, which has a default VPC with a custom subnet.  The error I keep getting from the gcloud create command is:

- Invalid value for field 'resource.networkInterfaces[0]': ''. Subnetwork should be specified for custom subnetmode network

Do I understand it correctly that I *have* to provide a subnet option when I have a custom subnet?  The VPC is named "default" as is the subnet.  It seems to find the  network all right but not the subnet.  

Thanks!

Navi Aujla (Google Cloud Support)

unread,
Jun 13, 2018, 11:16:03 AM6/13/18
to gce-discussion
Hello 

Verify if the network is in custom subnet mode. As when creating the instance the field: "networkInterfaces[].subnetwork" is required if the network is in custom subnet mode. You can refer to this documentation link for more information. 

If the network is in auto subnet mode, providing the subnetwork is optional as when an instance is created for your VPC network, it will be assigned an IP from the appropriate region’s address range.
Reply all
Reply to author
Forward
0 new messages