Skip to content

Commit

Permalink
hashicorp#19837 check return value for diff
Browse files Browse the repository at this point in the history
  • Loading branch information
nick committed Aug 8, 2022
1 parent 57625c1 commit 652cb23
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions internal/service/macie2/classification_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -551,12 +551,18 @@ func resourceClassificationJobCustomizeDiff(_ context.Context, diff *schema.Reso
if diff.Id() != "" {
for _, key := range diff.GetChangedKeysPrefix("s3_job_definition.0.scoping.0.excludes") {
if strings.Contains(key, "tag_scope_term") && strings.Contains(key, "target") {
diff.Clear(key)
err := diff.Clear(key)
if err != nil {
return err
}
}
}
for _, key := range diff.GetChangedKeysPrefix("s3_job_definition.0.scoping.0.includes") {
if strings.Contains(key, "tag_scope_term") && strings.Contains(key, "target") {
diff.Clear(key)
err := diff.Clear(key)
if err != nil {
return err
}
}
}
}
Expand Down

0 comments on commit 652cb23

Please sign in to comment.