Merge pull request #92 from cloudskiff/scan_iac_before_remote
Start by reading IaC before enumerate cloud resourcesmain
commit
8728c40b2c
|
@ -89,17 +89,17 @@ func (d DriftCTL) Stop() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d DriftCTL) scan() (remoteResources []resource.Resource, resourcesFromState []resource.Resource, err error) {
|
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")
|
logrus.Info("Start reading terraform state")
|
||||||
resourcesFromState, err = d.iacSupplier.Resources()
|
resourcesFromState, err = d.iacSupplier.Resources()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, err
|
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
|
return remoteResources, resourcesFromState, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue