Commit e1bac20
🐛 skip disabled AlloyDB API during GCP discovery (#7343)
cnspec scan gcp aborted with PermissionDenied when the AlloyDB API
was not enabled in the project, because alloydb.clusters / instances /
backups bubbled the raw gRPC error and discovery.go stops the scan on
any discovery target error. AlloyDB was the one service in the Auto
discovery set missing the skippable-error pattern that backupdr, batch,
cloudbuild, dlp, eventarc, gke_backup and others already use.
Guard each ListX iterator with isGRPCSkippable so disabled APIs,
missing permissions, or NotFound locations degrade gracefully with
a warning instead of failing the whole scan.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 7ebea62 commit e1bac20
1 file changed
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
85 | 90 | | |
86 | 91 | | |
87 | 92 | | |
| |||
297 | 302 | | |
298 | 303 | | |
299 | 304 | | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
300 | 309 | | |
301 | 310 | | |
302 | 311 | | |
| |||
437 | 446 | | |
438 | 447 | | |
439 | 448 | | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
440 | 453 | | |
441 | 454 | | |
442 | 455 | | |
| |||
0 commit comments