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
1 change: 1 addition & 0 deletions cmd/scw/testdata/test-all-usage-vpc-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ AVAILABLE COMMANDS:
route Route management command
rule Rule management command
vpc VPC management command
vpc-connector VPC connector management command

FLAGS:
-h, --help help for vpc
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Create a new VPC connector in the specified region.

USAGE:
scw vpc vpc-connector create [arg=value ...]

ARGS:
name=<generated> Name for the VPC connector
[tags.{index}] Tags for the VPC connector
[vpc-id] VPC ID to filter for. Only connectors belonging to this VPC will be returned
[target-vpc-id] Target VPC ID to filter for. Only connectors belonging to this target VPC will be returned
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)

FLAGS:
-h, --help help for create
--list-sub-commands List all subcommands

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Delete a VPC connector specified by its VPC connector ID.

USAGE:
scw vpc vpc-connector delete <vpc-connector-id ...> [arg=value ...]

ARGS:
vpc-connector-id VPC connector ID
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)

FLAGS:
-h, --help help for delete
--list-sub-commands List all subcommands

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Retrieve details of an existing VPC connector, specified by its VPC connector ID.

USAGE:
scw vpc vpc-connector get <vpc-connector-id ...> [arg=value ...]

ARGS:
vpc-connector-id VPC connector ID
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)

FLAGS:
-h, --help help for get
--list-sub-commands List all subcommands

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
List existing VPC connectors in the specified region.

USAGE:
scw vpc vpc-connector list [arg=value ...]

ARGS:
[order-by] Sort order of the returned VPC connectors (created_at_asc | created_at_desc | name_asc | name_desc)
[name] Name to filter for. Only connectors with names containing this string will be returned
[tags.{index}] Tags to filter for. Only connectors with one or more matching tags will be returned
[project-id] Project ID to filter for. Only connectors belonging to this Project will be returned
[vpc-id] VPC ID to filter for. Only connectors belonging to this VPC will be returned
[target-vpc-id] Target VPC ID to filter for. Only connectors belonging to this target VPC will be returned
[status] Status of the VPC connector (unknown_vpc_connector_status | orphan | peered | conflict)
[organization-id] Organization ID to filter for. Only connectors belonging to this Organization will be returned
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all)

FLAGS:
-h, --help help for list
--list-sub-commands List all subcommands

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Update parameters including name and tags of the specified VPC connector.

USAGE:
scw vpc vpc-connector update <vpc-connector-id ...> [arg=value ...]

ARGS:
vpc-connector-id VPC connector ID
[name] Name for the VPC connector
[tags.{index}] Tags for the VPC connector
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)

FLAGS:
-h, --help help for update
--list-sub-commands List all subcommands

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
25 changes: 25 additions & 0 deletions cmd/scw/testdata/test-all-usage-vpc-vpc-connector-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
VPC peering connectors.

USAGE:
scw vpc vpc-connector <command>

AVAILABLE COMMANDS:
create Create a VPC connector
delete Delete a VPC connector
get Get a VPC connector
list List VPC connectors
update Update VPC connector

FLAGS:
-h, --help help for vpc-connector
--list-sub-commands List all subcommands

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use

Use "scw vpc vpc-connector [command] --help" for more information about a command.
123 changes: 123 additions & 0 deletions docs/commands/vpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ This API allows you to manage your Virtual Private Clouds (VPCs) and Private Net
- [Get a VPC](#get-a-vpc)
- [List VPCs](#list-vpcs)
- [Update VPC](#update-vpc)
- [VPC connector management command](#vpc-connector-management-command)
- [Create a VPC connector](#create-a-vpc-connector)
- [Delete a VPC connector](#delete-a-vpc-connector)
- [Get a VPC connector](#get-a-vpc-connector)
- [List VPC connectors](#list-vpc-connectors)
- [Update VPC connector](#update-vpc-connector)


## Private network management command
Expand Down Expand Up @@ -515,3 +521,120 @@ scw vpc vpc update <vpc-id ...> [arg=value ...]



## VPC connector management command

VPC peering connectors.


### Create a VPC connector

Create a new VPC connector in the specified region.

**Usage:**

```
scw vpc vpc-connector create [arg=value ...]
```


**Args:**

| Name | | Description |
|------|---|-------------|
| name | Required<br />Default: `<generated>` | Name for the VPC connector |
| tags.{index} | | Tags for the VPC connector |
| vpc-id | | VPC ID to filter for. Only connectors belonging to this VPC will be returned |
| target-vpc-id | | Target VPC ID to filter for. Only connectors belonging to this target VPC will be returned |
| 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 |



### Delete a VPC connector

Delete a VPC connector specified by its VPC connector ID.

**Usage:**

```
scw vpc vpc-connector delete <vpc-connector-id ...> [arg=value ...]
```


**Args:**

| Name | | Description |
|------|---|-------------|
| vpc-connector-id | Required | VPC connector ID |
| 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 |



### Get a VPC connector

Retrieve details of an existing VPC connector, specified by its VPC connector ID.

**Usage:**

```
scw vpc vpc-connector get <vpc-connector-id ...> [arg=value ...]
```


**Args:**

| Name | | Description |
|------|---|-------------|
| vpc-connector-id | Required | VPC connector ID |
| 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 |



### List VPC connectors

List existing VPC connectors in the specified region.

**Usage:**

```
scw vpc vpc-connector list [arg=value ...]
```


**Args:**

| Name | | Description |
|------|---|-------------|
| order-by | One of: `created_at_asc`, `created_at_desc`, `name_asc`, `name_desc` | Sort order of the returned VPC connectors |
| name | | Name to filter for. Only connectors with names containing this string will be returned |
| tags.{index} | | Tags to filter for. Only connectors with one or more matching tags will be returned |
| project-id | | Project ID to filter for. Only connectors belonging to this Project will be returned |
| vpc-id | | VPC ID to filter for. Only connectors belonging to this VPC will be returned |
| target-vpc-id | | Target VPC ID to filter for. Only connectors belonging to this target VPC will be returned |
| status | One of: `unknown_vpc_connector_status`, `orphan`, `peered`, `conflict` | Status of the VPC connector |
| organization-id | | Organization ID to filter for. Only connectors belonging to this Organization will be returned |
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw`, `all` | Region to target. If none is passed will use default region from the config |



### Update VPC connector

Update parameters including name and tags of the specified VPC connector.

**Usage:**

```
scw vpc vpc-connector update <vpc-connector-id ...> [arg=value ...]
```


**Args:**

| Name | | Description |
|------|---|-------------|
| vpc-connector-id | Required | VPC connector ID |
| name | | Name for the VPC connector |
| tags.{index} | | Tags for the VPC connector |
| 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 |



2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ require (
github.com/moby/buildkit v0.28.0
github.com/moby/go-archive v0.2.0
github.com/opencontainers/go-digest v1.0.0
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260318153310-43bb17f8bec8
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260323144744-f9a0138f3588
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
github.com/spf13/cobra v1.10.2
github.com/spf13/pflag v1.0.10
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,8 @@ github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260318153310-43bb17f8bec8 h1:Q+nIbu4BcGVqzQrFI2ku0jJ29o99xoC1fbKIZCxGTxM=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260318153310-43bb17f8bec8/go.mod h1:SKcIU6lqwljcpjOlTnSfMFfURd/XT+08spQyqN9OTWA=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260323144744-f9a0138f3588 h1:h6Yk+vh+26TAP7l79AY6mP6SI5NH93BZ7FuHusAilYQ=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260323144744-f9a0138f3588/go.mod h1:SKcIU6lqwljcpjOlTnSfMFfURd/XT+08spQyqN9OTWA=
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
github.com/secure-systems-lab/go-securesystemslib v0.10.0 h1:l+H5ErcW0PAehBNrBxoGv1jjNpGYdZ9RcheFkB2WI14=
Expand Down
Loading
Loading