Skip to content

Commit 8f37538

Browse files
authored
feat(vpc): only support regional vpc (#3279)
1 parent 8bd6672 commit 8f37538

28 files changed

+16799
-3875
lines changed

cmd/scw/testdata/test-all-usage-vpc-private-network-create-usage.golden

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
Create a new Private Network. Once created, you can attach Scaleway resources in the same Availability Zone.
3+
Create a new Private Network. Once created, you can attach Scaleway resources which are in the same region.
44

55
USAGE:
66
scw vpc private-network create [arg=value ...]
@@ -10,7 +10,8 @@ ARGS:
1010
[project-id] Project ID to use. If none is passed the default project ID will be used
1111
[tags.{index}] Tags for the Private Network
1212
[subnets.{index}] Private Network subnets CIDR
13-
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | fr-par-3 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2)
13+
[vpc-id] VPC in which to create the Private Network
14+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
1415

1516
FLAGS:
1617
-h, --help help for create

cmd/scw/testdata/test-all-usage-vpc-private-network-delete-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ USAGE:
77

88
ARGS:
99
private-network-id Private Network ID
10-
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | fr-par-3 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2)
10+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
1111

1212
FLAGS:
1313
-h, --help help for delete

cmd/scw/testdata/test-all-usage-vpc-private-network-get-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ USAGE:
77

88
ARGS:
99
private-network-id Private Network ID
10-
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | fr-par-3 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2)
10+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
1111

1212
FLAGS:
1313
-h, --help help for get

cmd/scw/testdata/test-all-usage-vpc-private-network-list-usage.golden

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
List existing Private Networks in a specified Availability Zone. By default, the Private Networks returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field.
3+
List existing Private Networks in the specified region. By default, the Private Networks returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field.
44

55
USAGE:
66
scw vpc private-network list [arg=value ...]
@@ -11,9 +11,10 @@ ARGS:
1111
[tags.{index}] Tags to filter for. Only Private Networks with one or more matching tags will be returned
1212
[project-id] Project ID to filter for. Only Private Networks belonging to this Project will be returned
1313
[private-network-ids.{index}] Private Network IDs to filter for. Only Private Networks with one of these IDs will be returned
14-
[include-regional] Defines whether to include regional Private Networks in the response
14+
[vpc-id] VPC ID to filter for. Only Private Networks belonging to this VPC will be returned
15+
[dhcp-enabled] DHCP status to filter for. When true, only Private Networks with managed DHCP enabled will be returned
1516
[organization-id] Organization ID to filter for. Only Private Networks belonging to this Organization will be returned
16-
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | fr-par-3 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | all)
17+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all)
1718

1819
FLAGS:
1920
-h, --help help for list

cmd/scw/testdata/test-all-usage-vpc-private-network-update-usage.golden

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,9 @@ USAGE:
77

88
ARGS:
99
private-network-id Private Network ID
10-
[name] Name of the private network
10+
[name] Name for the Private Network
1111
[tags.{index}] Tags for the Private Network
12-
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | fr-par-3 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2)
13-
14-
DEPRECATED ARGS:
15-
[subnets.{index}] Private Network subnets CIDR (deprecated)
12+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
1613

1714
FLAGS:
1815
-h, --help help for update

cmd/scw/testdata/test-all-usage-vpc-private-network-usage.golden

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
A Private Network allows you to interconnect your Scaleway resources in an
4-
isolated and private network. Network reachability is limited
5-
to resources that are on the same Private Network. Note that a resource can
6-
be part of multiple Private Networks.
3+
A Private Network allows you to interconnect your Scaleway resources
4+
in an isolated and private network. Network reachability is limited
5+
to resources that are on the same Private Network. Note that a
6+
resource can be a part of multiple private networks.
77

88
USAGE:
99
scw vpc private-network <command>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
CIDR Subnet
4+
5+
USAGE:
6+
scw vpc subnet
7+
8+
FLAGS:
9+
-h, --help help for subnet
10+
11+
GLOBAL FLAGS:
12+
-c, --config string The path to the config file
13+
-D, --debug Enable debug mode
14+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
15+
-p, --profile string The config profile to use

cmd/scw/testdata/test-all-usage-vpc-usage.golden

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ USAGE:
77

88
AVAILABLE COMMANDS:
99
private-network Private network management command
10+
subnet Subnet management command
11+
vpc VPC management command
1012

1113
FLAGS:
1214
-h, --help help for vpc
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Create a new VPC in the specified region.
4+
5+
USAGE:
6+
scw vpc vpc create [arg=value ...]
7+
8+
ARGS:
9+
name=<generated> Name for the VPC
10+
[project-id] Project ID to use. If none is passed the default project ID will be used
11+
[tags.{index}] Tags for the VPC
12+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
13+
14+
FLAGS:
15+
-h, --help help for create
16+
17+
GLOBAL FLAGS:
18+
-c, --config string The path to the config file
19+
-D, --debug Enable debug mode
20+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
21+
-p, --profile string The config profile to use
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Delete a VPC specified by its VPC ID.
4+
5+
USAGE:
6+
scw vpc vpc delete <vpc-id ...> [arg=value ...]
7+
8+
ARGS:
9+
vpc-id VPC ID
10+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
11+
12+
FLAGS:
13+
-h, --help help for delete
14+
15+
GLOBAL FLAGS:
16+
-c, --config string The path to the config file
17+
-D, --debug Enable debug mode
18+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
19+
-p, --profile string The config profile to use

0 commit comments

Comments
 (0)