Skip to content

Commit ceaed55

Browse files
feat(ipam): add new ip source (#4767)
Co-authored-by: Mia-Cross <[email protected]>
1 parent 2f937c8 commit ceaed55

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

cmd/scw/testdata/test-all-usage-ipam-ip-create-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ ARGS:
1010
[source.zonal] Zone the IP lives in if the IP is a public zoned IP.
1111
[source.private-network-id] Private Network the IP lives in if the IP is a private IP.
1212
[source.subnet-id] Private Network subnet the IP lives in if the IP is a private IP in a Private Network.
13+
[source.vpc-id]
1314
[is-ipv6] Request an IPv6 instead of an IPv4
1415
[address] Request this specific IP address in the specified source pool
1516
[tags.{index}] Tags for the IP

cmd/scw/testdata/test-all-usage-ipam-ip-list-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ ARGS:
2222
[tags.{index}] Tags to filter for, only IPs with one or more matching tags will be returned
2323
[is-ipv6] Defines whether to filter only for IPv4s or IPv6s
2424
[ip-ids.{index}] IP IDs to filter for. Only IPs with these UUIDs will be returned
25+
[source-vpc-id]
2526
[organization-id] Organization ID to filter for. Only IPs belonging to this Organization will be returned
2627
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all)
2728

docs/commands/ipam.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ scw ipam ip create [arg=value ...]
3636
| source.zonal | | Zone the IP lives in if the IP is a public zoned IP. |
3737
| source.private-network-id | | Private Network the IP lives in if the IP is a private IP. |
3838
| source.subnet-id | | Private Network subnet the IP lives in if the IP is a private IP in a Private Network. |
39+
| source.vpc-id | | |
3940
| is-ipv6 | | Request an IPv6 instead of an IPv4 |
4041
| address | | Request this specific IP address in the specified source pool |
4142
| tags.{index} | | Tags for the IP |
@@ -116,6 +117,7 @@ scw ipam ip list [arg=value ...]
116117
| tags.{index} | | Tags to filter for, only IPs with one or more matching tags will be returned |
117118
| is-ipv6 | | Defines whether to filter only for IPv4s or IPv6s |
118119
| ip-ids.{index} | | IP IDs to filter for. Only IPs with these UUIDs will be returned |
120+
| source-vpc-id | | |
119121
| organization-id | | Organization ID to filter for. Only IPs belonging to this Organization will be returned |
120122
| 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 |
121123

internal/namespaces/ipam/v1/ipam_cli.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ func ipamIPCreate() *core.Command {
8989
Deprecated: false,
9090
Positional: false,
9191
},
92+
{
93+
Name: "source.vpc-id",
94+
Required: false,
95+
Deprecated: false,
96+
Positional: false,
97+
},
9298
{
9399
Name: "is-ipv6",
94100
Short: `Request an IPv6 instead of an IPv4`,
@@ -491,6 +497,12 @@ func ipamIPList() *core.Command {
491497
Deprecated: false,
492498
Positional: false,
493499
},
500+
{
501+
Name: "source-vpc-id",
502+
Required: false,
503+
Deprecated: false,
504+
Positional: false,
505+
},
494506
{
495507
Name: "organization-id",
496508
Short: `Organization ID to filter for. Only IPs belonging to this Organization will be returned`,

0 commit comments

Comments
 (0)