@@ -323,7 +323,12 @@ func NewCmdInstance(base *cli.Base) *cobra.Command { //nolint:funlen,gocyclo
323323
324324 blockDevices , errBD := cmd .Flags ().GetStringArray ("block-devices" )
325325 if errBD != nil {
326- return fmt .Errorf ("error parsing flag 'block-devices' for kubernetes cluster create : %v" , errBD )
326+ return fmt .Errorf ("error parsing flag 'block-devices' for instance create : %v" , errBD )
327+ }
328+
329+ vpcOnly , errVO := cmd .Flags ().GetBool ("vpc-only" )
330+ if errVO != nil {
331+ return fmt .Errorf ("error parsing flag 'vpc-only' for instance create : %v" , errVO )
327332 }
328333
329334 o .CreateReq = & govultr.InstanceCreateReq {
@@ -349,6 +354,7 @@ func NewCmdInstance(base *cli.Base) *cobra.Command { //nolint:funlen,gocyclo
349354 Backups : "disabled" ,
350355 EnableVPC : govultr .BoolToBoolPtr (vpcEnable ),
351356 AttachVPC : vpcAttach ,
357+ VPCOnly : govultr .BoolToBoolPtr (vpcOnly ),
352358 }
353359
354360 if backup {
@@ -422,6 +428,11 @@ func NewCmdInstance(base *cli.Base) *cobra.Command { //nolint:funlen,gocyclo
422428 create .Flags ().StringP ("label" , "l" , "" , "label you want to give this instance" )
423429 create .Flags ().StringSliceP ("ssh-keys" , "s" , []string {}, "ssh keys you want to assign to the instance" )
424430 create .Flags ().BoolP ("auto-backup" , "b" , false , "enable auto backups | true or false" )
431+ create .Flags ().Bool (
432+ "vpc-only" ,
433+ false ,
434+ "deploy with no public networking. A --vpc-ids ID with NAT gateway attached is required | true or false" ,
435+ )
425436
426437 create .Flags ().StringP (
427438 "userdata" ,
0 commit comments