Skip to content

Commit 727ce92

Browse files
feat(serverless): add tags to container resources (scaleway#4232)
Co-authored-by: Laure-di <[email protected]>
1 parent e7d9d8e commit 727ce92

File tree

8 files changed

+36
-0
lines changed

8 files changed

+36
-0
lines changed

cmd/scw/testdata/test-all-usage-container-namespace-create-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ ARGS:
1212
[description] Description of the namespace to create
1313
[secret-environment-variables.{index}.key]
1414
[secret-environment-variables.{index}.value]
15+
[tags.{index}] [ALPHA] Tags of the Serverless Container Namespace
1516
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
1617

1718
FLAGS:

cmd/scw/testdata/test-all-usage-container-namespace-update-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ ARGS:
1111
[description] Description of the namespace to update
1212
[secret-environment-variables.{index}.key]
1313
[secret-environment-variables.{index}.value]
14+
[tags.{index}] [ALPHA] Tags of the Serverless Container Namespace
1415
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
1516

1617
FLAGS:

cmd/scw/testdata/test-all-usage-function-namespace-create-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ ARGS:
1212
[description] Description of the namespace
1313
[secret-environment-variables.{index}.key]
1414
[secret-environment-variables.{index}.value]
15+
[tags.{index}] [ALPHA] Tags of the Serverless Function Namespace
1516
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
1617

1718
FLAGS:

cmd/scw/testdata/test-all-usage-function-namespace-update-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ ARGS:
1111
[description] Description of the namespace
1212
[secret-environment-variables.{index}.key]
1313
[secret-environment-variables.{index}.value]
14+
[tags.{index}] [ALPHA] Tags of the Serverless Function Namespace
1415
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
1516

1617
FLAGS:

docs/commands/container.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,7 @@ scw container namespace create [arg=value ...]
464464
| description | | Description of the namespace to create |
465465
| secret-environment-variables.{index}.key | | |
466466
| secret-environment-variables.{index}.value | | |
467+
| tags.{index} | | [ALPHA] Tags of the Serverless Container Namespace |
467468
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config |
468469

469470

@@ -551,6 +552,7 @@ scw container namespace update <namespace-id ...> [arg=value ...]
551552
| description | | Description of the namespace to update |
552553
| secret-environment-variables.{index}.key | | |
553554
| secret-environment-variables.{index}.value | | |
555+
| tags.{index} | | [ALPHA] Tags of the Serverless Container Namespace |
554556
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config |
555557

556558

docs/commands/function.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,7 @@ scw function namespace create [arg=value ...]
493493
| description | | Description of the namespace |
494494
| secret-environment-variables.{index}.key | | |
495495
| secret-environment-variables.{index}.value | | |
496+
| tags.{index} | | [ALPHA] Tags of the Serverless Function Namespace |
496497
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config |
497498

498499

@@ -580,6 +581,7 @@ scw function namespace update <namespace-id ...> [arg=value ...]
580581
| description | | Description of the namespace |
581582
| secret-environment-variables.{index}.key | | |
582583
| secret-environment-variables.{index}.value | | |
584+
| tags.{index} | | [ALPHA] Tags of the Serverless Function Namespace |
583585
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config |
584586

585587

internal/namespaces/container/v1beta1/container_cli.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,13 @@ func containerNamespaceCreate() *core.Command {
255255
Deprecated: false,
256256
Positional: false,
257257
},
258+
{
259+
Name: "tags.{index}",
260+
Short: `[ALPHA] Tags of the Serverless Container Namespace`,
261+
Required: false,
262+
Deprecated: false,
263+
Positional: false,
264+
},
258265
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw),
259266
},
260267
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
@@ -311,6 +318,13 @@ func containerNamespaceUpdate() *core.Command {
311318
Deprecated: false,
312319
Positional: false,
313320
},
321+
{
322+
Name: "tags.{index}",
323+
Short: `[ALPHA] Tags of the Serverless Container Namespace`,
324+
Required: false,
325+
Deprecated: false,
326+
Positional: false,
327+
},
314328
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw),
315329
},
316330
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {

internal/namespaces/function/v1beta1/function_cli.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,13 @@ func functionNamespaceCreate() *core.Command {
302302
Deprecated: false,
303303
Positional: false,
304304
},
305+
{
306+
Name: "tags.{index}",
307+
Short: `[ALPHA] Tags of the Serverless Function Namespace`,
308+
Required: false,
309+
Deprecated: false,
310+
Positional: false,
311+
},
305312
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw),
306313
},
307314
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
@@ -358,6 +365,13 @@ func functionNamespaceUpdate() *core.Command {
358365
Deprecated: false,
359366
Positional: false,
360367
},
368+
{
369+
Name: "tags.{index}",
370+
Short: `[ALPHA] Tags of the Serverless Function Namespace`,
371+
Required: false,
372+
Deprecated: false,
373+
Positional: false,
374+
},
361375
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw),
362376
},
363377
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {

0 commit comments

Comments
 (0)