Skip to content

Commit 33d2698

Browse files
feat(functions): add support for VPC integration (#4785)
Co-authored-by: Rémy Léone <[email protected]>
1 parent b24eded commit 33d2698

File tree

5 files changed

+27
-0
lines changed

5 files changed

+27
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ ARGS:
2222
[http-option=enabled] Configure how HTTP and HTTPS requests are handled (unknown_http_option | enabled | redirected)
2323
[sandbox] Execution environment of the function (unknown_sandbox | v1 | v2)
2424
[tags.{index}] Tags of the Serverless Function
25+
[private-network-id] ID of the Private Network the function is connected to.
2526
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
2627

2728
FLAGS:

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ ARGS:
2222
[http-option] Configure how HTTP and HTTPS requests are handled (unknown_http_option | enabled | redirected)
2323
[sandbox] Execution environment of the function (unknown_sandbox | v1 | v2)
2424
[tags.{index}] Tags of the Serverless Function
25+
[private-network-id] ID of the Private Network the function is connected to.
2526
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
2627

2728
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
@@ -13,6 +13,7 @@ ARGS:
1313
[secret-environment-variables.{index}.key]
1414
[secret-environment-variables.{index}.value]
1515
[tags.{index}] Tags of the Serverless Function Namespace
16+
[activate-vpc-integration] Activate VPC integration for the namespace.
1617
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
1718

1819
FLAGS:

docs/commands/function.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ scw function function create [arg=value ...]
305305
| http-option | Default: `enabled`<br />One of: `unknown_http_option`, `enabled`, `redirected` | Configure how HTTP and HTTPS requests are handled |
306306
| sandbox | One of: `unknown_sandbox`, `v1`, `v2` | Execution environment of the function |
307307
| tags.{index} | | Tags of the Serverless Function |
308+
| private-network-id | | ID of the Private Network the function is connected to. |
308309
| 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 |
309310

310311

@@ -465,6 +466,7 @@ scw function function update <function-id ...> [arg=value ...]
465466
| http-option | One of: `unknown_http_option`, `enabled`, `redirected` | Configure how HTTP and HTTPS requests are handled |
466467
| sandbox | One of: `unknown_sandbox`, `v1`, `v2` | Execution environment of the function |
467468
| tags.{index} | | Tags of the Serverless Function |
469+
| private-network-id | | ID of the Private Network the function is connected to. |
468470
| 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 |
469471

470472

@@ -496,6 +498,7 @@ scw function namespace create [arg=value ...]
496498
| secret-environment-variables.{index}.key | | |
497499
| secret-environment-variables.{index}.value | | |
498500
| tags.{index} | | Tags of the Serverless Function Namespace |
501+
| activate-vpc-integration | | Activate VPC integration for the namespace. |
499502
| 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 |
500503

501504

internal/namespaces/function/v1beta1/function_cli.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,13 @@ func functionNamespaceCreate() *core.Command {
324324
Deprecated: false,
325325
Positional: false,
326326
},
327+
{
328+
Name: "activate-vpc-integration",
329+
Short: `Activate VPC integration for the namespace.`,
330+
Required: false,
331+
Deprecated: false,
332+
Positional: false,
333+
},
327334
core.RegionArgSpec(
328335
scw.RegionFrPar,
329336
scw.RegionNlAms,
@@ -728,6 +735,13 @@ func functionFunctionCreate() *core.Command {
728735
Deprecated: false,
729736
Positional: false,
730737
},
738+
{
739+
Name: "private-network-id",
740+
Short: `ID of the Private Network the function is connected to.`,
741+
Required: false,
742+
Deprecated: false,
743+
Positional: false,
744+
},
731745
core.RegionArgSpec(
732746
scw.RegionFrPar,
733747
scw.RegionNlAms,
@@ -917,6 +931,13 @@ func functionFunctionUpdate() *core.Command {
917931
Deprecated: false,
918932
Positional: false,
919933
},
934+
{
935+
Name: "private-network-id",
936+
Short: `ID of the Private Network the function is connected to.`,
937+
Required: false,
938+
Deprecated: false,
939+
Positional: false,
940+
},
920941
core.RegionArgSpec(
921942
scw.RegionFrPar,
922943
scw.RegionNlAms,

0 commit comments

Comments
 (0)