Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmd/scw/testdata/test-all-usage-lbip-create-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ USAGE:
ARGS:
[project-id] Project ID to use. If none is passed the default project ID will be used
[reverse] Reverse DNS (domain name) for the IP address
[is-ipv6] If true, creates a Flexible IP with an ipv6 address
[organization-id] Organization ID to use. If none is passed the default organization ID will be used
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | pl-waw-1 | pl-waw-2)

Expand Down
6 changes: 5 additions & 1 deletion cmd/scw/testdata/test-all-usage-lblb-create-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@ ARGS:
[project-id] Project ID to use. If none is passed the default project ID will be used
name=<generated> Name for the Load Balancer
[description] Description for the Load Balancer
[ip-id] ID of an existing flexible IP address to attach to the Load Balancer
[assign-flexible-ip] Defines whether to automatically assign a flexible public IP to lb. Default value is `false` (do not assign).
[ip-ids.{index}] List of IP IDs to attach to the Load Balancer
[assign-flexible-ip] Defines whether to automatically assign a flexible public IP to lb. Default value is `false` (do not assign).
[tags.{index}] List of tags for the Load Balancer
[type=LB-S] Load Balancer commercial offer type. Use the Load Balancer types endpoint to retrieve a list of available offer types (LB-S | LB-GP-M | LB-GP-L)
[ssl-compatibility-level] Determines the minimal SSL version which needs to be supported on the client side, in an SSL/TLS offloading context. Intermediate is suitable for general-purpose servers with a variety of clients, recommended for almost all systems. Modern is suitable for services with clients that support TLS 1.3 and do not need backward compatibility. Old is compatible with a small number of very old clients and should be used only as a last resort (ssl_compatibility_level_unknown | ssl_compatibility_level_intermediate | ssl_compatibility_level_modern | ssl_compatibility_level_old)
[organization-id] Organization ID to use. If none is passed the default organization ID will be used
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | pl-waw-1 | pl-waw-2)

DEPRECATED ARGS:
[ip-id] ID of an existing flexible IP address to attach to the Load Balancer

FLAGS:
-h, --help help for create
-w, --wait wait until the lb is ready
Expand Down
5 changes: 4 additions & 1 deletion docs/commands/lb.md
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,7 @@ scw lb ip create [arg=value ...]
|------|---|-------------|
| project-id | | Project ID to use. If none is passed the default project ID will be used |
| reverse | | Reverse DNS (domain name) for the IP address |
| is-ipv6 | | If true, creates a Flexible IP with an ipv6 address |
| organization-id | | Organization ID to use. If none is passed the default organization ID will be used |
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `pl-waw-1`, `pl-waw-2` | Zone to target. If none is passed will use default zone from the config |

Expand Down Expand Up @@ -899,7 +900,9 @@ scw lb lb create [arg=value ...]
| project-id | | Project ID to use. If none is passed the default project ID will be used |
| name | Required<br />Default: `<generated>` | Name for the Load Balancer |
| description | | Description for the Load Balancer |
| ip-id | | ID of an existing flexible IP address to attach to the Load Balancer |
| ~~ip-id~~ | Deprecated | ID of an existing flexible IP address to attach to the Load Balancer |
| assign-flexible-ip | | Defines whether to automatically assign a flexible public IP to lb. Default value is `false` (do not assign). |
| ip-ids.{index} | | List of IP IDs to attach to the Load Balancer |
| assign-flexible-ip | | Defines whether to automatically assign a flexible public IP to lb. Default value is `false` (do not assign). |
| tags.{index} | | List of tags for the Load Balancer |
| type | Default: `LB-S`<br />One of: `LB-S`, `LB-GP-M`, `LB-GP-L` | Load Balancer commercial offer type. Use the Load Balancer types endpoint to retrieve a list of available offer types |
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ require (
github.com/moby/buildkit v0.11.6
github.com/opencontainers/go-digest v1.0.0
github.com/pkg/errors v0.9.1
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230605161902-063dd98719c5
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230601085652-73d98e0bd94d
github.com/spf13/cobra v1.7.0
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.4
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -499,8 +499,8 @@ github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncj
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230601085652-73d98e0bd94d h1:T90r5KjFup0Gtbn/WnvmwWEjiq8sKwMdMZcW/rYA2wk=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230601085652-73d98e0bd94d/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230605161902-063dd98719c5 h1:cvEzMB3pnmV7nz/UL8otnJkuQ6HZ9JtkB03REanoWPE=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230605161902-063dd98719c5/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
Expand Down
21 changes: 21 additions & 0 deletions internal/namespaces/lb/v1/lb_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,20 @@ func lbLBCreate() *core.Command {
Name: "ip-id",
Short: `ID of an existing flexible IP address to attach to the Load Balancer`,
Required: false,
Deprecated: true,
Positional: false,
},
{
Name: "assign-flexible-ip",
Short: `Defines whether to automatically assign a flexible public IP to lb. Default value is ` + "`" + `false` + "`" + ` (do not assign).`,
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "ip-ids.{index}",
Short: `List of IP IDs to attach to the Load Balancer`,
Required: false,
Deprecated: false,
Positional: false,
},
Expand Down Expand Up @@ -561,6 +575,13 @@ func lbIPCreate() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "is-ipv6",
Short: `If true, creates a Flexible IP with an ipv6 address`,
Required: false,
Deprecated: false,
Positional: false,
},
core.OrganizationIDArgSpec(),
core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1, scw.ZoneNlAms2, scw.ZonePlWaw1, scw.ZonePlWaw2),
},
Expand Down