fix(google): compute_subnetwork
The scan panics because enumerator attributes are not sync with the resource schema.main
parent
eab3c2ce4f
commit
a83ce83f5c
|
@ -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(),
|
||||
},
|
||||
),
|
||||
)
|
||||
|
|
|
@ -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