Skip to content

Commit 26711bc

Browse files
Fix vpc nat gateway default timeout values (#1714)
* fix default value for tcp timeout to be in sync with api * remove required flag for type as it defaults to public * remove required vpcs as we resort to default if not specified --------- Co-authored-by: anup-deka <[email protected]>
1 parent e411d7e commit 26711bc

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

commands/vpc_nat_gateways.go

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,13 @@ You can use vpc-nat-gateway to perform CRUD operations on a VPC NAT Gateway.`,
2929
cmdVPCNATGatewayUpdate,
3030
} {
3131
AddStringFlag(c, doctl.ArgVPCNATGatewayName, "", "", "Name of the VPC NAT Gateway", requiredOpt())
32-
AddStringFlag(c, doctl.ArgVPCNATGatewayType, "", "PUBLIC", "Gateway type", requiredOpt())
32+
AddStringFlag(c, doctl.ArgVPCNATGatewayType, "", "PUBLIC", "Gateway type")
3333
AddStringFlag(c, doctl.ArgVPCNATGatewayRegion, "", "", "Gateway region", requiredOpt())
3434
AddIntFlag(c, doctl.ArgVPCNATGatewaySize, "", 1, "Gateway size")
35-
// Ingress VPCs is not a required arg for update cmd
36-
var opts []flagOpt
37-
if c.HasAlias("c") {
38-
opts = append(opts, requiredOpt())
39-
}
40-
AddStringSliceFlag(c, doctl.ArgVPCNATGatewayVPCs, "", []string{}, "Ingress VPCs", opts...)
35+
AddStringSliceFlag(c, doctl.ArgVPCNATGatewayVPCs, "", []string{}, "Ingress VPCs")
4136
AddIntFlag(c, doctl.ArgVPCNATGatewayUDPTimeout, "", 30, "UDP connection timeout (seconds)")
4237
AddIntFlag(c, doctl.ArgVPCNATGatewayICMPTimeout, "", 30, "ICMP connection timeout (seconds)")
43-
AddIntFlag(c, doctl.ArgVPCNATGatewayTCPTimeout, "", 30, "TCP connection timeout (seconds)")
38+
AddIntFlag(c, doctl.ArgVPCNATGatewayTCPTimeout, "", 300, "TCP connection timeout (seconds)")
4439
}
4540

4641
CmdBuilder(cmd, RunVPCNATGatewayGet, "get <gateway-id>", "Get a VPC NAT Gateway", "", Writer, displayerType(&displayers.VPCNATGateways{}))

0 commit comments

Comments
 (0)