Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add enabled property for gcp.project.dataproc. Only query clusters if… (
#940) … service's enabled (#939) Fixes #938, the `DataProc Cloud` service can also be disabled for a project, which means we cannot fetch clusters from it. To fix this, I am adding an `enabled` field to the service and skipping clusters retrieval if the service is disabled: On a GCP with DataProc disabled ``` cnquery> gcp.project.dataproc.enabled [failed] gcp.project.dataproc.enabled expected: == true actual: false cnquery> gcp.project.dataproc.clusters ! DataProc Cloud API is not enabled, not querying clusters gcp.project.dataproc.clusters: [] ``` On a GCP with DataProc enabled ``` cnquery> gcp.project.dataproc.enabled [ok] value: true cnquery> gcp.project.dataproc.clusters gcp.project.dataproc.clusters: [] ``` We should probably do this for all GCP services since most of them can be disabled - [x] Test with a `cnspec scan`
- Loading branch information