Merge pull request #92 from cloudskiff/scan_iac_before_remote

Start by reading IaC before enumerate cloud resources
main
Elie 2021-01-08 15:31:51 +01:00 committed by GitHub
commit 8728c40b2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -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
}