providers/aws: Fix issue recreating security group rule if it has been destroyed

This commit is contained in:
clint shryock 2015-11-24 13:50:30 -06:00
parent bd23ab35bf
commit e9cb722471
1 changed files with 3 additions and 2 deletions

View File

@ -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 {