fix(google): compute_subnetwork
The scan panics because enumerator attributes are not sync with the resource schema.main
parent
eab3c2ce4f
commit
a83ce83f5c
|
@ -39,7 +39,7 @@ func (e *GoogleComputeSubnetworkEnumerator) Enumerate() ([]*resource.Resource, e
|
|||
trimResourceName(res.GetName()),
|
||||
map[string]interface{}{
|
||||
"name": res.GetDisplayName(),
|
||||
"location": res.GetLocation(),
|
||||
"region": res.GetLocation(),
|
||||
},
|
||||
),
|
||||
)
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue