driftctl/pkg/resource/azurerm/azurerm_postgresql_server.go

20 lines
619 B
Go

package azurerm
import (
"github.com/snyk/driftctl/enumeration/resource"
dctlresource "github.com/snyk/driftctl/pkg/resource"
)
const AzurePostgresqlServerResourceType = "azurerm_postgresql_server"
func initAzurePostgresqlServerMetadata(resourceSchemaRepository dctlresource.SchemaRepositoryInterface) {
resourceSchemaRepository.SetHumanReadableAttributesFunc(AzurePostgresqlServerResourceType, func(res *resource.Resource) map[string]string {
val := res.Attrs
attrs := make(map[string]string)
if name := val.GetString("name"); name != nil && *name != "" {
attrs["Name"] = *name
}
return attrs
})
}