Skip to content

Commit

Permalink
fix(instance): use routed-ip-enabled for IP type when explicit (#3679)
Browse files Browse the repository at this point in the history
  • Loading branch information
Codelax authored Feb 26, 2024
1 parent 23ed688 commit c306c89
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions internal/namespaces/instance/v1/custom_server_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -778,10 +778,12 @@ func instanceServerCreateIPCreate(args *instanceCreateServerRequest, api *instan
Organization: args.OrganizationID,
}

if args.RoutedIPEnabled != nil && *args.RoutedIPEnabled {
req.Type = instance.IPTypeRoutedIPv4
} else {
req.Type = instance.IPTypeNat
if args.RoutedIPEnabled != nil {
if *args.RoutedIPEnabled {
req.Type = instance.IPTypeRoutedIPv4
} else {
req.Type = instance.IPTypeNat
}
}

res, err := api.CreateIP(req)
Expand Down

0 comments on commit c306c89

Please sign in to comment.