Summary
The new aio runtime ip-list get command treats the --region flag as case-sensitive. Passing an uppercase (or mixed-case) region value such as AUS fails with an invalid region error, even though the same value in lowercase (aus) works fine. This is surprising because the command's own output prints region names in uppercase (e.g. AUS (3 CIDRs)), so users naturally copy that casing back into the flag.
Steps to reproduce
$ aio runtime ip-list get --region AUS
CLIError: invalid region "AUS". Expected one of: amer, emea, apac, aus
at IpListGet.run (.../@adobe/aio-cli-plugin-runtime/src/commands/runtime/ip-list/get.js:235:12)
$ aio runtime ip-list get --region aus # works
Adobe I/O Runtime egress IPs
...
AUS (3 CIDRs)
13.210.83.241/32
13.238.35.162/32
15.136.156.143/32
Expected behavior
Either:
-
Accept both cases — normalize the flag value (e.g. lowercase it) before validation so AUS, Aus, and aus are all accepted. This is the friendliest option and matches the uppercase casing the command itself prints.
and/or
-
Print a friendlier error — if case-sensitivity is intentional, the error message should hint that regions are lowercase, e.g. invalid region "AUS". Did you mean "aus"? Expected one of: amer, emea, apac, aus.
Root cause
The validation in src/commands/runtime/ip-list/get.js compares the raw flag value against the lowercase VALID_REGIONS array without normalizing case:
const VALID_REGIONS = ['amer', 'emea', 'apac', 'aus']
// ...
if (flags.region && !VALID_REGIONS.includes(flags.region)) {
this.error(`invalid region "${flags.region}". Expected one of: ${VALID_REGIONS.join(', ')}`, { exit: 1 })
}
Suggested fix
Lowercase the flag value before validating and sending it to the service, for example:
const region = flags.region && flags.region.toLowerCase()
if (region && !VALID_REGIONS.includes(region)) {
this.error(`invalid region "${flags.region}". Expected one of: ${VALID_REGIONS.join(', ')}`, { exit: 1 })
}
// ...use `region` for the downstream getIpList() calls
Environment
- Node.js v24.14.1
- Reproduced via
@adobe/aio-cli-plugin-runtime (aio runtime ip-list get)
Summary
The new
aio runtime ip-list getcommand treats the--regionflag as case-sensitive. Passing an uppercase (or mixed-case) region value such asAUSfails with aninvalid regionerror, even though the same value in lowercase (aus) works fine. This is surprising because the command's own output prints region names in uppercase (e.g.AUS (3 CIDRs)), so users naturally copy that casing back into the flag.Steps to reproduce
Expected behavior
Either:
Accept both cases — normalize the flag value (e.g. lowercase it) before validation so
AUS,Aus, andausare all accepted. This is the friendliest option and matches the uppercase casing the command itself prints.and/or
Print a friendlier error — if case-sensitivity is intentional, the error message should hint that regions are lowercase, e.g.
invalid region "AUS". Did you mean "aus"? Expected one of: amer, emea, apac, aus.Root cause
The validation in
src/commands/runtime/ip-list/get.jscompares the raw flag value against the lowercaseVALID_REGIONSarray without normalizing case:Suggested fix
Lowercase the flag value before validating and sending it to the service, for example:
Environment
@adobe/aio-cli-plugin-runtime(aio runtime ip-list get)