fix(iam): add getters to iam service

This commit is contained in:
pedrooot
2024-09-11 14:15:14 +02:00
parent 0d208515fd
commit 184d28ca7b

View File

@@ -29,7 +29,7 @@ class IAM(GCPService):
while request is not None:
response = request.execute()
for account in response["accounts"]:
for account in response.get("accounts", []):
self.service_accounts.append(
ServiceAccount(
name=account["name"],
@@ -65,7 +65,7 @@ class IAM(GCPService):
)
response = request.execute()
for key in response["keys"]:
for key in response.get("keys", []):
sa.keys.append(
Key(
name=key["name"].split("/")[-1],