Merge pull request #4050 from hashicorp/b-aws-sg-rule-recreate
providers/aws: Fix issue recreating security group rule if it has bee…
This commit is contained in:
commit
a1f4b446e8
|
@ -174,9 +174,10 @@ func resourceAwsSecurityGroupRuleRead(d *schema.ResourceData, meta interface{})
|
||||||
p := expandIPPerm(d, sg)
|
p := expandIPPerm(d, sg)
|
||||||
|
|
||||||
if len(rules) == 0 {
|
if len(rules) == 0 {
|
||||||
return fmt.Errorf(
|
log.Printf("[WARN] No %s rules were found for Security Group (%s) looking for Security Group Rule (%s)",
|
||||||
"[WARN] No %s rules were found for Security Group (%s) looking for Security Group Rule (%s)",
|
|
||||||
ruleType, *sg.GroupName, d.Id())
|
ruleType, *sg.GroupName, d.Id())
|
||||||
|
d.SetId("")
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, r := range rules {
|
for _, r := range rules {
|
||||||
|
|
Loading…
Reference in New Issue