2021-02-09 13:56:11 +00:00
|
|
|
package aws
|
|
|
|
|
2021-03-15 17:30:18 +00:00
|
|
|
import (
|
|
|
|
"github.com/cloudskiff/driftctl/pkg/output"
|
|
|
|
"github.com/cloudskiff/driftctl/pkg/terraform"
|
|
|
|
)
|
2021-02-09 13:56:11 +00:00
|
|
|
|
|
|
|
func InitTestAwsProvider(providerLibrary *terraform.ProviderLibrary) (*AWSTerraformProvider, error) {
|
2021-03-18 10:20:14 +00:00
|
|
|
progress := &output.MockProgress{}
|
|
|
|
progress.On("Inc").Maybe().Return()
|
|
|
|
provider, err := NewAWSTerraformProvider(progress)
|
2021-02-09 13:56:11 +00:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
err = provider.Init()
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
providerLibrary.AddProvider(terraform.AWS, provider)
|
|
|
|
return provider, nil
|
|
|
|
}
|