Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AuthorizeSecurityGroupIngress fails when FromPort is 0 #1203

Closed
3 tasks done
mattarmstrong opened this issue Apr 1, 2021 · 3 comments
Closed
3 tasks done

AuthorizeSecurityGroupIngress fails when FromPort is 0 #1203

mattarmstrong opened this issue Apr 1, 2021 · 3 comments
Labels
bug This issue is a bug.

Comments

@mattarmstrong
Copy link

mattarmstrong commented Apr 1, 2021

Confirm by changing [ ] to [x] below to ensure that it's a bug:

Describe the bug
Receive an invalidParameterValue error when using FromPort: 0 inside IpPermission when calling AuthorizeSecurityGroupIngress:

operation error EC2: AuthorizeSecurityGroupIngress, https response error StatusCode: 400, RequestID: XXX-XXX-XXX-XXX-XXX, api error InvalidParameterValue: Invalid value 'Must specify both from and to ports with TCP/UDP.' for portRange.

Version of AWS SDK for Go?
github.com/aws/aws-sdk-go-v2 v1.3.0

Version of Go (go version)?
go version go1.16.2 darwin/amd64

To Reproduce (observed behavior)

_, err := client.AuthorizeSecurityGroupIngress(context.TODO(),
	&ec2.AuthorizeSecurityGroupIngressInput{
		GroupId:       aws.String("sg-xxx"),
		IpPermissions: []types.IpPermission{
			types.IpPermission{
				FromPort:   0,
				ToPort:     65535,
				IpProtocol: aws.String("tcp"),
				IpRanges: []types.IpRange{
					types.IpRange{
						CidrIp:      aws.String("0.0.0.0/0"),
						Description: aws.String(""),
					},
				},
			},
		},
	},
)

Expected behavior
Expected for operation to be successful

@lnalex
Copy link

lnalex commented Apr 11, 2021

FYI probably fixed by #1195

@skmcgrail
Copy link
Member

As indicated this issue was resolved in #1195, apologies for not updating this ticket sooner.

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug.
Projects
None yet
Development

No branches or pull requests

3 participants