Skip to content

Commit

Permalink
move error block up
Browse files Browse the repository at this point in the history
  • Loading branch information
artslidd committed Nov 13, 2024
1 parent 0a2eaa2 commit 86b2258
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -369,10 +369,10 @@ func testAccCheckDatadogSensitiveDataScannerRuleDestroy(accProvider func() (*sch
for _, resource := range s.RootModule().Resources {
if resource.Type == "datadog_sensitive_data_scanner_rule" {
resp, _, err := apiInstances.GetSensitiveDataScannerApiV2().ListScanningGroups(auth)
if err != nil {
return fmt.Errorf("received an error retrieving all scanning groups: %s", err)
}
if ruleFound := findSensitiveDataScannerRuleHelper(resource.Primary.ID, resp); ruleFound == nil {
if err != nil {
return fmt.Errorf("received an error retrieving all scanning groups: %s", err)
}
return nil
}
return fmt.Errorf("scanning rule still exists")
Expand Down

0 comments on commit 86b2258

Please sign in to comment.