Skip to content

Security Group Rules created trough "Grant-EC2SecurityGroupIngress" Not Unique  #238

@manuelh2410

Description

@manuelh2410

Description

Security Group Rules created trough "Grant-EC2SecurityGroupIngress" Not Unique
none of the security group rule ids for the rules I created with this cmdlet are unique .
According to the AWS Console the security group rule ID for the following request should be "sg-0e16d7026f5276778"

Reproduction Steps

$MYIP = "1.1.1.1/32"
$RDP = "sg-0e16d7026f5276778"

$ip2 = @{ IpProtocol="tcp"; FromPort="3389"; ToPort="3389"; IpRanges="$MYIP"}

$Tag = New-Object Amazon.EC2.Model.Tag
$Tag.Key = "AWSIP"
$Tag.Value = "AWSIP"

Grant-EC2SecurityGroupIngress -GroupId $RDP -IpPermission @($Ip2)

Return SecurityGroupRules


True {sg-0e16d7026f5276778}

The command seems to be returning a bogus security group id .
instead of SecurityGroupRuleId : sgr-0c9cea02e3fad8698

I instructed it to create a rule , so I expect an sgr-xxxxx id in return .
poor API design .

Environment

Resolution

none


This is a 🐛 bug-report

Metadata

Metadata

Assignees

No one assigned

    Labels

    guidanceQuestion that needs advice or information.module/powershell-cmdletsresponse-requestedWaiting on additional info and feedback. Will move to "closing-soon" in 7 days.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions