Merge branch 'main' into feat/add_google_compute_health_check
commit
a2491a07ac
|
@ -46,7 +46,7 @@ func (e *GoogleComputeInstanceGroupEnumerator) Enumerate() ([]*resource.Resource
|
|||
string(e.SupportedType()),
|
||||
trimResourceName(res.GetName()),
|
||||
map[string]interface{}{
|
||||
"display_name": res.GetDisplayName(),
|
||||
"name": res.GetDisplayName(),
|
||||
"project": project,
|
||||
"location": res.GetLocation(),
|
||||
},
|
||||
|
|
|
@ -38,7 +38,7 @@ func (e *GoogleComputeSubnetworkEnumerator) Enumerate() ([]*resource.Resource, e
|
|||
string(e.SupportedType()),
|
||||
trimResourceName(res.GetName()),
|
||||
map[string]interface{}{
|
||||
"display_name": res.GetDisplayName(),
|
||||
"name": res.GetDisplayName(),
|
||||
"location": res.GetLocation(),
|
||||
},
|
||||
),
|
||||
|
|
|
@ -10,14 +10,14 @@ func initGoogleComputeInstanceGroupMetadata(resourceSchemaRepository resource.Sc
|
|||
})
|
||||
resourceSchemaRepository.SetResolveReadAttributesFunc(GoogleComputeInstanceGroupResourceType, func(res *resource.Resource) map[string]string {
|
||||
return map[string]string{
|
||||
"name": *res.Attributes().GetString("display_name"),
|
||||
"name": *res.Attributes().GetString("name"),
|
||||
"project": *res.Attributes().GetString("project"),
|
||||
"zone": *res.Attributes().GetString("location"),
|
||||
}
|
||||
})
|
||||
resourceSchemaRepository.SetHumanReadableAttributesFunc(GoogleComputeInstanceGroupResourceType, func(res *resource.Resource) map[string]string {
|
||||
attrs := make(map[string]string)
|
||||
if v := res.Attributes().GetString("display_name"); v != nil && *v != "" {
|
||||
if v := res.Attributes().GetString("name"); v != nil && *v != "" {
|
||||
attrs["Name"] = *v
|
||||
}
|
||||
return attrs
|
||||
|
|
|
@ -7,7 +7,7 @@ const GoogleComputeSubnetworkResourceType = "google_compute_subnetwork"
|
|||
func initGoogleComputeSubnetworkMetadata(resourceSchemaRepository resource.SchemaRepositoryInterface) {
|
||||
resourceSchemaRepository.SetResolveReadAttributesFunc(GoogleComputeSubnetworkResourceType, func(res *resource.Resource) map[string]string {
|
||||
return map[string]string{
|
||||
"name": *res.Attributes().GetString("display_name"),
|
||||
"name": *res.Attributes().GetString("name"),
|
||||
"region": *res.Attributes().GetString("location"),
|
||||
}
|
||||
})
|
||||
|
@ -18,7 +18,7 @@ func initGoogleComputeSubnetworkMetadata(resourceSchemaRepository resource.Schem
|
|||
resourceSchemaRepository.SetHumanReadableAttributesFunc(GoogleComputeSubnetworkResourceType, func(res *resource.Resource) map[string]string {
|
||||
attrs := make(map[string]string)
|
||||
|
||||
if v := res.Attributes().GetString("display_name"); v != nil && *v != "" {
|
||||
if v := res.Attributes().GetString("name"); v != nil && *v != "" {
|
||||
attrs["Name"] = *v
|
||||
}
|
||||
return attrs
|
||||
|
|
Loading…
Reference in New Issue