diff --git a/resources/waf-rules.go b/resources/waf-rules.go index a4b2b4297..721c2eb49 100644 --- a/resources/waf-rules.go +++ b/resources/waf-rules.go @@ -32,9 +32,12 @@ func ListWAFRules(sess *session.Session) ([]Resource, error) { } for _, rule := range resp.Rules { - ruleResp, _ := svc.GetRule(&waf.GetRuleInput{ + ruleResp, err := svc.GetRule(&waf.GetRuleInput{ RuleId: rule.RuleId, }) + if err != nil { + return nil, err + } resources = append(resources, &WAFRule{ svc: svc, ID: rule.RuleId, diff --git a/resources/wafregional-rules.go b/resources/wafregional-rules.go index 30c771abb..5dd83ff9e 100644 --- a/resources/wafregional-rules.go +++ b/resources/wafregional-rules.go @@ -34,9 +34,12 @@ func ListWAFRegionalRules(sess *session.Session) ([]Resource, error) { } for _, rule := range resp.Rules { - ruleResp, _ := svc.GetRule(&waf.GetRuleInput{ + ruleResp, err := svc.GetRule(&waf.GetRuleInput{ RuleId: rule.RuleId, }) + if err != nil { + return nil, err + } resources = append(resources, &WAFRegionalRule{ svc: svc, ID: rule.RuleId,