diff --git a/pkg/driftctl.go b/pkg/driftctl.go index b8203a42..0bc1d7d0 100644 --- a/pkg/driftctl.go +++ b/pkg/driftctl.go @@ -89,17 +89,17 @@ func (d DriftCTL) Stop() { } func (d DriftCTL) scan() (remoteResources []resource.Resource, resourcesFromState []resource.Resource, err error) { - logrus.Info("Start scanning cloud provider") - remoteResources, err = d.remoteSupplier.Resources() - if err != nil { - return nil, nil, err - } - logrus.Info("Start reading terraform state") resourcesFromState, err = d.iacSupplier.Resources() if err != nil { return nil, nil, err } + logrus.Info("Start scanning cloud provider") + remoteResources, err = d.remoteSupplier.Resources() + if err != nil { + return nil, nil, err + } + return remoteResources, resourcesFromState, err }