Closed dcopestake closed 4 years ago
Hello,
you should be able to specify a description for the Ipv4Ranges
, Ipv6Ranges
, PrefixListIds
and UserIdGroupPairs
.
Updating Example 1
from the docs:
PS C:\> $ip1 = @{ IpProtocol="tcp"; FromPort="22"; ToPort="22"; Ipv4Ranges=[Amazon.EC2.Model.IpRange]@{CidrIp="203.0.113.25/32"; Description='foo'} }
PS C:\> $ip2 = @{ IpProtocol="tcp"; FromPort="3389"; ToPort="3389"; Ipv4Ranges=[Amazon.EC2.Model.IpRange]@{CidrIp="203.0.113.25/32"; Description='bar'} }
PS C:\> Grant-EC2SecurityGroupIngress -GroupId sg-12345678 -IpPermission @( $ip1, $ip2 )
Ah okay, thanks @matteo-prosperi, I was expecting the description to be at the root but didn't think to look further down.
The ability to add descriptions to security group ingress/egress rules was added quite a while ago, and seems to be possible using the AWS CLI, but still doesn't seem possible via the PowerShell cmdlets as far as I can see?
Expected Behavior
I should be able to specify a
Description
property onAmazon.EC2.Model.IpPermission
when using bothGrant-EC2SecurityGroupIngress
andGrant-EC2SecurityGroupEgress
.Current Behavior
It does not currently seem possible to specify a description when granting a rule.