fix(gcp): use session credentials to check if API is active (#5935)

This commit is contained in:
Sergio Garcia
2024-11-27 14:00:26 -04:00
committed by GitHub
parent 17a39f3305
commit 4ba1c0259f
+3 -1
View File
@@ -55,7 +55,9 @@ class GCPService:
project_ids = []
for project_id in audited_project_ids:
try:
client = discovery.build("serviceusage", "v1")
client = discovery.build(
"serviceusage", "v1", credentials=self.credentials
)
request = client.services().get(
name=f"projects/{project_id}/services/{self.service}.googleapis.com"
)