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
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ ARGS:
[hair-count]
[is-happy]
[eyes-color] (unknown | amber | blue | brown | gray | green | hazel | red | violet)
[name]
[organization-id] Organization ID to use. If none is passed will use default organization ID from the config
[region] Region to target. If none is passed will use default region from the config (fr-par)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ ARGS:
[hair-count]
[is-happy]
[eyes-color] (unknown | amber | blue | brown | gray | green | hazel | red | violet)
[name]
[region] Region to target. If none is passed will use default region from the config (fr-par)

FLAGS:
Expand Down
4 changes: 2 additions & 2 deletions internal/namespaces/instance/v1/instance_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,14 +242,14 @@ func instanceUserData() *core.Command {
Long: `User data is a key value store API you can use to provide data from and to your server without authentication.

As an example of use, Scaleway images contain the script scw-generate-ssh-keys which generates SSH server’s host keys then stores their fingerprints as user data under the key “ssh-host-fingerprints”.
This way, our users can ensure they are really connecting to their Scaleway instance and they are not victim of a man-in-the-middle attack.
This way, we ensure they are really connecting to their Scaleway instance and they are not victim of a man-in-the-middle attack.

There are two endpoints to access user data:
- **From a running instance**, by using the metadata API at http://169.254.42.42/user_data.
To enhance security, we only allow user data viewing and editing as root.
To know if the query is issued by the root user, we only accept queries made from a local port below 1024 (by default, non-root users can’t bind ports below 1024).
To specify the local port with cURL, use ` + "`" + `curl --local-port 1-1024 http://169.254.42.42/user_data` + "`" + `
- **From the compute API** at using methods described bellow.
- **From the instance API** at using methods described bellow.
`,
Namespace: "instance",
Resource: "user-data",
Expand Down
8 changes: 8 additions & 0 deletions internal/namespaces/test/v1/test_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ func testHumanCreate() *core.Command {
Required: false,
EnumValues: []string{"unknown", "amber", "blue", "brown", "gray", "green", "hazel", "red", "violet"},
},
{
Name: "name",
Required: false,
},
core.OrganizationIDArgSpec(),
core.RegionArgSpec(scw.RegionFrPar),
},
Expand Down Expand Up @@ -263,6 +267,10 @@ func testHumanUpdate() *core.Command {
Required: false,
EnumValues: []string{"unknown", "amber", "blue", "brown", "gray", "green", "hazel", "red", "violet"},
},
{
Name: "name",
Required: false,
},
core.RegionArgSpec(scw.RegionFrPar),
},
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
Expand Down