diff --git a/internal/e2e/testdata/test-human-create-usage.stderr.golden b/internal/e2e/testdata/test-human-create-usage.stderr.golden index a436fae19d..665de9c8f9 100644 --- a/internal/e2e/testdata/test-human-create-usage.stderr.golden +++ b/internal/e2e/testdata/test-human-create-usage.stderr.golden @@ -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) diff --git a/internal/e2e/testdata/test-human-update-usage.stderr.golden b/internal/e2e/testdata/test-human-update-usage.stderr.golden index e8c22b3d89..7f0736ed95 100644 --- a/internal/e2e/testdata/test-human-update-usage.stderr.golden +++ b/internal/e2e/testdata/test-human-update-usage.stderr.golden @@ -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: diff --git a/internal/namespaces/instance/v1/instance_cli.go b/internal/namespaces/instance/v1/instance_cli.go index 555fd7fbb2..60a46d9926 100644 --- a/internal/namespaces/instance/v1/instance_cli.go +++ b/internal/namespaces/instance/v1/instance_cli.go @@ -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", diff --git a/internal/namespaces/test/v1/test_cli.go b/internal/namespaces/test/v1/test_cli.go index 77b9e44dcd..d24531f646 100644 --- a/internal/namespaces/test/v1/test_cli.go +++ b/internal/namespaces/test/v1/test_cli.go @@ -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), }, @@ -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) {