Fix crash for google_bigquery_table

main
Elie 2021-10-26 17:44:02 +02:00
parent fa70206080
commit 0394cfeb19
No known key found for this signature in database
GPG Key ID: 399AF69092C727B6
2 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ func (e *GoogleBigqueryTableEnumerator) Enumerate() ([]*resource.Resource, error
string(e.SupportedType()), string(e.SupportedType()),
trimResourceName(res.GetName()), trimResourceName(res.GetName()),
map[string]interface{}{ map[string]interface{}{
"name": res.DisplayName, "friendly_name": res.DisplayName,
}, },
), ),
) )

View File

@ -7,7 +7,7 @@ const GoogleBigqueryTableResourceType = "google_bigquery_table"
func initGoogleBigqueryTableMetadata(resourceSchemaRepository resource.SchemaRepositoryInterface) { func initGoogleBigqueryTableMetadata(resourceSchemaRepository resource.SchemaRepositoryInterface) {
resourceSchemaRepository.SetHumanReadableAttributesFunc(GoogleBigqueryTableResourceType, func(res *resource.Resource) map[string]string { resourceSchemaRepository.SetHumanReadableAttributesFunc(GoogleBigqueryTableResourceType, func(res *resource.Resource) map[string]string {
return map[string]string{ return map[string]string{
"name": *res.Attrs.GetString("name"), "name": *res.Attrs.GetString("friendly_name"),
} }
}) })
} }