2020-12-09 15:31:34 +00:00
|
|
|
package aws
|
|
|
|
|
|
|
|
import (
|
2022-06-28 07:23:29 +00:00
|
|
|
"github.com/snyk/driftctl/enumeration"
|
|
|
|
"github.com/snyk/driftctl/enumeration/alerter"
|
|
|
|
"github.com/snyk/driftctl/enumeration/remote/aws/client"
|
2022-07-06 08:39:33 +00:00
|
|
|
"github.com/snyk/driftctl/enumeration/remote/aws/repository"
|
2022-06-28 07:23:29 +00:00
|
|
|
"github.com/snyk/driftctl/enumeration/remote/cache"
|
2022-07-06 08:44:42 +00:00
|
|
|
"github.com/snyk/driftctl/enumeration/remote/common"
|
2022-06-28 07:23:29 +00:00
|
|
|
"github.com/snyk/driftctl/enumeration/resource"
|
|
|
|
"github.com/snyk/driftctl/enumeration/resource/aws"
|
|
|
|
"github.com/snyk/driftctl/enumeration/terraform"
|
2020-12-09 15:31:34 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialize remote (configure credentials, launch tf providers and start gRPC clients)
|
|
|
|
* Required to use Scanner
|
|
|
|
*/
|
2021-05-21 14:09:45 +00:00
|
|
|
|
2021-06-03 09:43:15 +00:00
|
|
|
func Init(version string, alerter *alerter.Alerter,
|
2021-05-21 14:09:45 +00:00
|
|
|
providerLibrary *terraform.ProviderLibrary,
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary *common.RemoteLibrary,
|
2022-06-28 07:23:29 +00:00
|
|
|
progress enumeration.ProgressCounter,
|
2021-05-21 14:09:45 +00:00
|
|
|
resourceSchemaRepository *resource.SchemaRepository,
|
2021-06-12 14:17:23 +00:00
|
|
|
factory resource.ResourceFactory,
|
|
|
|
configDir string) error {
|
|
|
|
|
2021-06-14 16:25:35 +00:00
|
|
|
provider, err := NewAWSTerraformProvider(version, progress, configDir)
|
2021-02-09 13:56:11 +00:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2022-06-03 08:32:54 +00:00
|
|
|
err = provider.CheckCredentialsExist()
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2021-02-09 13:56:11 +00:00
|
|
|
err = provider.Init()
|
2020-12-09 15:31:34 +00:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
2021-05-25 15:08:36 +00:00
|
|
|
repositoryCache := cache.New(100)
|
2021-05-25 14:45:59 +00:00
|
|
|
|
2022-07-06 08:39:33 +00:00
|
|
|
s3Repository := repository.NewS3Repository(client.NewAWSClientFactory(provider.session), repositoryCache)
|
|
|
|
ec2repository := repository.NewEC2Repository(provider.session, repositoryCache)
|
|
|
|
elbv2Repository := repository.NewELBV2Repository(provider.session, repositoryCache)
|
|
|
|
route53repository := repository.NewRoute53Repository(provider.session, repositoryCache)
|
|
|
|
lambdaRepository := repository.NewLambdaRepository(provider.session, repositoryCache)
|
|
|
|
rdsRepository := repository.NewRDSRepository(provider.session, repositoryCache)
|
|
|
|
sqsRepository := repository.NewSQSRepository(provider.session, repositoryCache)
|
|
|
|
snsRepository := repository.NewSNSRepository(provider.session, repositoryCache)
|
|
|
|
cloudfrontRepository := repository.NewCloudfrontRepository(provider.session, repositoryCache)
|
|
|
|
dynamoDBRepository := repository.NewDynamoDBRepository(provider.session, repositoryCache)
|
|
|
|
ecrRepository := repository.NewECRRepository(provider.session, repositoryCache)
|
|
|
|
kmsRepository := repository.NewKMSRepository(provider.session, repositoryCache)
|
|
|
|
iamRepository := repository.NewIAMRepository(provider.session, repositoryCache)
|
|
|
|
cloudformationRepository := repository.NewCloudformationRepository(provider.session, repositoryCache)
|
|
|
|
apigatewayRepository := repository.NewApiGatewayRepository(provider.session, repositoryCache)
|
|
|
|
appAutoScalingRepository := repository.NewAppAutoScalingRepository(provider.session, repositoryCache)
|
|
|
|
apigatewayv2Repository := repository.NewApiGatewayV2Repository(provider.session, repositoryCache)
|
|
|
|
autoscalingRepository := repository.NewAutoScalingRepository(provider.session, repositoryCache)
|
|
|
|
elbRepository := repository.NewELBRepository(provider.session, repositoryCache)
|
|
|
|
elasticacheRepository := repository.NewElastiCacheRepository(provider.session, repositoryCache)
|
2021-05-31 15:39:16 +00:00
|
|
|
|
2021-05-21 14:09:45 +00:00
|
|
|
deserializer := resource.NewDeserializer(factory)
|
2021-01-22 17:06:17 +00:00
|
|
|
providerLibrary.AddProvider(terraform.AWS, provider)
|
|
|
|
|
2021-08-03 10:34:36 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewS3BucketEnumerator(s3Repository, factory, provider.Config, alerter))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsS3BucketResourceType, common.NewGenericDetailsFetcher(aws.AwsS3BucketResourceType, provider, deserializer))
|
2021-08-03 10:34:36 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewS3BucketInventoryEnumerator(s3Repository, factory, provider.Config, alerter))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsS3BucketInventoryResourceType, common.NewGenericDetailsFetcher(aws.AwsS3BucketInventoryResourceType, provider, deserializer))
|
2021-08-03 10:34:36 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewS3BucketNotificationEnumerator(s3Repository, factory, provider.Config, alerter))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsS3BucketNotificationResourceType, common.NewGenericDetailsFetcher(aws.AwsS3BucketNotificationResourceType, provider, deserializer))
|
2021-08-03 10:34:36 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewS3BucketMetricsEnumerator(s3Repository, factory, provider.Config, alerter))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsS3BucketMetricResourceType, common.NewGenericDetailsFetcher(aws.AwsS3BucketMetricResourceType, provider, deserializer))
|
2021-08-03 10:34:36 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewS3BucketPolicyEnumerator(s3Repository, factory, provider.Config, alerter))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsS3BucketPolicyResourceType, common.NewGenericDetailsFetcher(aws.AwsS3BucketPolicyResourceType, provider, deserializer))
|
2021-08-03 10:34:36 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewS3BucketAnalyticEnumerator(s3Repository, factory, provider.Config, alerter))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsS3BucketAnalyticsConfigurationResourceType, common.NewGenericDetailsFetcher(aws.AwsS3BucketAnalyticsConfigurationResourceType, provider, deserializer))
|
2022-03-31 14:09:41 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewS3BucketPublicAccessBlockEnumerator(s3Repository, factory, provider.Config, alerter))
|
2021-06-29 12:29:28 +00:00
|
|
|
|
2021-07-05 08:30:42 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewEC2EbsVolumeEnumerator(ec2repository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsEbsVolumeResourceType, common.NewGenericDetailsFetcher(aws.AwsEbsVolumeResourceType, provider, deserializer))
|
2021-07-05 08:30:42 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewEC2EbsSnapshotEnumerator(ec2repository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsEbsSnapshotResourceType, common.NewGenericDetailsFetcher(aws.AwsEbsSnapshotResourceType, provider, deserializer))
|
2021-07-05 08:30:42 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewEC2EipEnumerator(ec2repository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsEipResourceType, common.NewGenericDetailsFetcher(aws.AwsEipResourceType, provider, deserializer))
|
2021-07-05 08:30:42 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewEC2AmiEnumerator(ec2repository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsAmiResourceType, common.NewGenericDetailsFetcher(aws.AwsAmiResourceType, provider, deserializer))
|
2021-07-05 08:30:42 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewEC2KeyPairEnumerator(ec2repository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsKeyPairResourceType, common.NewGenericDetailsFetcher(aws.AwsKeyPairResourceType, provider, deserializer))
|
2021-07-05 08:30:42 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewEC2EipAssociationEnumerator(ec2repository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsEipAssociationResourceType, common.NewGenericDetailsFetcher(aws.AwsEipAssociationResourceType, provider, deserializer))
|
2021-07-05 08:30:42 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewEC2InstanceEnumerator(ec2repository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsInstanceResourceType, common.NewGenericDetailsFetcher(aws.AwsInstanceResourceType, provider, deserializer))
|
2021-07-01 14:01:46 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewEC2InternetGatewayEnumerator(ec2repository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsInternetGatewayResourceType, common.NewGenericDetailsFetcher(aws.AwsInternetGatewayResourceType, provider, deserializer))
|
2021-07-05 11:15:25 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewVPCEnumerator(ec2repository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsVpcResourceType, common.NewGenericDetailsFetcher(aws.AwsVpcResourceType, provider, deserializer))
|
2021-07-05 11:15:25 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewDefaultVPCEnumerator(ec2repository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsDefaultVpcResourceType, common.NewGenericDetailsFetcher(aws.AwsDefaultVpcResourceType, provider, deserializer))
|
2021-07-15 08:59:09 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewEC2RouteTableEnumerator(ec2repository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsRouteTableResourceType, common.NewGenericDetailsFetcher(aws.AwsRouteTableResourceType, provider, deserializer))
|
2021-07-05 10:31:11 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewEC2DefaultRouteTableEnumerator(ec2repository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsDefaultRouteTableResourceType, common.NewGenericDetailsFetcher(aws.AwsDefaultRouteTableResourceType, provider, deserializer))
|
2021-07-05 11:15:25 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewEC2RouteTableAssociationEnumerator(ec2repository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsRouteTableAssociationResourceType, common.NewGenericDetailsFetcher(aws.AwsRouteTableAssociationResourceType, provider, deserializer))
|
2021-07-02 13:47:42 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewEC2SubnetEnumerator(ec2repository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsSubnetResourceType, common.NewGenericDetailsFetcher(aws.AwsSubnetResourceType, provider, deserializer))
|
2021-07-02 13:47:42 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewEC2DefaultSubnetEnumerator(ec2repository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsDefaultSubnetResourceType, common.NewGenericDetailsFetcher(aws.AwsDefaultSubnetResourceType, provider, deserializer))
|
2021-07-07 14:53:19 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewVPCSecurityGroupEnumerator(ec2repository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsSecurityGroupResourceType, common.NewGenericDetailsFetcher(aws.AwsSecurityGroupResourceType, provider, deserializer))
|
2021-07-07 14:53:19 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewVPCDefaultSecurityGroupEnumerator(ec2repository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsDefaultSecurityGroupResourceType, common.NewGenericDetailsFetcher(aws.AwsDefaultSecurityGroupResourceType, provider, deserializer))
|
2021-07-06 14:24:54 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewEC2NatGatewayEnumerator(ec2repository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsNatGatewayResourceType, common.NewGenericDetailsFetcher(aws.AwsNatGatewayResourceType, provider, deserializer))
|
2021-09-24 14:04:20 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewEC2NetworkACLEnumerator(ec2repository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsNetworkACLResourceType, common.NewGenericDetailsFetcher(aws.AwsNetworkACLResourceType, provider, deserializer))
|
2021-09-24 14:04:20 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewEC2NetworkACLRuleEnumerator(ec2repository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsNetworkACLRuleResourceType, common.NewGenericDetailsFetcher(aws.AwsNetworkACLRuleResourceType, provider, deserializer))
|
2021-09-24 14:04:20 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewEC2DefaultNetworkACLEnumerator(ec2repository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsDefaultNetworkACLResourceType, common.NewGenericDetailsFetcher(aws.AwsDefaultNetworkACLResourceType, provider, deserializer))
|
2021-07-06 09:14:51 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewEC2RouteEnumerator(ec2repository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsRouteResourceType, common.NewGenericDetailsFetcher(aws.AwsRouteResourceType, provider, deserializer))
|
2021-07-15 08:59:09 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewVPCSecurityGroupRuleEnumerator(ec2repository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsSecurityGroupRuleResourceType, common.NewGenericDetailsFetcher(aws.AwsSecurityGroupRuleResourceType, provider, deserializer))
|
2022-03-28 13:07:02 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewLaunchTemplateEnumerator(ec2repository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsLaunchTemplateResourceType, common.NewGenericDetailsFetcher(aws.AwsLaunchTemplateResourceType, provider, deserializer))
|
2022-03-28 13:07:02 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewEC2EbsEncryptionByDefaultEnumerator(ec2repository, factory))
|
2021-07-01 09:53:26 +00:00
|
|
|
|
2021-07-01 14:45:46 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewKMSKeyEnumerator(kmsRepository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsKmsKeyResourceType, common.NewGenericDetailsFetcher(aws.AwsKmsKeyResourceType, provider, deserializer))
|
2021-07-01 15:03:40 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewKMSAliasEnumerator(kmsRepository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsKmsAliasResourceType, common.NewGenericDetailsFetcher(aws.AwsKmsAliasResourceType, provider, deserializer))
|
2021-07-01 09:53:26 +00:00
|
|
|
|
2021-07-05 10:07:11 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewRoute53HealthCheckEnumerator(route53repository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsRoute53HealthCheckResourceType, common.NewGenericDetailsFetcher(aws.AwsRoute53HealthCheckResourceType, provider, deserializer))
|
2021-07-05 15:27:47 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewRoute53ZoneEnumerator(route53repository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsRoute53ZoneResourceType, common.NewGenericDetailsFetcher(aws.AwsRoute53ZoneResourceType, provider, deserializer))
|
2021-07-06 09:23:52 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewRoute53RecordEnumerator(route53repository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsRoute53RecordResourceType, common.NewGenericDetailsFetcher(aws.AwsRoute53RecordResourceType, provider, deserializer))
|
2021-07-05 10:07:11 +00:00
|
|
|
|
2021-07-07 14:53:19 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewCloudfrontDistributionEnumerator(cloudfrontRepository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsCloudfrontDistributionResourceType, common.NewGenericDetailsFetcher(aws.AwsCloudfrontDistributionResourceType, provider, deserializer))
|
2021-07-05 16:43:11 +00:00
|
|
|
|
2021-07-07 15:08:17 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewRDSDBInstanceEnumerator(rdsRepository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsDbInstanceResourceType, common.NewGenericDetailsFetcher(aws.AwsDbInstanceResourceType, provider, deserializer))
|
2021-07-07 15:22:13 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewRDSDBSubnetGroupEnumerator(rdsRepository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsDbSubnetGroupResourceType, common.NewGenericDetailsFetcher(aws.AwsDbSubnetGroupResourceType, provider, deserializer))
|
2021-07-07 15:08:17 +00:00
|
|
|
|
2021-07-08 14:13:51 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewSQSQueueEnumerator(sqsRepository, factory))
|
2021-07-22 09:35:20 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsSqsQueueResourceType, NewSQSQueueDetailsFetcher(provider, deserializer))
|
2021-07-07 20:42:21 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewSQSQueuePolicyEnumerator(sqsRepository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsSqsQueuePolicyResourceType, common.NewGenericDetailsFetcher(aws.AwsSqsQueuePolicyResourceType, provider, deserializer))
|
2021-07-07 18:38:03 +00:00
|
|
|
|
2021-07-06 09:31:01 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewSNSTopicEnumerator(snsRepository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsSnsTopicResourceType, common.NewGenericDetailsFetcher(aws.AwsSnsTopicResourceType, provider, deserializer))
|
2021-07-06 16:46:38 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewSNSTopicPolicyEnumerator(snsRepository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsSnsTopicPolicyResourceType, common.NewGenericDetailsFetcher(aws.AwsSnsTopicPolicyResourceType, provider, deserializer))
|
2021-07-07 17:23:43 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewSNSTopicSubscriptionEnumerator(snsRepository, factory, alerter))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsSnsTopicSubscriptionResourceType, common.NewGenericDetailsFetcher(aws.AwsSnsTopicSubscriptionResourceType, provider, deserializer))
|
2021-07-06 09:31:01 +00:00
|
|
|
|
2021-07-08 13:59:34 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewDynamoDBTableEnumerator(dynamoDBRepository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsDynamodbTableResourceType, common.NewGenericDetailsFetcher(aws.AwsDynamodbTableResourceType, provider, deserializer))
|
2021-07-08 13:59:34 +00:00
|
|
|
|
2021-07-08 14:05:23 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewIamPolicyEnumerator(iamRepository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsIamPolicyResourceType, common.NewGenericDetailsFetcher(aws.AwsIamPolicyResourceType, provider, deserializer))
|
2021-07-08 14:05:23 +00:00
|
|
|
|
2021-07-08 17:14:23 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewLambdaFunctionEnumerator(lambdaRepository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsLambdaFunctionResourceType, common.NewGenericDetailsFetcher(aws.AwsLambdaFunctionResourceType, provider, deserializer))
|
2021-07-08 17:27:38 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewLambdaEventSourceMappingEnumerator(lambdaRepository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsLambdaEventSourceMappingResourceType, common.NewGenericDetailsFetcher(aws.AwsLambdaEventSourceMappingResourceType, provider, deserializer))
|
2021-07-08 17:14:23 +00:00
|
|
|
|
2021-07-09 10:58:09 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewIamUserEnumerator(iamRepository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsIamUserResourceType, common.NewGenericDetailsFetcher(aws.AwsIamUserResourceType, provider, deserializer))
|
2021-07-09 11:39:50 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewIamUserPolicyEnumerator(iamRepository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsIamUserPolicyResourceType, common.NewGenericDetailsFetcher(aws.AwsIamUserPolicyResourceType, provider, deserializer))
|
2021-07-12 13:43:02 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewIamRoleEnumerator(iamRepository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsIamRoleResourceType, common.NewGenericDetailsFetcher(aws.AwsIamRoleResourceType, provider, deserializer))
|
2021-07-12 14:20:55 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewIamAccessKeyEnumerator(iamRepository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsIamAccessKeyResourceType, common.NewGenericDetailsFetcher(aws.AwsIamAccessKeyResourceType, provider, deserializer))
|
2021-07-13 09:12:59 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewIamRolePolicyAttachmentEnumerator(iamRepository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsIamRolePolicyAttachmentResourceType, common.NewGenericDetailsFetcher(aws.AwsIamRolePolicyAttachmentResourceType, provider, deserializer))
|
2021-07-12 10:26:34 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewIamRolePolicyEnumerator(iamRepository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsIamRolePolicyResourceType, common.NewGenericDetailsFetcher(aws.AwsIamRolePolicyResourceType, provider, deserializer))
|
2021-07-12 10:26:34 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewIamUserPolicyAttachmentEnumerator(iamRepository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsIamUserPolicyAttachmentResourceType, common.NewGenericDetailsFetcher(aws.AwsIamUserPolicyAttachmentResourceType, provider, deserializer))
|
2022-04-01 13:36:02 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewIamGroupPolicyEnumerator(iamRepository, factory))
|
2022-05-11 07:39:03 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewIamGroupEnumerator(iamRepository, factory))
|
2022-05-10 13:46:59 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewIamGroupPolicyAttachmentEnumerator(iamRepository, factory))
|
2021-07-09 10:58:09 +00:00
|
|
|
|
2021-07-06 12:31:45 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewECRRepositoryEnumerator(ecrRepository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsEcrRepositoryResourceType, common.NewGenericDetailsFetcher(aws.AwsEcrRepositoryResourceType, provider, deserializer))
|
2022-05-10 18:30:25 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewECRRepositoryPolicyEnumerator(ecrRepository, factory))
|
2021-07-09 10:58:09 +00:00
|
|
|
|
2021-09-03 13:02:45 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewRDSClusterEnumerator(rdsRepository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsRDSClusterResourceType, common.NewGenericDetailsFetcher(aws.AwsRDSClusterResourceType, provider, deserializer))
|
2021-09-03 13:02:45 +00:00
|
|
|
|
2021-09-08 09:16:44 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewCloudformationStackEnumerator(cloudformationRepository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsCloudformationStackResourceType, common.NewGenericDetailsFetcher(aws.AwsCloudformationStackResourceType, provider, deserializer))
|
2021-09-08 09:16:44 +00:00
|
|
|
|
2021-09-14 14:54:22 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewApiGatewayRestApiEnumerator(apigatewayRepository, factory))
|
2021-09-21 14:25:59 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewApiGatewayAccountEnumerator(apigatewayRepository, factory))
|
2021-09-27 09:35:16 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewApiGatewayApiKeyEnumerator(apigatewayRepository, factory))
|
2021-09-30 13:22:46 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewApiGatewayAuthorizerEnumerator(apigatewayRepository, factory))
|
2021-10-04 15:37:20 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewApiGatewayStageEnumerator(apigatewayRepository, factory))
|
2021-09-20 17:15:39 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewApiGatewayResourceEnumerator(apigatewayRepository, factory))
|
2021-10-06 14:17:56 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewApiGatewayDomainNameEnumerator(apigatewayRepository, factory))
|
2021-10-08 13:31:04 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewApiGatewayVpcLinkEnumerator(apigatewayRepository, factory))
|
2021-10-13 10:49:54 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewApiGatewayRequestValidatorEnumerator(apigatewayRepository, factory))
|
2021-10-15 14:18:06 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewApiGatewayRestApiPolicyEnumerator(apigatewayRepository, factory))
|
2021-10-12 14:42:50 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewApiGatewayBasePathMappingEnumerator(apigatewayRepository, factory))
|
2021-10-18 14:17:46 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewApiGatewayMethodEnumerator(apigatewayRepository, factory))
|
2021-10-20 14:40:37 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewApiGatewayModelEnumerator(apigatewayRepository, factory))
|
2021-10-22 16:17:41 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewApiGatewayMethodResponseEnumerator(apigatewayRepository, factory))
|
2021-10-21 15:58:09 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewApiGatewayGatewayResponseEnumerator(apigatewayRepository, factory))
|
2021-10-26 09:12:04 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewApiGatewayMethodSettingsEnumerator(apigatewayRepository, factory))
|
2021-10-26 13:03:12 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewApiGatewayIntegrationEnumerator(apigatewayRepository, factory))
|
2021-10-28 16:13:49 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewApiGatewayIntegrationResponseEnumerator(apigatewayRepository, factory))
|
2021-09-14 14:54:22 +00:00
|
|
|
|
2021-11-21 13:17:23 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewApiGatewayV2ApiEnumerator(apigatewayv2Repository, factory))
|
2021-11-30 15:23:17 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewApiGatewayV2RouteEnumerator(apigatewayv2Repository, factory))
|
2022-01-12 15:22:15 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewApiGatewayV2DeploymentEnumerator(apigatewayv2Repository, factory))
|
2021-11-17 16:03:37 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewApiGatewayV2VpcLinkEnumerator(apigatewayv2Repository, factory))
|
2021-11-30 11:17:50 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewApiGatewayV2AuthorizerEnumerator(apigatewayv2Repository, factory))
|
2021-12-13 14:34:50 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewApiGatewayV2IntegrationEnumerator(apigatewayv2Repository, factory))
|
2022-01-11 14:44:22 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewApiGatewayV2ModelEnumerator(apigatewayv2Repository, factory))
|
2021-12-08 16:18:26 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewApiGatewayV2StageEnumerator(apigatewayv2Repository, factory))
|
2021-12-13 13:55:10 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewApiGatewayV2RouteResponseEnumerator(apigatewayv2Repository, factory))
|
2022-01-14 14:04:58 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewApiGatewayV2MappingEnumerator(apigatewayv2Repository, apigatewayRepository, factory))
|
2022-01-13 16:07:11 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewApiGatewayV2DomainNameEnumerator(apigatewayRepository, factory))
|
2021-12-13 17:01:17 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewApiGatewayV2IntegrationResponseEnumerator(apigatewayv2Repository, factory))
|
2021-11-21 13:17:23 +00:00
|
|
|
|
2021-09-14 14:48:29 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewAppAutoscalingTargetEnumerator(appAutoScalingRepository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsAppAutoscalingTargetResourceType, common.NewGenericDetailsFetcher(aws.AwsAppAutoscalingTargetResourceType, provider, deserializer))
|
2021-09-14 14:48:29 +00:00
|
|
|
|
2021-09-24 09:03:20 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewAppAutoscalingPolicyEnumerator(appAutoScalingRepository, factory))
|
2022-07-06 08:44:42 +00:00
|
|
|
remoteLibrary.AddDetailsFetcher(aws.AwsAppAutoscalingPolicyResourceType, common.NewGenericDetailsFetcher(aws.AwsAppAutoscalingPolicyResourceType, provider, deserializer))
|
2021-09-24 09:03:20 +00:00
|
|
|
|
2021-09-22 17:47:04 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewAppAutoscalingScheduledActionEnumerator(appAutoScalingRepository, factory))
|
|
|
|
|
2021-11-29 11:04:41 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewLaunchConfigurationEnumerator(autoscalingRepository, factory))
|
2021-12-06 14:57:57 +00:00
|
|
|
|
2022-04-07 07:56:02 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewLoadBalancerEnumerator(elbv2Repository, factory))
|
2022-04-13 10:59:39 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewLoadBalancerListenerEnumerator(elbv2Repository, factory))
|
2022-04-07 07:56:02 +00:00
|
|
|
|
2022-04-07 07:51:32 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewClassicLoadBalancerEnumerator(elbRepository, factory))
|
|
|
|
|
2022-04-07 12:53:28 +00:00
|
|
|
remoteLibrary.AddEnumerator(NewElastiCacheClusterEnumerator(elasticacheRepository, factory))
|
|
|
|
|
2021-09-30 13:32:08 +00:00
|
|
|
err = resourceSchemaRepository.Init(terraform.AWS, provider.Version(), provider.Schema())
|
2021-06-09 15:28:40 +00:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2021-03-26 08:44:55 +00:00
|
|
|
aws.InitResourcesMetadata(resourceSchemaRepository)
|
|
|
|
|
2020-12-09 15:31:34 +00:00
|
|
|
return nil
|
|
|
|
}
|