driftctl/pkg/resource/azurerm/azurerm_virtual_network.go

19 lines
528 B
Go
Raw Normal View History

2021-09-29 12:44:59 +00:00
package azurerm
import (
2021-12-06 13:29:39 +00:00
"github.com/snyk/driftctl/pkg/resource"
)
2021-09-29 12:44:59 +00:00
const AzureVirtualNetworkResourceType = "azurerm_virtual_network"
func initAzureVirtualNetworkMetaData(resourceSchemaRepository resource.SchemaRepositoryInterface) {
resourceSchemaRepository.SetHumanReadableAttributesFunc(AzureVirtualNetworkResourceType, func(res *resource.Resource) map[string]string {
attrs := make(map[string]string)
if v := res.Attributes().GetString("name"); v != nil && *v != "" {
attrs["Name"] = *v
}
return attrs
})
}