From 439397bcf03628a33851220dcd2fc51f341c02a8 Mon Sep 17 00:00:00 2001 From: Victoria Jeffrey Date: Sun, 24 Sep 2023 23:41:34 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20add=20family=20to=20all=20the=20?= =?UTF-8?q?gcp=20platforms?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- providers/gcp/resources/discovery.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/providers/gcp/resources/discovery.go b/providers/gcp/resources/discovery.go index 5c0d8138ee..044a752f77 100644 --- a/providers/gcp/resources/discovery.go +++ b/providers/gcp/resources/discovery.go @@ -75,6 +75,7 @@ func Discover(runtime *plugin.Runtime) (*inventory.Inventory, error) { Title: "GCP Project", Runtime: "gcp", Kind: "gcp-object", + Family: []string{"google"}, }, Labels: map[string]string{}, Connections: []*inventory.Config{conn.Conf.Clone(inventory.WithoutDiscovery())}, @@ -142,6 +143,7 @@ func discoverOrganization(conn *connection.GcpConnection, gcpOrg *mqlGcpOrganiza Title: "GCP Project " + project.Name.Data, Runtime: "gcp", Kind: "gcp-object", + Family: []string{"google"}, }, Labels: map[string]string{}, Connections: []*inventory.Config{projectConf}, // pass-in the parent connection config @@ -192,6 +194,7 @@ func discoverProject(conn *connection.GcpConnection, gcpProject *mqlGcpProject) Title: "GCP Compute Instance", Runtime: "gcp", Kind: "gcp-object", + Family: []string{"google"}, }, Labels: labels, // TODO: the current connection handling does not work well for instances @@ -225,6 +228,7 @@ func discoverProject(conn *connection.GcpConnection, gcpProject *mqlGcpProject) Title: "GCP Compute Image", Runtime: "gcp", Kind: "gcp-object", + Family: []string{"google"}, }, Labels: labels, Connections: []*inventory.Config{conn.Conf.Clone(inventory.WithoutDiscovery())}, // pass-in the parent connection config @@ -252,6 +256,7 @@ func discoverProject(conn *connection.GcpConnection, gcpProject *mqlGcpProject) Title: "GCP Compute Network", Runtime: "gcp", Kind: "gcp-object", + Family: []string{"google"}, }, Labels: map[string]string{}, Connections: []*inventory.Config{conn.Conf.Clone(inventory.WithoutDiscovery())}, // pass-in the parent connection config @@ -283,6 +288,7 @@ func discoverProject(conn *connection.GcpConnection, gcpProject *mqlGcpProject) Title: "GCP Compute Subnetwork", Runtime: "gcp", Kind: "gcp-object", + Family: []string{"google"}, }, Labels: map[string]string{}, Connections: []*inventory.Config{conn.Conf.Clone(inventory.WithoutDiscovery())}, // pass-in the parent connection config @@ -310,6 +316,7 @@ func discoverProject(conn *connection.GcpConnection, gcpProject *mqlGcpProject) Title: "GCP Compute Firewall", Runtime: "gcp", Kind: "gcp-object", + Family: []string{"google"}, }, Labels: map[string]string{}, Connections: []*inventory.Config{conn.Conf.Clone(inventory.WithoutDiscovery())}, // pass-in the parent connection config @@ -337,6 +344,7 @@ func discoverProject(conn *connection.GcpConnection, gcpProject *mqlGcpProject) Title: "GCP GKE Cluster", Runtime: "gcp", Kind: "gcp-object", + Family: []string{"google"}, }, Labels: map[string]string{}, Connections: []*inventory.Config{conn.Conf.Clone(inventory.WithoutDiscovery())}, // pass-in the parent connection config @@ -364,6 +372,7 @@ func discoverProject(conn *connection.GcpConnection, gcpProject *mqlGcpProject) Title: "GCP Storage Bucket", Runtime: "gcp", Kind: "gcp-object", + Family: []string{"google"}, }, Labels: map[string]string{}, Connections: []*inventory.Config{conn.Conf.Clone(inventory.WithoutDiscovery())}, // pass-in the parent connection config @@ -391,6 +400,7 @@ func discoverProject(conn *connection.GcpConnection, gcpProject *mqlGcpProject) Title: "GCP BigQuery Dataset", Runtime: "gcp", Kind: "gcp-object", + Family: []string{"google"}, }, Labels: map[string]string{}, Connections: []*inventory.Config{conn.Conf.Clone(inventory.WithoutDiscovery())}, // pass-in the parent connection config