Merge pull request #1290 from snyk/fix/google_compute_network

Fix google_compute_network read attributes
main
Elie 2021-12-16 12:22:30 +01:00 committed by GitHub
commit d8681bd1f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ func (e *GoogleComputeNetworkEnumerator) Enumerate() ([]*resource.Resource, erro
string(e.SupportedType()),
trimResourceName(res.GetName()),
map[string]interface{}{
"display_name": res.DisplayName,
"name": res.DisplayName,
},
),
)

View File

@ -13,7 +13,7 @@ func initGoogleComputeNetworkMetadata(resourceSchemaRepository resource.SchemaRe
})
resourceSchemaRepository.SetResolveReadAttributesFunc(GoogleComputeNetworkResourceType, func(res *resource.Resource) map[string]string {
return map[string]string{
"name": *res.Attributes().GetString("display_name"),
"name": *res.Attributes().GetString("name"),
}
})
resourceSchemaRepository.SetFlags(GoogleComputeNetworkResourceType, resource.FlagDeepMode)