refactor: google_compute_network enumerator

use trimResourceName common function to format the resource's id
main
sundowndev 2021-09-27 14:43:33 +02:00
parent 8cd318ea68
commit 0b984499c2
1 changed files with 1 additions and 3 deletions

View File

@ -1,8 +1,6 @@
package google
import (
"strings"
remoteerror "github.com/cloudskiff/driftctl/pkg/remote/error"
"github.com/cloudskiff/driftctl/pkg/remote/google/repository"
"github.com/cloudskiff/driftctl/pkg/resource"
@ -38,7 +36,7 @@ func (e *GoogleComputeNetworkEnumerator) Enumerate() ([]*resource.Resource, erro
results,
e.factory.CreateAbstractResource(
string(e.SupportedType()),
strings.Replace(res.Name, "//compute.googleapis.com/", "", 1),
trimResourceName(res.GetName()),
map[string]interface{}{
"display_name": res.DisplayName,
},