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()),
|
string(e.SupportedType()),
|
||||||
trimResourceName(res.GetName()),
|
trimResourceName(res.GetName()),
|
||||||
map[string]interface{}{
|
map[string]interface{}{
|
||||||
"name": res.GetDisplayName(),
|
"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 {
|
resourceSchemaRepository.SetResolveReadAttributesFunc(GoogleComputeSubnetworkResourceType, func(res *resource.Resource) map[string]string {
|
||||||
return map[string]string{
|
return map[string]string{
|
||||||
"name": *res.Attributes().GetString("name"),
|
"name": *res.Attributes().GetString("name"),
|
||||||
"region": *res.Attributes().GetString("location"),
|
"region": *res.Attributes().GetString("region"),
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
resourceSchemaRepository.SetNormalizeFunc(GoogleComputeSubnetworkResourceType, func(res *resource.Resource) {
|
resourceSchemaRepository.SetNormalizeFunc(GoogleComputeSubnetworkResourceType, func(res *resource.Resource) {
|
||||||
|
|
Loading…
Reference in New Issue