From 0394cfeb19756ef404db61c554a1fe8438324774 Mon Sep 17 00:00:00 2001 From: Elie Date: Tue, 26 Oct 2021 17:44:02 +0200 Subject: [PATCH] Fix crash for google_bigquery_table --- pkg/remote/google/google_bigquery_table_enumerator.go | 2 +- pkg/resource/google/google_bigquery_table.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/remote/google/google_bigquery_table_enumerator.go b/pkg/remote/google/google_bigquery_table_enumerator.go index f5893202..6bc887a0 100644 --- a/pkg/remote/google/google_bigquery_table_enumerator.go +++ b/pkg/remote/google/google_bigquery_table_enumerator.go @@ -39,7 +39,7 @@ func (e *GoogleBigqueryTableEnumerator) Enumerate() ([]*resource.Resource, error string(e.SupportedType()), trimResourceName(res.GetName()), map[string]interface{}{ - "name": res.DisplayName, + "friendly_name": res.DisplayName, }, ), ) diff --git a/pkg/resource/google/google_bigquery_table.go b/pkg/resource/google/google_bigquery_table.go index 92c2e5e9..03eaa3e5 100644 --- a/pkg/resource/google/google_bigquery_table.go +++ b/pkg/resource/google/google_bigquery_table.go @@ -7,7 +7,7 @@ const GoogleBigqueryTableResourceType = "google_bigquery_table" func initGoogleBigqueryTableMetadata(resourceSchemaRepository resource.SchemaRepositoryInterface) { resourceSchemaRepository.SetHumanReadableAttributesFunc(GoogleBigqueryTableResourceType, func(res *resource.Resource) map[string]string { return map[string]string{ - "name": *res.Attrs.GetString("name"), + "name": *res.Attrs.GetString("friendly_name"), } }) }