Skip to content

Commit

Permalink
Merge pull request hashicorp#880 from missingcharacter/patch-1
Browse files Browse the repository at this point in the history
Adding second scenario where IPv6 is not supported
  • Loading branch information
Ninir authored Sep 8, 2017
2 parents d3d3119 + 3a6851f commit 689c41a
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit 689c41a

Please sign in to comment.