From 7590058e954ff9849e6057c1274458f6832051a7 Mon Sep 17 00:00:00 2001 From: kkr16 Date: Sun, 28 Feb 2021 22:23:44 -0500 Subject: [PATCH] Fetch projects in folder based on projectID instead of name --- plugins/inventory/gcp_compute.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/inventory/gcp_compute.py b/plugins/inventory/gcp_compute.py index 65532ad..98fa28f 100644 --- a/plugins/inventory/gcp_compute.py +++ b/plugins/inventory/gcp_compute.py @@ -518,7 +518,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable): if 'projects' in projects_response: for item in projects_response.get('projects'): - projects.append(item['name']) + projects.append(item['projectId']) return projects def parse(self, inventory, loader, path, cache=True):