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

Adding second scenario where IPv6 is not supported #880

Merged
merged 3 commits into from
Sep 8, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions aws/resource_aws_security_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,9 @@ func resourceAwsSecurityGroupCreate(d *schema.ResourceData, meta interface{}) er

_, err = conn.RevokeSecurityGroupEgress(req)
if err != nil {
//If we have a NotFound, then we are trying to remove the default IPv6 egress of a non-IPv6
//If we have a NotFound or InvalidParameterValue, then we are trying to remove the default IPv6 egress of a non-IPv6
//enabled SG
if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() != "InvalidPermission.NotFound" {
if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() != "InvalidPermission.NotFound" && !isAWSErr(err, "InvalidParameterValue", "remote-ipv6-range") {
return fmt.Errorf(
"Error revoking default IPv6 egress rule for Security Group (%s): %s",
d.Id(), err)
Expand Down