Skip to content

feat(vpcgw) support v2 #4615

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Mar 26, 2025
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
@@ -0,0 +1,28 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Create a new Public Gateway in the specified Scaleway Project, defining its **name**, **type** and other configuration details such as whether to enable SSH bastion.

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

ARGS:
[project-id] Project ID to use. If none is passed the default project ID will be used
[name=<generated>] Name for the gateway
[tags.{index}] Tags for the gateway
[type=VPC-GW-S] Gateway type (commercial offer type)
[upstream-dns-servers.{index}] Array of DNS server IP addresses to override the gateway's default recursive DNS servers
[ip-id] Existing IP address to attach to the gateway
[enable-smtp] Defines whether SMTP traffic should be allowed pass through the gateway
[enable-bastion] Defines whether SSH bastion should be enabled the gateway
[bastion-port] Port of the SSH bastion
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3)

FLAGS:
-h, --help help for create
-w, --wait wait until the gateway is ready

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 an existing Public Gateway, specified by its gateway ID. This action is irreversible.

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

ARGS:
gateway-id ID of the gateway to delete
[cleanup-dhcp] Defines whether to clean up attached DHCP configurations (if any, and if not attached to another Gateway Network)
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3)

FLAGS:
-h, --help help for delete

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,19 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Get details of a Public Gateway, specified by its gateway ID. The response object contains full details of the gateway, including its **name**, **type**, **status** and more.

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

ARGS:
gateway-id ID of the gateway to fetch
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3)

FLAGS:
-h, --help help for get

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,26 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
List Public Gateways in a given Scaleway Organization or Project. By default, results are displayed in ascending order of creation date.

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

ARGS:
[order-by] Order in which to return results (created_at_asc | created_at_desc | name_asc | name_desc | type_asc | type_desc | status_asc | status_desc)
[project-id] Include only gateways in this Project
[name] Filter for gateways which have this search term in their name
[tags.{index}] Filter for gateways with these tags
[type] Filter for gateways of this type
[status] Filter for gateways with this current status. Use `unknown` to include all statuses (unknown | stopped | allocating | configuring | running | stopping | failed | deleting | deleted | locked)
[private-network-id] Filter for gateways attached to this Private nNetwork
[organization-id] Include only gateways in this Organization
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3 | all)

FLAGS:
-h, --help help for list

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️️ 🟥🟥🟥️
Attach a specific Public Gateway to a specific Private Network (create a GatewayNetwork). You can configure parameters for the connection including DHCP settings, whether to enable masquerade (dynamic NAT), and more.

USAGE:
scw vpc-gw gateway-network create [arg=value ...]

ARGS:
[gateway-id] Public Gateway to connect
[private-network-id] Private Network to connect
[enable-masquerade] Defines whether to enable masquerade (dynamic NAT) on the GatewayNetwork.
[enable-dhcp] Defines whether to enable DHCP on this Private Network.
[dhcp-id] ID of an existing DHCP configuration object to use for this GatewayNetwork
[address] Static IP address in CIDR format to to use without DHCP
[ipam-config.push-default-route] Enabling the default route also enables masquerading
[ipam-config.ipam-ip-id] Use this IPAM-booked IP ID as the Gateway's IP in this Private Network
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3)

FLAGS:
-h, --help help for create
-w, --wait wait until the gateway-network is ready

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,21 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Detach a given Public Gateway from a given Private Network, i.e. delete a GatewayNetwork specified by a gateway_network_id.

USAGE:
scw vpc-gw gateway-network delete <gateway-network-id ...> [arg=value ...]

ARGS:
gateway-network-id ID of the GatewayNetwork to delete
[cleanup-dhcp] Defines whether to clean up attached DHCP configurations (if any, and if not attached to another Gateway Network)
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3)

FLAGS:
-h, --help help for delete
-w, --wait wait until the gateway-network is ready

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,19 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Get details of a given connection between a Public Gateway and a Private Network (this connection = a GatewayNetwork), specified by its `gateway_network_id`. The response object contains details of the connection including the IDs of the Public Gateway and Private Network, the dates the connection was created/updated and its configuration settings.

USAGE:
scw vpc-gw gateway-network get <gateway-network-id ...> [arg=value ...]

ARGS:
gateway-network-id ID of the GatewayNetwork to fetch
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3)

FLAGS:
-h, --help help for get

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,24 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
List the connections between Public Gateways and Private Networks (a connection = a GatewayNetwork). You can choose to filter by `gateway-id` to list all Private Networks attached to the specified Public Gateway, or by `private_network_id` to list all Public Gateways attached to the specified Private Network. Other query parameters are also available. The result is an array of GatewayNetwork objects, each giving details of the connection between a given Public Gateway and a given Private Network.

USAGE:
scw vpc-gw gateway-network list [arg=value ...]

ARGS:
[order-by] Order in which to return results (created_at_asc | created_at_desc | status_asc | status_desc)
[gateway-id] Filter for GatewayNetworks connected to this gateway
[private-network-id] Filter for GatewayNetworks connected to this Private Network
[enable-masquerade] Filter for GatewayNetworks with this `enable_masquerade` setting
[dhcp-id] Filter for GatewayNetworks using this DHCP configuration
[status] Filter for GatewayNetworks with this current status this status. Use `unknown` to include all statuses (unknown | created | attaching | configuring | ready | detaching | deleted)
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3 | all)

FLAGS:
-h, --help help for list

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,35 @@
---
version: 1
interactions:
- request:
body: '{"access_key":"SCWBDFF054RNNE8204AJ","secret_key":null,"description":"my-key","created_at":"2022-06-10T08:39:27.845066Z","updated_at":"2022-07-05T15:12:12.987880Z","expires_at":null,"default_project_id":"564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5","editable":true,"creation_ip":"51.159.46.153","application_id":"531f5518-a0a5-44c2-b790-a9975505c89d"}'
form: {}
headers:
User-Agent:
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.4; darwin; amd64) cli-e2e-test
url: https://api.scaleway.com/iam/v1alpha1/api-keys/SCWXXXXXXXXXXXXXXXXX
method: GET
response:
body: '{"access_key":"SCWBDFF054RNNE8204AJ","secret_key":null,"description":"my-key","created_at":"2022-06-10T08:39:27.845066Z","updated_at":"2022-07-05T15:12:12.987880Z","expires_at":null,"default_project_id":"564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5","editable":true,"creation_ip":"51.159.46.153","application_id":"531f5518-a0a5-44c2-b790-a9975505c89d"}'
headers:
Content-Length:
- "344"
Content-Security-Policy:
- default-src 'none'; frame-ancestors 'none'
Content-Type:
- application/json
Date:
- Wed, 14 Jun 2023 13:56:47 GMT
Server:
- Scaleway API-Gateway
Strict-Transport-Security:
- max-age=63072000
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- DENY
X-Request-Id:
- 8dedeae5-ec2d-4679-95c6-bc9e7089d96a
status: 200 OK
code: 200
duration: ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Update the configuration parameters of a connection between a given Public Gateway and Private Network (the connection = a GatewayNetwork). Updatable parameters include DHCP settings and whether to enable traffic masquerade (dynamic NAT).

USAGE:
scw vpc-gw gateway-network update <gateway-network-id ...> [arg=value ...]

ARGS:
gateway-network-id ID of the GatewayNetwork to update
[enable-masquerade] Defines whether to enable masquerade (dynamic NAT) on the GatewayNetwork.
[enable-dhcp] Defines whether to enable DHCP on this Private Network.
[dhcp-id] ID of the new DHCP configuration object to use with this GatewayNetwork
[address] New static IP address
[ipam-config.push-default-route] Enabling the default route also enables masquerading
[ipam-config.ipam-ip-id] Use this IPAM-booked IP ID as the Gateway's IP in this Private Network
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3)

FLAGS:
-h, --help help for update

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,24 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
A Gateway Network represents the connection of a Private Network to a Public Gateway. It holds configuration options relative to this specific connection, such as the DHCP configuration.

USAGE:
scw vpc-gw gateway-network <command>

AVAILABLE COMMANDS:
create-v2 Attach a Public Gateway to a Private Network
delete-v2 Detach a Public Gateway from a Private Network
get-v2 Get a Public Gateway connection to a Private Network
list-v2 List Public Gateway connections to Private Networks
update-v2 Update a Public Gateway's connection to a Private Network

FLAGS:
-h, --help help for gateway-network

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-gw gateway-network [command] --help" for more information about a command.
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ USAGE:
scw vpc-gw gateway-network <command>

AVAILABLE COMMANDS:
create Attach a Public Gateway to a Private Network
delete Detach a Public Gateway from a Private Network
get Get a Public Gateway connection to a Private Network
list List Public Gateway connections to Private Networks
update Update a Public Gateway's connection to a Private Network
create-v2 Attach a Public Gateway to a Private Network
delete-v2 Detach a Public Gateway from a Private Network
get-v2 Get a Public Gateway connection to a Private Network
list-v2 List Public Gateway connections to Private Networks
update-v2 Update a Public Gateway's connection to a Private Network

FLAGS:
-h, --help help for gateway-network
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Refresh the SSH keys of a given Public Gateway, specified by its gateway ID. This adds any new SSH keys in the gateway's Scaleway Project to the gateway itself.

USAGE:
scw vpc-gw gateway refresh-ssh-keys <gateway-id ...> [arg=value ...]

ARGS:
gateway-id ID of the gateway to refresh SSH keys on
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3)

FLAGS:
-h, --help help for refresh-ssh-keys

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,18 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
List the different Public Gateway commercial offer types available at Scaleway. The response is an array of objects describing the name and technical details of each available gateway type.

USAGE:
scw vpc-gw gateway-type list [arg=value ...]

ARGS:
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3)

FLAGS:
-h, --help help for list

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️️ 🟥🟥🟥️
Public Gateways come in various shapes, sizes and prices, which are described by gateway types. They represent the different commercial offer types for Public Gateways available at Scaleway.

USAGE:
scw vpc-gw gateway-type <command>

AVAILABLE COMMANDS:
list-v2 List Public Gateway types

FLAGS:
-h, --help help for gateway-type

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-gw gateway-type [command] --help" for more information about a command.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ USAGE:
scw vpc-gw gateway-type <command>

AVAILABLE COMMANDS:
list List Public Gateway types
list-v2 List Public Gateway types

FLAGS:
-h, --help help for gateway-type
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Update the parameters of an existing Public Gateway, for example, its **name**, **tags**, **SSH bastion configuration**, and **DNS servers**.

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

ARGS:
gateway-id ID of the gateway to update
[name] Name for the gateway
[tags.{index}] Tags for the gateway
[upstream-dns-servers.{index}] Array of DNS server IP addresses to override the gateway's default recursive DNS servers
[enable-bastion] Defines whether SSH bastion should be enabled the gateway
[bastion-port] Port of the SSH bastion
[enable-smtp] Defines whether SMTP traffic should be allowed to pass through the gateway
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3)

FLAGS:
-h, --help help for update

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
Loading
Loading