2021-09-29 12:44:59 +00:00
|
|
|
package azurerm
|
|
|
|
|
2021-10-01 14:52:46 +00:00
|
|
|
import (
|
|
|
|
"github.com/cloudskiff/driftctl/pkg/resource"
|
|
|
|
)
|
|
|
|
|
2021-09-29 12:44:59 +00:00
|
|
|
const AzureVirtualNetworkResourceType = "azurerm_virtual_network"
|
2021-10-01 14:52:46 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
})
|
|
|
|
}
|