Merge pull request #1293 from snyk/fix/google_compute_subnetwork

Fix google_compute_subnetwork attributes
main
Elie 2021-12-17 09:39:54 +01:00 committed by GitHub
commit 110a07f122
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -38,8 +38,8 @@ func (e *GoogleComputeSubnetworkEnumerator) Enumerate() ([]*resource.Resource, e
string(e.SupportedType()),
trimResourceName(res.GetName()),
map[string]interface{}{
"name": res.GetDisplayName(),
"location": res.GetLocation(),
"name": res.GetDisplayName(),
"region": res.GetLocation(),
},
),
)

View File

@ -8,7 +8,7 @@ func initGoogleComputeSubnetworkMetadata(resourceSchemaRepository resource.Schem
resourceSchemaRepository.SetResolveReadAttributesFunc(GoogleComputeSubnetworkResourceType, func(res *resource.Resource) map[string]string {
return map[string]string{
"name": *res.Attributes().GetString("name"),
"region": *res.Attributes().GetString("location"),
"region": *res.Attributes().GetString("region"),
}
})
resourceSchemaRepository.SetNormalizeFunc(GoogleComputeSubnetworkResourceType, func(res *resource.Resource) {