2022-07-21 08:37:03 +00:00
|
|
|
package google
|
|
|
|
|
2022-07-21 13:08:43 +00:00
|
|
|
import (
|
|
|
|
"github.com/snyk/driftctl/enumeration/resource"
|
|
|
|
dctlresource "github.com/snyk/driftctl/pkg/resource"
|
|
|
|
)
|
2022-07-21 08:37:03 +00:00
|
|
|
|
|
|
|
const GoogleComputeDiskResourceType = "google_compute_disk"
|
|
|
|
|
2022-07-21 13:08:43 +00:00
|
|
|
func initGoogleComputeDiskMetadata(resourceSchemaRepository dctlresource.SchemaRepositoryInterface) {
|
2022-07-21 08:37:03 +00:00
|
|
|
resourceSchemaRepository.SetHumanReadableAttributesFunc(GoogleComputeDiskResourceType, func(res *resource.Resource) map[string]string {
|
|
|
|
return map[string]string{
|
|
|
|
"Name": *res.Attributes().GetString("name"),
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|