From 6b2a465de8c8b24e0d071098235ce3638bc2391a Mon Sep 17 00:00:00 2001 From: Jules Casteran Date: Wed, 23 Oct 2024 15:09:34 +0200 Subject: [PATCH 1/2] docs(instance): add dynamic-ip-required default value Instance API already handle it as true per default --- internal/namespaces/instance/v1/custom_server_create.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/namespaces/instance/v1/custom_server_create.go b/internal/namespaces/instance/v1/custom_server_create.go index 8f677d1543..57214acd03 100644 --- a/internal/namespaces/instance/v1/custom_server_create.go +++ b/internal/namespaces/instance/v1/custom_server_create.go @@ -94,8 +94,9 @@ func serverCreateCommand() *core.Command { Default: core.DefaultValueSetter("new"), }, { - Name: "dynamic-ip-required", - Short: "Define if a dynamic IPv4 is required for the Instance. If server has no IPv4, a dynamic one will be allocated.", + Name: "dynamic-ip-required", + Short: "Define if a dynamic IPv4 is required for the Instance. If server has no IPv4, a dynamic one will be allocated.", + Default: core.DefaultValueSetter("true"), }, { Name: "tags.{index}", From 0925a02bc3bcb29c0a369912a93cd2a14178260e Mon Sep 17 00:00:00 2001 From: Jules Casteran Date: Wed, 23 Oct 2024 15:10:45 +0200 Subject: [PATCH 2/2] gen doc --- .../testdata/test-all-usage-instance-server-create-usage.golden | 2 +- docs/commands/instance.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/scw/testdata/test-all-usage-instance-server-create-usage.golden b/cmd/scw/testdata/test-all-usage-instance-server-create-usage.golden index 5bf2e1d60a..6a29d9c523 100644 --- a/cmd/scw/testdata/test-all-usage-instance-server-create-usage.golden +++ b/cmd/scw/testdata/test-all-usage-instance-server-create-usage.golden @@ -41,7 +41,7 @@ ARGS: [root-volume] Local root volume of the server [additional-volumes.{index}] Additional local and block volumes attached to your server [ip=new] Either an IP, an IP ID, ('new', 'ipv4', 'ipv6' or 'both') to create new IPs, 'dynamic' to use a dynamic IP or 'none' for no public IP (new | ipv4 | ipv6 | both | dynamic | none | |
) - [dynamic-ip-required] Define if a dynamic IPv4 is required for the Instance. If server has no IPv4, a dynamic one will be allocated. + [dynamic-ip-required=true] Define if a dynamic IPv4 is required for the Instance. If server has no IPv4, a dynamic one will be allocated. [tags.{index}] Server tags [ipv6] Enable IPv6, to be used with routed-ip-enabled=false [stopped] Do not start server after its creation diff --git a/docs/commands/instance.md b/docs/commands/instance.md index 97082670b4..c2b3642582 100644 --- a/docs/commands/instance.md +++ b/docs/commands/instance.md @@ -1714,7 +1714,7 @@ scw instance server create [arg=value ...] | root-volume | | Local root volume of the server | | additional-volumes.{index} | | Additional local and block volumes attached to your server | | ip | Default: `new` | Either an IP, an IP ID, ('new', 'ipv4', 'ipv6' or 'both') to create new IPs, 'dynamic' to use a dynamic IP or 'none' for no public IP (new | ipv4 | ipv6 | both | dynamic | none | |
) | -| dynamic-ip-required | | Define if a dynamic IPv4 is required for the Instance. If server has no IPv4, a dynamic one will be allocated. | +| dynamic-ip-required | Default: `true` | Define if a dynamic IPv4 is required for the Instance. If server has no IPv4, a dynamic one will be allocated. | | tags.{index} | | Server tags | | ipv6 | | Enable IPv6, to be used with routed-ip-enabled=false | | stopped | | Do not start server after its creation |