Skip to content

Commit aa56ae4

Browse files
authored
feat(instance): move EncryptedRdpPassword elements to Server (#3843)
1 parent 7956da5 commit aa56ae4

File tree

3 files changed

+29
-20
lines changed

3 files changed

+29
-20
lines changed

cmd/scw/testdata/test-all-usage-instance-server-update-usage.golden

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,26 +22,27 @@ EXAMPLES:
2222
scw instance server server update 11111111-1111-1111-1111-111111111111 placement-group-id=11111111-1111-1111-1111-111111111111
2323

2424
ARGS:
25-
server-id UUID of the Instance
26-
[name] Name of the Instance
27-
[ip] IP that should be attached to the server (use ip=none to detach)
28-
[cloud-init] The cloud-init script to use (Support file loading with @/path/to/file)
29-
[boot-type] (local | bootscript | rescue)
30-
[tags.{index}] Tags of the Instance
31-
[volumes.{key}.boot=false] Force the Instance to boot on this volume
32-
[volumes.{key}.base-snapshot] ID of the snapshot on which this volume will be based
33-
[volumes.{key}.project] Project ID of the volume
34-
[volumes.{key}.organization] Organization ID of the volume
35-
[dynamic-ip-required]
36-
[routed-ip-enabled] True to configure the instance so it uses the new routed IP mode (once this is set to True you cannot set it back to False)
37-
[public-ips.{index}] A list of reserved IP IDs to attach to the Instance
38-
[protected]
39-
[security-group-id]
40-
[volume-ids.{index}] Will update ALL volume IDs at once, including the root volume of the server (use volume-ids=none to detach all volumes)
41-
[placement-group-id] Placement group ID if Instance must be part of a placement group
42-
[private-nics.{index}] Instance private NICs
43-
[commercial-type] Set the commercial_type for this Instance.
44-
[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)
25+
server-id UUID of the Instance
26+
[name] Name of the Instance
27+
[ip] IP that should be attached to the server (use ip=none to detach)
28+
[cloud-init] The cloud-init script to use (Support file loading with @/path/to/file)
29+
[boot-type] (local | bootscript | rescue)
30+
[tags.{index}] Tags of the Instance
31+
[volumes.{key}.boot=false] Force the Instance to boot on this volume
32+
[volumes.{key}.base-snapshot] ID of the snapshot on which this volume will be based
33+
[volumes.{key}.project] Project ID of the volume
34+
[volumes.{key}.organization] Organization ID of the volume
35+
[dynamic-ip-required]
36+
[routed-ip-enabled] True to configure the instance so it uses the new routed IP mode (once this is set to True you cannot set it back to False)
37+
[public-ips.{index}] A list of reserved IP IDs to attach to the Instance
38+
[protected]
39+
[security-group-id]
40+
[volume-ids.{index}] Will update ALL volume IDs at once, including the root volume of the server (use volume-ids=none to detach all volumes)
41+
[placement-group-id] Placement group ID if Instance must be part of a placement group
42+
[private-nics.{index}] Instance private NICs
43+
[commercial-type] Set the commercial_type for this Instance.
44+
[admin-password-encryption-ssh-key-id] UUID of the SSH RSA key that will be used to encrypt the initial admin password for OS requiring it. Mandatory for Windows OS.
45+
[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)
4546

4647
DEPRECATED ARGS:
4748
[bootscript]

docs/commands/instance.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2240,6 +2240,7 @@ scw instance server update <server-id ...> [arg=value ...]
22402240
| placement-group-id | | Placement group ID if Instance must be part of a placement group |
22412241
| private-nics.{index} | | Instance private NICs |
22422242
| commercial-type | | Set the commercial_type for this Instance. |
2243+
| admin-password-encryption-ssh-key-id | | UUID of the SSH RSA key that will be used to encrypt the initial admin password for OS requiring it. Mandatory for Windows OS. |
22432244
| zone | Default: `fr-par-1`<br />One of: `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` | Zone to target. If none is passed will use default zone from the config |
22442245

22452246

internal/namespaces/instance/v1/instance_cli.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,13 @@ func instanceServerUpdate() *core.Command {
720720
Deprecated: false,
721721
Positional: false,
722722
},
723+
{
724+
Name: "admin-password-encryption-ssh-key-id",
725+
Short: `UUID of the SSH RSA key that will be used to encrypt the initial admin password for OS requiring it. Mandatory for Windows OS.`,
726+
Required: false,
727+
Deprecated: false,
728+
Positional: false,
729+
},
723730
core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneFrPar3, scw.ZoneNlAms1, scw.ZoneNlAms2, scw.ZoneNlAms3, scw.ZonePlWaw1, scw.ZonePlWaw2, scw.ZonePlWaw3),
724731
},
725732
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {

0 commit comments

Comments
 (0)