Skip to content

Commit

Permalink
Merge pull request #4050 from hashicorp/b-aws-sg-rule-recreate
Browse files Browse the repository at this point in the history
providers/aws: Fix issue recreating security group rule if it has bee…
  • Loading branch information
catsby committed Nov 24, 2015
2 parents 0ed3bda + e9cb722 commit a1f4b44
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions builtin/providers/aws/resource_aws_security_group_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,10 @@ func resourceAwsSecurityGroupRuleRead(d *schema.ResourceData, meta interface{})
p := expandIPPerm(d, sg)

if len(rules) == 0 {
return fmt.Errorf(
"[WARN] No %s rules were found for Security Group (%s) looking for Security Group Rule (%s)",
log.Printf("[WARN] No %s rules were found for Security Group (%s) looking for Security Group Rule (%s)",
ruleType, *sg.GroupName, d.Id())
d.SetId("")
return nil
}

for _, r := range rules {
Expand Down

0 comments on commit a1f4b44

Please sign in to comment.