Skip to content

Commit e73b723

Browse files
fix(instance): delete default values for handle oneof correctly (#3763)
Co-authored-by: Jules Castéran <jcasteran@scaleway.com>
1 parent 6838f60 commit e73b723

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

cmd/scw/testdata/test-all-usage-instance-security-group-create-usage.golden

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ ARGS:
2626
[description] Description of the security group
2727
[project-id] Project ID to use. If none is passed the default project ID will be used
2828
[tags.{index}] Tags of the security group
29-
[project-default=false] Whether this security group becomes the default security group for new Instances
29+
[project-default] Whether this security group becomes the default security group for new Instances
3030
[stateful=true] Whether the security group is stateful or not
3131
[inbound-default-policy=accept] Default policy for inbound rules (unknown_policy | accept | drop)
3232
[outbound-default-policy=accept] Default policy for outbound rules (unknown_policy | accept | drop)
@@ -35,7 +35,7 @@ ARGS:
3535
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | fr-par-3 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3)
3636

3737
DEPRECATED ARGS:
38-
[organization-default=false] Defines whether this security group becomes the default security group for new Instances
38+
[organization-default] Defines whether this security group becomes the default security group for new Instances
3939

4040
FLAGS:
4141
-h, --help help for create

docs/commands/instance.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,8 +1121,8 @@ scw instance security-group create [arg=value ...]
11211121
| description | | Description of the security group |
11221122
| project-id | | Project ID to use. If none is passed the default project ID will be used |
11231123
| tags.{index} | | Tags of the security group |
1124-
| ~~organization-default~~ | Deprecated<br />Default: `false` | Defines whether this security group becomes the default security group for new Instances |
1125-
| project-default | Default: `false` | Whether this security group becomes the default security group for new Instances |
1124+
| ~~organization-default~~ | Deprecated | Defines whether this security group becomes the default security group for new Instances |
1125+
| project-default | | Whether this security group becomes the default security group for new Instances |
11261126
| stateful | Default: `true` | Whether the security group is stateful or not |
11271127
| inbound-default-policy | Default: `accept`<br />One of: `unknown_policy`, `accept`, `drop` | Default policy for inbound rules |
11281128
| outbound-default-policy | Default: `accept`<br />One of: `unknown_policy`, `accept`, `drop` | Default policy for outbound rules |

internal/namespaces/instance/v1/instance_cli.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2108,15 +2108,13 @@ func instanceSecurityGroupCreate() *core.Command {
21082108
Required: false,
21092109
Deprecated: true,
21102110
Positional: false,
2111-
Default: core.DefaultValueSetter("false"),
21122111
},
21132112
{
21142113
Name: "project-default",
21152114
Short: `Whether this security group becomes the default security group for new Instances`,
21162115
Required: false,
21172116
Deprecated: false,
21182117
Positional: false,
2119-
Default: core.DefaultValueSetter("false"),
21202118
},
21212119
{
21222120
Name: "stateful",

0 commit comments

Comments
 (0)