Skip to content

Commit

Permalink
providers/aws: Fix issue recreating security group rule if it has bee…
Browse files Browse the repository at this point in the history
…n destroyed
  • Loading branch information
catsby committed Nov 24, 2015
1 parent bd23ab3 commit e9cb722
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 e9cb722

Please sign in to comment.