Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

Commit

Permalink
fix: Fix NotFound error in aws_shield_* resources (#916)
Browse files Browse the repository at this point in the history
  • Loading branch information
amanenk authored May 17, 2022
1 parent 0f2091e commit fc9cdcc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions resources/services/shield/protection_groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ func fetchShieldProtectionGroups(ctx context.Context, meta schema.ClientMeta, pa
o.Region = c.Region
})
if err != nil {
if c.IsNotFoundError(err) {
return nil
}
return diag.WrapError(err)
}
res <- output.ProtectionGroups
Expand Down
3 changes: 3 additions & 0 deletions resources/services/shield/protections.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ func fetchShieldProtections(ctx context.Context, meta schema.ClientMeta, parent
o.Region = c.Region
})
if err != nil {
if c.IsNotFoundError(err) {
return nil
}
return diag.WrapError(err)
}
res <- output.Protections
Expand Down
3 changes: 3 additions & 0 deletions resources/services/shield/subscriptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ func fetchShieldSubscriptions(ctx context.Context, meta schema.ClientMeta, paren
o.Region = c.Region
})
if err != nil {
if c.IsNotFoundError(err) {
return nil
}
return diag.WrapError(err)
}
res <- output.Subscription
Expand Down

0 comments on commit fc9cdcc

Please sign in to comment.