-
Notifications
You must be signed in to change notification settings - Fork 93
Description
Describe the bug
Cmdlet: Get-EC2Subnet
Parameter: -Filter
When the Name property of the -Filter parameter is 'subnet-id', the filtering behaviour does not honour wildcards like '*' and '?'.
For example:
Get-EC2Subnet -Filter @{Name = 'subnet-id'; Values = '*'}
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
I expect the command in the example to return all Subnets.
Current Behavior
Nothing is returned.
Reproduction Steps
Get-EC2Subnet -Filter @{Name = 'subnet-id'; Values = '*'}
Possible Solution
No response
Additional Information/Context
This command will return all VPC.
Get-EC2Vpc -Filter @{Name = 'vpc-id'; Values = '*'}
This command will return all Internet Gateways.
Get-EC2InternetGateway -Filter @{Name = 'internet-gateway-id'; Values = '*'}
But - this command returns nothing.
Get-EC2Subnet -Filter @{Name = 'subnet-id'; Values = '*'}
AWS Tools for PowerShell version used
Name Version
AWS.Tools.EC2 5.0.45
PowerShell version used
Name Value
PSVersion 7.5.3
PSEdition Core
GitCommitId 7.5.3
OS Darwin 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:28:17 PDT 2025; root:xnu-11417.140.69~1/RELEASE_X86_64
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Operating System and version
macOS Sequoia v15.6.1