From 09952cea9426d8649b82ab46fce1e0413e80c557 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Christoph=20K=C3=BCster?= Date: Sun, 16 Jan 2022 17:31:44 +0100 Subject: [PATCH] Upgrade to awsls v0.11.0 (#127) * Upgrade to awsls v0.11.0 * Adapt integration tests to aws-sdk-go-v2 v1.1.1 * Change test-fixtures to Terraform AWS Provider 3.x * doneDelete channel --- README.md | 81 +++- go.mod | 27 +- go.sum | 370 ++++++++++++++++-- internal/confirm.go | 7 +- internal/confirm_test.go | 7 +- main.go | 82 +++- pkg/resource/filter.go | 6 +- pkg/resource/list.go | 97 +++-- pkg/resource/select.go | 12 +- pkg/resource/select_test.go | 44 +-- signal_unix.go | 11 + signal_windows.go | 10 + test/autoscaling_group_test.go | 6 +- test/cloudtrail_test.go | 10 +- test/cloudwatch_log_group_test.go | 7 +- test/db_instance_test.go | 31 +- test/ebs_snapshot_test.go | 20 +- test/ecs_cluster_test.go | 8 +- test/elb_test.go | 21 +- test/helper_test.go | 15 +- test/iam_policy_test.go | 26 +- test/iam_user_test.go | 27 +- test/lambda_function_test.go | 16 +- test/test-fixtures/autoscaling-group/main.tf | 4 +- test/test-fixtures/cloudtrail/main.tf | 2 +- .../cloudwatch-log-group/main.tf | 4 +- test/test-fixtures/db-instance/main.tf | 6 +- test/test-fixtures/ebs-snapshot/main.tf | 4 +- test/test-fixtures/ecs-cluster/main.tf | 4 +- test/test-fixtures/elb/elb.tf | 4 +- test/test-fixtures/iam-policy/main.tf | 4 +- test/test-fixtures/iam-user/main.tf | 4 +- test/test-fixtures/lambda-function/main.tf | 4 +- test/test-fixtures/vpc/main.tf | 4 +- test/vpc_test.go | 25 +- 35 files changed, 722 insertions(+), 288 deletions(-) create mode 100644 signal_unix.go create mode 100644 signal_windows.go diff --git a/README.md b/README.md index 07bb25b66..6b474aca5 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,9 @@ --- [![Release](https://img.shields.io/github/release/jckuester/awsweeper.svg?style=for-the-badge)](https://github.com/jckuester/awsweeper/releases/latest) [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=for-the-badge)](/LICENSE.md) -[![Travis](https://img.shields.io/travis/jckuester/awsweeper/master.svg?style=for-the-badge)](https://travis-ci.org/jckuester/awsweeper) +[![Travis](https://img.shields.io/travis/jckuester/awsweeper/master.svg?style=for-the-badge)](https://travis-ci.com/jckuester/awsweeper) -AWSweeper is able to clean out [over 200 resource types](#supported-resources) in your AWS account. Resources to be +AWSweeper is able to clean out [over 290 resource types](#supported-resources) in your AWS account. Resources to be deleted can be filtered by their type, ID, tags, or creation date using [regular expressions](https://golang.org/pkg/regexp/syntax/) declared in a YAML file (see [filter.yml](filter.yml) as an example). @@ -172,8 +172,8 @@ Here is a more detailed description of the various ways to filter resources: ## Supported resources -Resource types in the list below are [Terraform Types](https://www.terraform.io/docs/providers/aws/index.html), which -have to be used in the YAML file to filter resources by their type. +The list below shows the 297 supported (Terraform) [resource types](https://www.terraform.io/docs/providers/aws/index.html), +which have to be used in the YAML file to filter resources by their type. | Service / Resource Type | Delete by tag | Delete by creation date | :----------------------------- |:-------------:|:-----------------------: @@ -208,10 +208,10 @@ have to be used in the YAML file to filter resources by their type. | **batch** | | aws_batch_compute_environment | x | | | aws_batch_job_definition | x | | -| aws_batch_job_queue | x | | | **cloudformation** | | aws_cloudformation_stack | x | x | | aws_cloudformation_stack_set | x | | +| aws_cloudformation_type | | | | **cloudhsmv2** | | aws_cloudhsm_v2_cluster | x | | | **cloudtrail** | @@ -219,11 +219,13 @@ have to be used in the YAML file to filter resources by their type. | **cloudwatch** | | aws_cloudwatch_dashboard | | | | **cloudwatchevents** | +| aws_cloudwatch_event_archive | | x | | aws_cloudwatch_event_bus | x | | | **cloudwatchlogs** | | aws_cloudwatch_log_destination | | x | | aws_cloudwatch_log_group | x | x | | aws_cloudwatch_log_resource_policy | | | +| aws_cloudwatch_query_definition | | | | **codeartifact** | | aws_codeartifact_domain | x | x | | aws_codeartifact_repository | x | | @@ -237,16 +239,21 @@ have to be used in the YAML file to filter resources by their type. | aws_codedeploy_deployment_config | | | | **codepipeline** | | aws_codepipeline_webhook | x | | +| **codestarconnections** | +| aws_codestarconnections_connection | x | | +| aws_codestarconnections_host | | | | **codestarnotifications** | | aws_codestarnotifications_notification_rule | x | | | **configservice** | | aws_config_config_rule | x | | +| aws_config_configuration_aggregator | x | x | | aws_config_configuration_recorder | | | +| aws_config_conformance_pack | | | | aws_config_delivery_channel | | | | **costandusagereportservice** | | aws_cur_report_definition | | | | **databasemigrationservice** | -| aws_dms_certificate | | | +| aws_dms_certificate | x | | | aws_dms_endpoint | x | | | aws_dms_replication_subnet_group | x | | | aws_dms_replication_task | x | | @@ -277,9 +284,11 @@ have to be used in the YAML file to filter resources by their type. | aws_ebs_snapshot | x | x | | aws_ebs_volume | x | x | | aws_ec2_capacity_reservation | x | x | +| aws_ec2_carrier_gateway | x | | | aws_ec2_client_vpn_endpoint | x | x | | aws_ec2_fleet | x | x | | aws_ec2_local_gateway_route_table_vpc_association | x | | +| aws_ec2_managed_prefix_list | x | | | aws_ec2_traffic_mirror_filter | x | | | aws_ec2_traffic_mirror_session | x | | | aws_ec2_traffic_mirror_target | x | | @@ -310,6 +319,8 @@ have to be used in the YAML file to filter resources by their type. | aws_vpn_gateway | x | | | **ecr** | | aws_ecr_repository | x | | +| **ecrpublic** | +| aws_ecrpublic_repository | | | | **ecs** | | aws_ecs_cluster | x | | | aws_ecs_task_definition | x | | @@ -319,24 +330,27 @@ have to be used in the YAML file to filter resources by their type. | **eks** | | aws_eks_cluster | x | | | **elasticache** | +| aws_elasticache_global_replication_group | | | | aws_elasticache_replication_group | x | | | **elasticbeanstalk** | | aws_elastic_beanstalk_application | x | | | aws_elastic_beanstalk_application_version | x | | | aws_elastic_beanstalk_environment | x | | -| **elasticloadbalancing** | +| **elastictranscoder** | +| aws_elastictranscoder_pipeline | | | +| aws_elastictranscoder_preset | | | +| **elb** | | aws_elb | x | x | -| **elasticloadbalancingv2** | +| **elbv2** | | aws_alb_target_group | x | | | aws_lb | x | x | | aws_lb_target_group | x | | -| **elastictranscoder** | -| aws_elastictranscoder_pipeline | | | -| aws_elastictranscoder_preset | | | | **emr** | | aws_emr_security_configuration | | | | **firehose** | | aws_kinesis_firehose_delivery_stream | x | | +| **fms** | +| aws_fms_policy | | | | **fsx** | | aws_fsx_lustre_file_system | x | x | | aws_fsx_windows_file_system | x | x | @@ -352,6 +366,8 @@ have to be used in the YAML file to filter resources by their type. | aws_glue_dev_endpoint | x | | | aws_glue_job | x | | | aws_glue_ml_transform | x | | +| aws_glue_registry | x | x | +| aws_glue_schema | x | x | | aws_glue_security_configuration | | | | aws_glue_trigger | x | | | aws_glue_workflow | x | | @@ -361,15 +377,18 @@ have to be used in the YAML file to filter resources by their type. | aws_iam_access_key | | x | | aws_iam_account_alias | | | | aws_iam_group | | x | -| aws_iam_instance_profile | | x | -| aws_iam_policy | | x | +| aws_iam_instance_profile | x | x | +| aws_iam_policy | x | x | | aws_iam_role | x | x | -| aws_iam_server_certificate | | | +| aws_iam_server_certificate | x | | | aws_iam_service_linked_role | | x | | aws_iam_user | x | x | | **imagebuilder** | | aws_imagebuilder_component | x | | | aws_imagebuilder_distribution_configuration | x | | +| aws_imagebuilder_image | x | | +| aws_imagebuilder_image_pipeline | x | | +| aws_imagebuilder_image_recipe | x | | | aws_imagebuilder_infrastructure_configuration | x | | | **iot** | | aws_iot_certificate | | x | @@ -391,6 +410,7 @@ have to be used in the YAML file to filter resources by their type. | aws_kms_external_key | x | | | aws_kms_key | x | | | **lambda** | +| aws_lambda_code_signing_config | | | | aws_lambda_event_source_mapping | | | | aws_lambda_function | x | | | **lexmodelbuildingservice** | @@ -404,6 +424,10 @@ have to be used in the YAML file to filter resources by their type. | aws_lightsail_instance | x | | | aws_lightsail_key_pair | | | | aws_lightsail_static_ip | | | +| **macie2** | +| aws_macie2_classification_job | x | | +| aws_macie2_custom_data_identifier | x | | +| aws_macie2_findings_filter | x | | | **mediaconvert** | | aws_media_convert_queue | x | | | **mediapackage** | @@ -413,8 +437,14 @@ have to be used in the YAML file to filter resources by their type. | **mq** | | aws_mq_broker | x | | | aws_mq_configuration | x | | +| **mwaa** | +| aws_mwaa_environment | x | | | **neptune** | | aws_neptune_event_subscription | x | | +| **networkfirewall** | +| aws_networkfirewall_firewall | x | | +| aws_networkfirewall_firewall_policy | x | | +| aws_networkfirewall_rule_group | x | | | **opsworks** | | aws_opsworks_stack | x | | | aws_opsworks_user_profile | | | @@ -445,20 +475,30 @@ have to be used in the YAML file to filter resources by their type. | aws_route53_zone | x | | | **route53resolver** | | aws_route53_resolver_endpoint | x | x | -| aws_route53_resolver_rule | x | | +| aws_route53_resolver_query_log_config | x | x | +| aws_route53_resolver_query_log_config_association | | x | +| aws_route53_resolver_rule | x | x | | aws_route53_resolver_rule_association | | | | **s3** | | aws_s3_bucket | x | x | +| **s3outposts** | +| aws_s3outposts_endpoint | | x | | **sagemaker** | +| aws_sagemaker_app_image_config | | x | | aws_sagemaker_code_repository | | x | | aws_sagemaker_endpoint | x | x | +| aws_sagemaker_feature_group | x | x | | aws_sagemaker_model | x | x | +| aws_sagemaker_model_package_group | x | x | | **secretsmanager** | | aws_secretsmanager_secret | x | | | **securityhub** | | aws_securityhub_action_target | | | +| aws_securityhub_insight | | | | **servicecatalog** | | aws_servicecatalog_portfolio | x | x | +| aws_servicecatalog_service_action | | | +| aws_servicecatalog_tag_option | | | | **servicediscovery** | | aws_service_discovery_service | x | x | | **ses** | @@ -472,8 +512,9 @@ have to be used in the YAML file to filter resources by their type. | **sfn** | | aws_sfn_activity | x | x | | aws_sfn_state_machine | x | x | -| **simpledb** | -| aws_simpledb_domain | | | +| **signer** | +| aws_signer_signing_job | | | +| aws_signer_signing_profile | x | | | **sns** | | aws_sns_platform_application | | | | aws_sns_topic | x | | @@ -487,10 +528,14 @@ have to be used in the YAML file to filter resources by their type. | aws_ssm_maintenance_window | x | | | aws_ssm_parameter | x | | | aws_ssm_patch_baseline | x | | -| aws_ssm_patch_group | | | | aws_ssm_resource_data_sync | | | | **storagegateway** | | aws_storagegateway_gateway | x | | +| aws_storagegateway_tape_pool | x | | +| **synthetics** | +| aws_synthetics_canary | x | | +| **timestreamwrite** | +| aws_timestreamwrite_database | x | x | | **transfer** | | aws_transfer_server | x | | | **waf** | diff --git a/go.mod b/go.mod index 872cfc47d..7924fa345 100644 --- a/go.mod +++ b/go.mod @@ -3,15 +3,28 @@ module github.com/jckuester/awsweeper go 1.16 require ( - github.com/apex/log v1.1.2 - github.com/aws/aws-sdk-go-v2 v0.24.0 - github.com/fatih/color v1.9.0 + github.com/apex/log v1.9.0 + github.com/aws/aws-sdk-go-v2 v1.6.0 + github.com/aws/aws-sdk-go-v2/config v1.1.1 + github.com/aws/aws-sdk-go-v2/service/autoscaling v1.1.1 + github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.1.1 + github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.1.1 + github.com/aws/aws-sdk-go-v2/service/ec2 v1.1.1 + github.com/aws/aws-sdk-go-v2/service/ecs v1.1.1 + github.com/aws/aws-sdk-go-v2/service/efs v1.1.1 + github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.1.1 + github.com/aws/aws-sdk-go-v2/service/iam v1.1.1 + github.com/aws/aws-sdk-go-v2/service/lambda v1.1.1 + github.com/aws/aws-sdk-go-v2/service/rds v1.1.1 + github.com/aws/smithy-go v1.9.1 + github.com/fatih/color v1.10.0 github.com/gruntwork-io/terratest v0.24.2 - github.com/jckuester/awsls v0.8.1 - github.com/jckuester/terradozer v0.1.3 + github.com/jckuester/awsls v0.11.1-0.20211024194801-688a8938b1b3 + github.com/jckuester/awstools-lib v0.0.0-20210524191941-23f0e367139d + github.com/jckuester/terradozer v0.1.4-0.20210524190016-3e6d42479316 github.com/onsi/gomega v1.9.0 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.5.1 - github.com/zclconf/go-cty v1.4.0 + github.com/stretchr/testify v1.7.0 + github.com/zclconf/go-cty v1.7.1 gopkg.in/yaml.v2 v2.2.8 ) diff --git a/go.sum b/go.sum index 9bcbbd946..56e54c0e2 100644 --- a/go.sum +++ b/go.sum @@ -74,9 +74,11 @@ github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20190103054945-8205d1f41e70/go.mod h1 github.com/aliyun/aliyun-tablestore-go-sdk v4.1.2+incompatible/go.mod h1:LDQHRZylxvcg8H7wBIDfvO5g/cy4/sz1iucBlc2l3Jw= github.com/antchfx/xpath v0.0.0-20190129040759-c8489ed3251e/go.mod h1:Yee4kTMuNiPYJ7nSNorELQMr1J33uOpXDMByNYhvtNk= github.com/antchfx/xquery v0.0.0-20180515051857-ad5b8c7a47b0/go.mod h1:LzD22aAzDP8/dyiCKFp31He4m2GPjl0AFyzDtZzUu9M= -github.com/apex/log v1.1.2 h1:bnDuVoi+o98wOdVqfEzNDlY0tcmBia7r4YkjS9EqGYk= github.com/apex/log v1.1.2/go.mod h1:SyfRweFO+TlkIJ3DVizTSeI1xk7jOIIqOnUPZQTTsww= +github.com/apex/log v1.9.0 h1:FHtw/xuaM8AgmvDDTI9fiwoAL25Sq2cxojnZICUU8l0= +github.com/apex/log v1.9.0/go.mod h1:m82fZlWIuiWzWP04XCTXmnX0xRkYYbCdYn8jbJeLBEA= github.com/apex/logs v0.0.3/go.mod h1:XzxuLZ5myVHDy9SAmYpamKKRNApGj54PfYLcFrXqDwo= +github.com/apex/logs v1.0.0/go.mod h1:XzxuLZ5myVHDy9SAmYpamKKRNApGj54PfYLcFrXqDwo= github.com/aphistic/golf v0.0.0-20180712155816-02c07f170c5a/go.mod h1:3NqKYiepwy8kCu4PNA+aP7WUV72eXWJeP9/r3/K9aLE= github.com/aphistic/sweet v0.2.0/go.mod h1:fWDlIh/isSE9n6EPsRmC0det+whmX6dJid3stzu0Xys= github.com/apparentlymart/go-cidr v1.0.1 h1:NmIwLZ/KdsjIUlhf+/Np40atNXm/+lZ5txfTJ/SpF+U= @@ -103,12 +105,294 @@ github.com/aws/aws-sdk-go v1.23.8/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN github.com/aws/aws-sdk-go v1.25.3/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.1/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.3/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.30.12 h1:KrjyosZvkpJjcwMk0RNxMZewQ47v7+ZkbQDXjWsJMs8= github.com/aws/aws-sdk-go v1.30.12/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= -github.com/aws/aws-sdk-go v1.35.28 h1:S2LuRnfC8X05zgZLC8gy/Sb82TGv2Cpytzbzz7tkeHc= github.com/aws/aws-sdk-go v1.35.28/go.mod h1:tlPOdRjfxPBpNIwqDj61rmsnA85v9jc0Ps9+muhnW+k= -github.com/aws/aws-sdk-go-v2 v0.24.0 h1:R0lL0krk9EyTI1vmO1ycoeceGZotSzCKO51LbPGq3rU= +github.com/aws/aws-sdk-go v1.38.43 h1:OKe9+Cdmrkhe0KXgpKhrDqidPhXQ4bv1FzzKnrmTJ5g= +github.com/aws/aws-sdk-go v1.38.43/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go-v2 v0.24.0/go.mod h1:2LhT7UgHOXK3UXONKI5OMgIyoQL6zTAw/jwIeX6yqzw= +github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= +github.com/aws/aws-sdk-go-v2 v1.2.1/go.mod h1:hTQc/9pYq5bfFACIUY9tc/2SYWd9Vnmw+testmuQeRY= +github.com/aws/aws-sdk-go-v2 v1.6.0 h1:r20hdhm8wZmKkClREfacXrKfX0Y7/s0aOoeraFbf/sY= +github.com/aws/aws-sdk-go-v2 v1.6.0/go.mod h1:tI4KhsR5VkzlUa2DZAdwx7wCAYGwkZZ1H31PYrBFx1w= +github.com/aws/aws-sdk-go-v2/config v1.1.1 h1:ZAoq32boMzcaTW9bcUacBswAmHTbvlvDJICgHFZuECo= +github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y= +github.com/aws/aws-sdk-go-v2/credentials v1.1.1 h1:NbvWIM1Mx6sNPTxowHgS2ewXCRp+NGTzUYb/96FZJbY= +github.com/aws/aws-sdk-go-v2/credentials v1.1.1/go.mod h1:mM2iIjwl7LULWtS6JCACyInboHirisUUdkBPoTHMOUo= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.2 h1:EtEU7WRaWliitZh2nmuxEXrN0Cb8EgPUFGIoTMeqbzI= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.2/go.mod h1:3hGg3PpiEjHnrkrlasTfxFqUsZ2GCk/fMUn4CbKgSkM= +github.com/aws/aws-sdk-go-v2/internal/ini v1.0.0 h1:k7I9E6tyVWBo7H9ffpnxDWudtjau6Qt9rnOYgV+ciEQ= +github.com/aws/aws-sdk-go-v2/internal/ini v1.0.0/go.mod h1:g3XMXuxvqSMUjnsXXp/960152w0wFS4CXVYgQaSVOHE= +github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.1.1 h1:6ocrUoJHmXBa0/oCoWYN2nK+UrETpA0zUxCV990nRl0= +github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.1.1/go.mod h1:+JkwIyrURCsjBdb3M6PdF+LAQ3TPvZAfH+gJ7AI3JT0= +github.com/aws/aws-sdk-go-v2/service/acm v1.1.1 h1:LAr7oTwfOZdfJN1GrZnU05yf2aOO3HVeGv2KjJKp8d4= +github.com/aws/aws-sdk-go-v2/service/acm v1.1.1/go.mod h1:LPzlCt4j2TSsD9P6NtruMhkOf0Ke7uxEHaxRCI5D1x4= +github.com/aws/aws-sdk-go-v2/service/acmpca v1.1.1 h1:N98nuPlHvPqA6fArWc+4iaQZm7eW4tnL40/L5O6RhVA= +github.com/aws/aws-sdk-go-v2/service/acmpca v1.1.1/go.mod h1:2UFokOEUDlk1h460Jr8IQNbcuJRVBlldsCL/HeO+9Hs= +github.com/aws/aws-sdk-go-v2/service/apigateway v1.1.1 h1:G2JpxWOpTyeLgTbh5gfiESvvm6B3lu/6kQNEhAS8Tvk= +github.com/aws/aws-sdk-go-v2/service/apigateway v1.1.1/go.mod h1:wmgrgVgNP96iRTgbY+Qd3UdqVvmlOCd46tY2P6sOTfs= +github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.1.1 h1:zmZr3G8Sez+ekuyT+rzh2twkOiN041cTWMlDXWczFxI= +github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.1.1/go.mod h1:H1gp1xhsbZTS9aEA45DAfDIWxvpBkD1sKOQHMAk+4x4= +github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.1.1 h1:gP63RXIC6oya4loJxYnfoMMEnYMP6QcKl/IUMxRJHZ0= +github.com/aws/aws-sdk-go-v2/service/applicationautoscaling v1.1.1/go.mod h1:/PV8QFQvhRMpxSaGnQsD6cE1ZjMrB/hKc/oYMTtP5uc= +github.com/aws/aws-sdk-go-v2/service/appmesh v1.1.1 h1:VS81Vf3/xfZMV65EqX0LL6wH8JnsjFs57Jxlj5asl18= +github.com/aws/aws-sdk-go-v2/service/appmesh v1.1.1/go.mod h1:fQRYDgxb1WtCg6leU2m+3LDh2uafyoVGCuTZ9jd4kLY= +github.com/aws/aws-sdk-go-v2/service/apprunner v1.0.0 h1:1dkOi28pzya8SnqbKDYek3422EGWRL85NSbHjgr5dbQ= +github.com/aws/aws-sdk-go-v2/service/apprunner v1.0.0/go.mod h1:PKiE8VYoQNjW+ylyF5R5C5NDf6tDfDCAmv3DKy7MPoQ= +github.com/aws/aws-sdk-go-v2/service/appsync v1.1.1 h1:NYPqPq18/WvalPPowYG0laum27pdEXq5gnrTp1ppVF4= +github.com/aws/aws-sdk-go-v2/service/appsync v1.1.1/go.mod h1:uhccc+JDGc1Ck0q8F3iI0+PPIP1N+yTZEfuMPp2Achw= +github.com/aws/aws-sdk-go-v2/service/athena v1.1.1 h1:DfyvXjTnWbvpxO0djdmv1OjejbH5zjg43iekvx4whDo= +github.com/aws/aws-sdk-go-v2/service/athena v1.1.1/go.mod h1:OgTxtyk8nrFHjj76D5bz4SPzHG/8qwuEqbxRjBl6fX0= +github.com/aws/aws-sdk-go-v2/service/autoscaling v1.1.1 h1:O0iefEPzxDdVVBtY7o0Hyj4SUre27QRh5mthCU+HYDA= +github.com/aws/aws-sdk-go-v2/service/autoscaling v1.1.1/go.mod h1:lmXoX7IIO5yAHRCmHlqda9tFfsbkY3IO3rt85VvXmIQ= +github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.1.1 h1:wymlNrJHpa34GTTT21YOmYgJmaRDDNiIN8MU9HMPTZQ= +github.com/aws/aws-sdk-go-v2/service/autoscalingplans v1.1.1/go.mod h1:8vLL0FlmdxXMiYjE0PULCE7n30liukj6qn/3P2DTHSs= +github.com/aws/aws-sdk-go-v2/service/backup v1.1.1 h1:bwt9UCyhrQGMmVP9YhYXOAosM4Qg0gRnSVMUS7DsvX4= +github.com/aws/aws-sdk-go-v2/service/backup v1.1.1/go.mod h1:nPGAR5R1vy0rSBBfAko54CHrSVfv/P814n5yopDml4o= +github.com/aws/aws-sdk-go-v2/service/batch v1.1.1 h1:sWBCBWniTlwyDEgPVEUDWOP+pMYKi/f45wW08gceUw4= +github.com/aws/aws-sdk-go-v2/service/batch v1.1.1/go.mod h1:V69WsLtdGB7T095lbM3SEDn0joafnIp1s2FiVmdaiis= +github.com/aws/aws-sdk-go-v2/service/budgets v1.1.1 h1:ZVgyQqcfkXmz8VLA/R0j0FdqMBwPYNs52Ho2DzwY8zo= +github.com/aws/aws-sdk-go-v2/service/budgets v1.1.1/go.mod h1:/v+APBnOBPy/NpPFS1lH5qJ9BfEQVfPAEnBm5XV1870= +github.com/aws/aws-sdk-go-v2/service/cloud9 v1.1.1 h1:WblDVlnxgdvuZNwBw3UX3JaO7hdVuvaLNK4P0XK1gKM= +github.com/aws/aws-sdk-go-v2/service/cloud9 v1.1.1/go.mod h1:InGDFYVeG6/bfb5KRB2n5qTFWZ/vp483zdUE1EPbDM0= +github.com/aws/aws-sdk-go-v2/service/cloudformation v1.1.1 h1:cRw6t1ZAqc0fG2CFtWnXXdBwgREo6B06X63lDlpGPlI= +github.com/aws/aws-sdk-go-v2/service/cloudformation v1.1.1/go.mod h1:Fq3q5X0gHcCCldZx+ibAo0HRo2xbVi9LFoFj2Pp9nl0= +github.com/aws/aws-sdk-go-v2/service/cloudfront v1.1.1 h1:Qhi6EdWHqYvqKXZBZ55YHNR6RL9JJTi65ndbqPKRdpM= +github.com/aws/aws-sdk-go-v2/service/cloudfront v1.1.1/go.mod h1:xNq//oorX26+SRydd//Rqk3iPLoKzoYmAGDm6p3wpzc= +github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.1.1 h1:jso38tIYjMhe0i5uBD2sG/nmgODmh8ZCKFvaejqlIQ8= +github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.1.1/go.mod h1:e6vwvVG3CrANic49hz9SG2bkKnSujNy8r+S6MZ21oEE= +github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.1.1 h1:MNQmQJZNCAlPqkWP01/7YptslcAbVmLNyqac+W/Q5oY= +github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.1.1/go.mod h1:gI/6WuEdSe7fWiBOMVPJfaonzq9mSA2E7h85CZNXzuI= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.1.1 h1:wvmvsbvJw/ml/PtdvqbcJnpu/GZLA5dERO0pqpcvyw0= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.1.1/go.mod h1:HFCCrSEnP3mVyR8zOmcbLSQJW4DGRKoz1hjJxh4d/tw= +github.com/aws/aws-sdk-go-v2/service/cloudwatchevents v1.1.1 h1:abNETLBP3ShOHUBocGFBHqbP3D9Ho2vKhG8soWId4js= +github.com/aws/aws-sdk-go-v2/service/cloudwatchevents v1.1.1/go.mod h1:rtyMQxf1ahZkyvpcwnHGR7goHPJC4WRUmazENZsbjas= +github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.1.1 h1:9McrdB/9iGpEZw2xZdRdCYQlNuCHFFYjvROkO5yo1RM= +github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.1.1/go.mod h1:IB6HamJdrHbUjbWEgWkGX1Lrp8mZzxoBLXHOTAmoXFA= +github.com/aws/aws-sdk-go-v2/service/codeartifact v1.1.1 h1:ZAOwcCnwHCx57eMPHjqra5Qcb0idPs/z83vc15wuDdc= +github.com/aws/aws-sdk-go-v2/service/codeartifact v1.1.1/go.mod h1:RSmAClIrZeJjL/GH2C4dgEWKcjd6HqCa9pi0ATcPLpg= +github.com/aws/aws-sdk-go-v2/service/codebuild v1.1.1 h1:5Ku1ITd/Epk23vIwq/2NU1F0gUKlUcjyk5gOrsXPZIA= +github.com/aws/aws-sdk-go-v2/service/codebuild v1.1.1/go.mod h1:Hc+1mcfi7yTl5Qtrn7PRwazVWblIIWCfhqwaj8M6vAw= +github.com/aws/aws-sdk-go-v2/service/codecommit v1.1.1 h1:7WUEimiBFjeo0x/K8JNhPc61oho7TPhXyfrpYxpEMN0= +github.com/aws/aws-sdk-go-v2/service/codecommit v1.1.1/go.mod h1:JUViTUm6ZiAJOwKItWf/lN5KeBRdidcjfZnAhgKTc0Y= +github.com/aws/aws-sdk-go-v2/service/codedeploy v1.1.1 h1:nCv1/hV+E3kMUJVwgUzw5zNvcHzP9cQqVmcVZXlcmiE= +github.com/aws/aws-sdk-go-v2/service/codedeploy v1.1.1/go.mod h1:ktnHZmgGlqoJkUjyzR4RHDlGhfSxQV+AQY7Xx3nPNPw= +github.com/aws/aws-sdk-go-v2/service/codepipeline v1.1.1 h1:FbzagBHyTmKk4DbXJOx4l/a+k0y49TgWoyzCc04YwAk= +github.com/aws/aws-sdk-go-v2/service/codepipeline v1.1.1/go.mod h1:7pc2jReqY0EvHa5ReuVBIwmRlW8yQV5O3ptw4T+OS80= +github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.1.1 h1:FcXHcvVj6MUYfXi2YURka/q6Or3uy0n0BR+yHnvoImY= +github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.1.1/go.mod h1:10mNL6gMAlOSuufqiJdHFa/y6Ol6ha3miOJQAceBbwM= +github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.1.1 h1:r22r9DDGUs7YxXzp1AlJG0Yl2JWZFQhx8/zwE32kxuI= +github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.1.1/go.mod h1:yCdali6jDpBnKdYXUdsZu3Xi5IZgODjkddDbjEeTAh4= +github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.1.1 h1:A/ZhwplRVmY3cSM5NfW/3lp0PBJFAhWvHD5+sYo7oxI= +github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.1.1/go.mod h1:85mUFI4DMZiUYpQzTfUvDaFf/TL/pd419Elk5FOCVtY= +github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.1.1 h1:HoHckIJOdxpS4RSEqnPXp9+gFjixFH97pT46Q4buxhA= +github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.1.1/go.mod h1:/yhD37TwPeVuZZ8qx1n7H65O0+a2Mh3gEF4TTB4Sn24= +github.com/aws/aws-sdk-go-v2/service/configservice v1.1.1 h1:2PU0yT1crQJ08BJOF8Flq8j962NpiU3QltBaKg4NI0c= +github.com/aws/aws-sdk-go-v2/service/configservice v1.1.1/go.mod h1:d8io9sMSzJBqxJrNABjaDuFH6t02btWR2ZQtDTGF35A= +github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.1.1 h1:dJpCyGZQtGB+65JC4u9qXzeaw3g4LKFlbO6C71RIqug= +github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.1.1/go.mod h1:ODigVn0bDzqLy7hoYKlEVWKv5d5IL3Cj/zdeX6VdYqY= +github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.1.1 h1:6RLeff7CkkPZNPa0TVuQqjprCQ4kwcS6CLA0dBANbj8= +github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.1.1/go.mod h1:gJ/ZonQo6+7pn/MXTWPrst85s+5F9V9kygtXZYyTNQI= +github.com/aws/aws-sdk-go-v2/service/datapipeline v1.1.1 h1:iBj0PYHYe7Po52v8fAcMEH0RRLbgN0XkJ+dux63lKD8= +github.com/aws/aws-sdk-go-v2/service/datapipeline v1.1.1/go.mod h1:f+FK6B06DiJnhr8Ba6rnN8SSPITHG3et63y8NORbbsk= +github.com/aws/aws-sdk-go-v2/service/datasync v1.1.1 h1:AHDy+Xpf/7JrB2s+hY5/+t+3N45vy+fYFCKa1DXLI+U= +github.com/aws/aws-sdk-go-v2/service/datasync v1.1.1/go.mod h1:2LTYBOM1Gnz6jAMsbo8Rl717/DDzCEp3sNO7H9D6yCE= +github.com/aws/aws-sdk-go-v2/service/dax v1.1.1 h1:86J2HaFRWqKuzkQs40YDyPXJkNTIqRA6uI4KW2C70/g= +github.com/aws/aws-sdk-go-v2/service/dax v1.1.1/go.mod h1:KTy/LsusBaRs2+nOTis/aAxzmP26E4cT3hhCB9ZBwD0= +github.com/aws/aws-sdk-go-v2/service/devicefarm v1.1.1 h1:NSFZm6LIFbASAv833Bm4+Ea/GiaWr2NvTalswFtOTj4= +github.com/aws/aws-sdk-go-v2/service/devicefarm v1.1.1/go.mod h1:UMb/XuyQ0X/Gr+GVwCwL5qYvPE5vWwUOYHooaa4WhzQ= +github.com/aws/aws-sdk-go-v2/service/directconnect v1.1.1 h1:v9qynmSuDRuO/Y4ef/aYIIbV8BSfmHt8n/apCqwZ6nU= +github.com/aws/aws-sdk-go-v2/service/directconnect v1.1.1/go.mod h1:AhYvrgMjSsW1xK/iG2AL/3JyErxaXvvyedRbCw4EHmc= +github.com/aws/aws-sdk-go-v2/service/directoryservice v1.1.1 h1:PzokLTT2Y+0yjUIkcrrnk3cu9lB2ELvNCE6GgMcxkes= +github.com/aws/aws-sdk-go-v2/service/directoryservice v1.1.1/go.mod h1:3YXDABYQL96IkzoAtx7m7NVXpQP9p868/6tSDRCF/L8= +github.com/aws/aws-sdk-go-v2/service/dlm v1.1.1 h1:AQ1FCBvPaRDUni/0/20mLzyvdgIeptqip0lKJtaY44U= +github.com/aws/aws-sdk-go-v2/service/dlm v1.1.1/go.mod h1:5nrY4EI4b8DKcifG+FqLIQtY0gwyP9x2kraPiEBIk4Y= +github.com/aws/aws-sdk-go-v2/service/docdb v1.1.1 h1:NzjwVOucNRC1cjh+noW2AswBR7VcIqcXXExMS8dMQh8= +github.com/aws/aws-sdk-go-v2/service/docdb v1.1.1/go.mod h1:pMgIDNa2fRPrU80XlXB2Nh9+d4Fd4KYDLuYhafWSYKw= +github.com/aws/aws-sdk-go-v2/service/dynamodb v1.1.1 h1:rs3qt8vsrOXgm3qfVdjVkwnPiBXI2M7qN1nExoZmJfI= +github.com/aws/aws-sdk-go-v2/service/dynamodb v1.1.1/go.mod h1:0xGVqnX5hK8bd/Qnqklpdellx5/6KPSPV7vfno3i1Sk= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.1.1 h1:xZYDtbub5yhn+ASvD26m76Cgb0k+0+ShE+nZwK9djUQ= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.1.1/go.mod h1:L7nNXGNEV0lkTauKM/KcEIZkT262pckC0YNykwAtX20= +github.com/aws/aws-sdk-go-v2/service/ecr v1.1.1 h1:idXCsD7Rl3LtE/MFFw81a1C1tVRSP3AOnv96U0TsRUo= +github.com/aws/aws-sdk-go-v2/service/ecr v1.1.1/go.mod h1:NGFCwbEd03lj5kwG8vO5qS5m4CfvHE4ir3pA5ozrlUM= +github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.1.2 h1:GqJfxaVsfBifydHSDyjLESSdaNc0760W4msFDMeD4G4= +github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.1.2/go.mod h1:TvVBgVH4C2jjDEXT2y9jOyRlBgvtnndLD46GNcWbzKk= +github.com/aws/aws-sdk-go-v2/service/ecs v1.1.1 h1:McBGvH3M7n8s6SGuS+UNm8+q5BEmE30cNH/81qy0B4Q= +github.com/aws/aws-sdk-go-v2/service/ecs v1.1.1/go.mod h1:HHh+ZaGFQVK16XijQFZKaJdTpeOdxWK894pn9vY2Tgo= +github.com/aws/aws-sdk-go-v2/service/efs v1.1.1 h1:UnjpU4x5bCWhJn43C+FXSjRs4fh8z8YjN8AsjxkEFW8= +github.com/aws/aws-sdk-go-v2/service/efs v1.1.1/go.mod h1:fJbRgAwIrq3LyqphCXgJs6bVYfMlLZ9G6vepkPvAJsw= +github.com/aws/aws-sdk-go-v2/service/eks v1.1.1 h1:nK/Kl0TIfwaHUkcCj9+L6td2Xds7QNYMODJKWG1wPOY= +github.com/aws/aws-sdk-go-v2/service/eks v1.1.1/go.mod h1:9SVAH9Cu/e1iQOu7VIBp7DhqTq3Dr5cAooCzoh61mEc= +github.com/aws/aws-sdk-go-v2/service/elasticache v1.1.1 h1:/1VLazyWVSYTzl3CmmfjT2g3jc9krekNcTyGiW09AYY= +github.com/aws/aws-sdk-go-v2/service/elasticache v1.1.1/go.mod h1:DfEntnpXu52dWWWGCjrx2RNMsHWHXuyI2LOpn+XkFFY= +github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.1.1 h1:xLqpXaLCUtHJuJiOASwPIPLAJMt1v+6h8phzma1haT8= +github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.1.1/go.mod h1:9Klmao5OCdCMYyXPNy+skSx6c4LoKsbPL8IcEqV5wVU= +github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.1.1 h1:YyPHbW33NvSfUVVYIHVdMQX/BVnkdiJcgGdpjFqU64s= +github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.1.1/go.mod h1:Gqg2Xf3BaVCDXPjNgkTwM3Q1zN7OSrOszkJ8s9xuYXU= +github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.1.1 h1:ARoh9oSYV0QwcenklgpagsW+fI0xx5STB31yn3BtcPE= +github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.1.1/go.mod h1:DP/R8CgrCb5TFyP3GIM5FcDWcrSl0sTZWHQSxXMtrEk= +github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.1.1 h1:Kz5PZgEUnzh3134+b8/kLmA6XrkSLD/qBV5YhUAlP0U= +github.com/aws/aws-sdk-go-v2/service/elasticsearchservice v1.1.1/go.mod h1:LtpgnMWYTwd6oasEo9HsE8dPDyeOnnU4A8at3LkyI6g= +github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.1.1 h1:NIxLi1Jsteux0tZqz9qE75n5ULi6wvEWECsqMNZDUP0= +github.com/aws/aws-sdk-go-v2/service/elastictranscoder v1.1.1/go.mod h1:RoUcns++SgWVBXj66YSmZXG2O+Cbp65NP9EJ8I8tPoc= +github.com/aws/aws-sdk-go-v2/service/emr v1.1.1 h1:Al6w3GqqFKUmBjrQK+RWYNT7t7REiZ52GQL0ew/LSds= +github.com/aws/aws-sdk-go-v2/service/emr v1.1.1/go.mod h1:hgkNhB3DJRxLgFjL84KMXQ1c6XNRZQla4qiU1foMdbw= +github.com/aws/aws-sdk-go-v2/service/firehose v1.1.1 h1:RDEx0S3iyLDCK4/Y2TH4kXo53vJeSNeNyCdVzSwLR4g= +github.com/aws/aws-sdk-go-v2/service/firehose v1.1.1/go.mod h1:mIQsr8OSwIu5DgdTeEimmQN6nld0TxfLfIW+aqTEX68= +github.com/aws/aws-sdk-go-v2/service/fms v1.1.1 h1:3/vM60blZRZR2XYwRUH5SjNrIzBekvwnQDBVVrijfTI= +github.com/aws/aws-sdk-go-v2/service/fms v1.1.1/go.mod h1:B4MGIimxBhIq4kui2jht9+npYAO1SO/cr7mTrfEgzIQ= +github.com/aws/aws-sdk-go-v2/service/fsx v1.1.1 h1:xxP798zEyIhIrRCafg79taw3axUhL4mvkHTSvE4+Y4Q= +github.com/aws/aws-sdk-go-v2/service/fsx v1.1.1/go.mod h1:RtQ3xULnp6ABJ+znxkEqutSVKR3/6HZZmUFjU+hCddw= +github.com/aws/aws-sdk-go-v2/service/gamelift v1.1.1 h1:UO98wwZIorK1QGPk7QNnvrXV6OsAD8n17lju6hZkU44= +github.com/aws/aws-sdk-go-v2/service/gamelift v1.1.1/go.mod h1:ET765kdY+D2qZaKikE1qa+RSqGX6Jj6SFStK8zo5GW4= +github.com/aws/aws-sdk-go-v2/service/glacier v1.1.1 h1:0dD0NJEi6at6lbF2iGPeTn4sViXEpRnnke5Bb2T8qzs= +github.com/aws/aws-sdk-go-v2/service/glacier v1.1.1/go.mod h1:B9kNUAaNWtoooDGm9tGIxaPfEb3vsQ21K5fXRU7kpK8= +github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.1.1 h1:iEL/tQI16tTCny5z9a30kzhA3VehHMAXvFmJgbOIf9g= +github.com/aws/aws-sdk-go-v2/service/globalaccelerator v1.1.1/go.mod h1:hFgLhSLO3aS5qL3+jFosC7zkmS2FLG4Rt8/tTIP79Gw= +github.com/aws/aws-sdk-go-v2/service/glue v1.1.1 h1:O0mpo0QQXcsjr9lhLpQFKHjBJVY2XXkv5c/nWsZ0zgw= +github.com/aws/aws-sdk-go-v2/service/glue v1.1.1/go.mod h1:TegWq2QgDYYk6v6JD8POmo4gWwJhn4Ar6KoCyNxdyC0= +github.com/aws/aws-sdk-go-v2/service/guardduty v1.1.1 h1:MTawRjHKXhdpn/Db5/Q1jmytxrgMOD8bnLZmIOcwkco= +github.com/aws/aws-sdk-go-v2/service/guardduty v1.1.1/go.mod h1:5UGd5pdgaw+hYd6LgOFsaEhTtiDNLu7MlLJrw+KeuOs= +github.com/aws/aws-sdk-go-v2/service/iam v1.1.1 h1:dfpLUOEtz+DlRpeAA9vg/tM/VjAcDGBE47m2ZbdXrZU= +github.com/aws/aws-sdk-go-v2/service/iam v1.1.1/go.mod h1:vBPRxb7qWfonEjDJR+ckM+1b1z2gXOogQjmTIPw15L4= +github.com/aws/aws-sdk-go-v2/service/imagebuilder v1.1.1 h1:I4pWbKi1rREID8McdaCM+KccIlQ7ioCJLuQyV6X8oOs= +github.com/aws/aws-sdk-go-v2/service/imagebuilder v1.1.1/go.mod h1:0eqyv8r0f3wbwXIM0xQcyld/9WQL8IahWaN/YXFGgQc= +github.com/aws/aws-sdk-go-v2/service/inspector v1.1.1 h1:KF4hxBqVotY5kzT9+vSqGtAXwZWX8jeYoqLqDC21e2U= +github.com/aws/aws-sdk-go-v2/service/inspector v1.1.1/go.mod h1:QBoElt/+Vo5JZvKg2CGhbWVjcJc8aYwauobVQc5MFmM= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.0.1 h1:q+3dVb1s3piv/Q/Ft0+OjU5iKItBRfCvU5wNLQUyIbA= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.0.1/go.mod h1:zurGx7QI3Bk2OFwswSXl3PtJDdgD3QzjkfskiukJ2Mg= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.2 h1:4AH9fFjUlVktQMznF+YN33aWNXaR4VgDXyP28qokJC0= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.2/go.mod h1:45MfaXZ0cNbeuT0KQ1XJylq8A6+OpVV2E5kvY/Kq+u8= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.1.0 h1:6yUvdqgAAWoKAotui7AI4QvJASrjI6rkJtweSyjH6M4= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.1.0/go.mod h1:q+4U7Z1uD6Iimym8uPQp0Ong/XICxInhzIKVSwn7bUU= +github.com/aws/aws-sdk-go-v2/service/iot v1.1.1 h1:D7cWw8QZTkOEoF5uCnCUMYcNA1uo+yD+XuZXnZLcS+k= +github.com/aws/aws-sdk-go-v2/service/iot v1.1.1/go.mod h1:LM7v3TvBIu+R+UZ4QKQzoDS94lzJ3XLLFLN4wsbnbVM= +github.com/aws/aws-sdk-go-v2/service/kafka v1.1.1 h1:FrFngpnVCdYW+lUljqqj9CLfY7xzRrGdY7/AkSOG5EE= +github.com/aws/aws-sdk-go-v2/service/kafka v1.1.1/go.mod h1:VqHOqKal4FUR6PfZDazxEcI/IBxyXOwOKKYzmUu4kC8= +github.com/aws/aws-sdk-go-v2/service/kinesis v1.1.1 h1:w6pCp3eYLGhIH+mkNVZkR2KdpMXulXLzkQhmXbHeHTE= +github.com/aws/aws-sdk-go-v2/service/kinesis v1.1.1/go.mod h1:7GLbfWUWm4KRU04QHvxkZGIQDiUjLFD+nVZW8joexTo= +github.com/aws/aws-sdk-go-v2/service/kinesisanalytics v1.1.1 h1:vLkXvnrWa89wrb995iKSKp9lA7QZofZ502v4xn8SVNE= +github.com/aws/aws-sdk-go-v2/service/kinesisanalytics v1.1.1/go.mod h1:5TeOn2Vr7UvSUcRVlYodFNGIPXcqsBDtNFfjVObKC6U= +github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.1.1 h1:L2yFty4jDD/B01CSxQM+98Ion4y/5z5sBU48u7jjtk4= +github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.1.1/go.mod h1:1t9R/ceunHK5PV+BuERB+Xu3rfGWK8K6iA0CrhDzfXc= +github.com/aws/aws-sdk-go-v2/service/kinesisvideo v1.1.1 h1:3/Af+Snzwn1dhDLaLZH1gA9RA1cxp1cos9SWFVXAdQ4= +github.com/aws/aws-sdk-go-v2/service/kinesisvideo v1.1.1/go.mod h1:HiFQB+Wmi7BpWSGC/WjEKx2nsDnGrLbHJ6pVuvm/SQ4= +github.com/aws/aws-sdk-go-v2/service/kms v1.1.1 h1:rK1edW1dLtSGr1551ttHqQopajK4Pv9C4ez70dVMQaI= +github.com/aws/aws-sdk-go-v2/service/kms v1.1.1/go.mod h1:6K5oOoDdnkW/h+Jv+xOA+tvgI6lwGBT9igkJGL1ypaY= +github.com/aws/aws-sdk-go-v2/service/lakeformation v1.1.1 h1:7VT39MtwGrHbxKjX0t96D0WUgTFP70yM9ImfUcLMWU4= +github.com/aws/aws-sdk-go-v2/service/lakeformation v1.1.1/go.mod h1:6E5JiqrUDr6fSvmRjA/ij2G8oUbIgN5it3Zm0INXMUc= +github.com/aws/aws-sdk-go-v2/service/lambda v1.1.1 h1:ptubVb1eLQgZh7U4i+k2vpf3PlL4ZoTmGdTj+VowqqM= +github.com/aws/aws-sdk-go-v2/service/lambda v1.1.1/go.mod h1:iSHLnnmJNKoAUdzKnUFh4rIGM3V58fxa+XCYtRpeFX8= +github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice v1.1.1 h1:2wCt/l1Tc2s+qT3SbVp0ukKf+VkpBMP+ykrBwMIAbRc= +github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice v1.1.1/go.mod h1:v5tNKuCsMA8zdxltJXRtqIVgvQ8gxcPK1Gw1JHtVVRo= +github.com/aws/aws-sdk-go-v2/service/licensemanager v1.1.1 h1:KkpVkfPzF19tvSLf3QOyGGBWikQUKnsI3Jt3w5PLYpY= +github.com/aws/aws-sdk-go-v2/service/licensemanager v1.1.1/go.mod h1:/M7ig3k09f+eiWsgIn9ZQqunGXMsjkzqyvIXXbadt6s= +github.com/aws/aws-sdk-go-v2/service/lightsail v1.1.1 h1:ubI8DMTlDoZBJhlhMyjGZUXmpNyaQUAmd0nNsL9EfwA= +github.com/aws/aws-sdk-go-v2/service/lightsail v1.1.1/go.mod h1:4zEDHc/kp4Kz7oC+hP31CxB1jcFiJ045885y4G4o7YY= +github.com/aws/aws-sdk-go-v2/service/macie v1.1.1 h1:lBw8rXj+WAGjYhMxG8DUnvBQ84QpjZH2W/zSj/3jGTk= +github.com/aws/aws-sdk-go-v2/service/macie v1.1.1/go.mod h1:wShNz65nSc26u4VzUR0UJsY2Sp/+StqKkjZxNAfwnL4= +github.com/aws/aws-sdk-go-v2/service/macie2 v1.6.0 h1:mxfEPcsWx9BlX6zoU5L3LHd61rCufadU8Vy1aQEK6g4= +github.com/aws/aws-sdk-go-v2/service/macie2 v1.6.0/go.mod h1:EGdrZY8wsQFiB4bPJ4JwrZxFUyYISQtklUjTugamvPo= +github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.1.1 h1:N5EacoWJNZBqDIyfkfrpHhISvy9ApHwpil14Sbj0VYg= +github.com/aws/aws-sdk-go-v2/service/mediaconvert v1.1.1/go.mod h1:jdhflUs3e4/RM61qKAjdhT6IN2VfvwXqCcsfAC5lKp8= +github.com/aws/aws-sdk-go-v2/service/mediapackage v1.1.1 h1:lIftsFn6TsByMl+v32Y4ztGLIz/C4Rq7gat5AihCpdw= +github.com/aws/aws-sdk-go-v2/service/mediapackage v1.1.1/go.mod h1:9YtJbicAA2/uNt2VsIMWd6eapsIJn2o/0u0VJMAtrXo= +github.com/aws/aws-sdk-go-v2/service/mediastore v1.1.1 h1:tl/58Fn+6E9VTEmconNpPqDWSZM+aeV1DjI/sahJYLQ= +github.com/aws/aws-sdk-go-v2/service/mediastore v1.1.1/go.mod h1:gevnsX8qzzxtNcZoSab72+PNtrfFmgb1n1Z4GKbgkxU= +github.com/aws/aws-sdk-go-v2/service/mq v1.1.1 h1:T9PcYfzFG33LJii/wyJlj1nzfIVpqueOgTENyy/q95I= +github.com/aws/aws-sdk-go-v2/service/mq v1.1.1/go.mod h1:iSRXUUOLM4VuytHZnGAPZ29PJi/iHdw8s0sUkuVVp4I= +github.com/aws/aws-sdk-go-v2/service/mwaa v1.1.1 h1:pria2VJhXGqosk53HS8cXBDX0FGsyszgacr7OQ2Zl4U= +github.com/aws/aws-sdk-go-v2/service/mwaa v1.1.1/go.mod h1:J+Os4wwJULmwDOFjaGu+19yi2ZLZV0gK3PlIqcPWqtw= +github.com/aws/aws-sdk-go-v2/service/neptune v1.1.1 h1:PRjfY//opNv6mCnOCEwdQMEzgecUSfsA0Ga21BU2Bkg= +github.com/aws/aws-sdk-go-v2/service/neptune v1.1.1/go.mod h1:pL8Iwl7KIr67Y40UIpO7KBOR6FFn+91zrXKsFEX7Ek8= +github.com/aws/aws-sdk-go-v2/service/networkfirewall v1.1.2 h1:EpwPWHqEO6wvjUiiOoFdQwiB2PNZCoxx4LDfgjYFM6g= +github.com/aws/aws-sdk-go-v2/service/networkfirewall v1.1.2/go.mod h1:0M8yA852HHtir1vEEHJ1h7k4+nwss8aSTxr7H0z786g= +github.com/aws/aws-sdk-go-v2/service/opsworks v1.1.1 h1:2uIpw/5/peUbOuYZuMzUJvndBIwR7LZ5HWVtkfYvHwY= +github.com/aws/aws-sdk-go-v2/service/opsworks v1.1.1/go.mod h1:IHW00AmgoUsToPVC+UQq2Zl7A2DdAOsQEZ2rm9peEic= +github.com/aws/aws-sdk-go-v2/service/organizations v1.1.1 h1:JPmFEmO4ycVquOwChmPJtC8Ct4oM1r3qEHwBdHZ4y3w= +github.com/aws/aws-sdk-go-v2/service/organizations v1.1.1/go.mod h1:goX7wNhH+gPuyYZX0AEJWm7cegEHyKnRLvZW4T4ZTgg= +github.com/aws/aws-sdk-go-v2/service/pinpoint v1.1.1 h1:Rdds+b7XAWzkYoVOfKkptWP8D9oXmp6d5QDuEOIctKo= +github.com/aws/aws-sdk-go-v2/service/pinpoint v1.1.1/go.mod h1:AtsnkTHd+qV0cy5NJYBzxikem94nrjJdKSEz9ffGjiQ= +github.com/aws/aws-sdk-go-v2/service/qldb v1.1.1 h1:2yUiwjSgEdMO2zRvbFkMVB5+qIw33o+1uvsS+Vwt3LU= +github.com/aws/aws-sdk-go-v2/service/qldb v1.1.1/go.mod h1:PdAF531U/qcXoTn4/Ay+RCTXAiim7Z4zPPiJMSY0P+w= +github.com/aws/aws-sdk-go-v2/service/quicksight v1.1.1 h1:zwzyPYIv1/Z4cQfBjOR6zDx4UbGYke549KzoEPCtdGs= +github.com/aws/aws-sdk-go-v2/service/quicksight v1.1.1/go.mod h1:0Df9Z61rDwbQU7UBN/HGc950Qg//vLjvKq64pMMmOhg= +github.com/aws/aws-sdk-go-v2/service/ram v1.1.1 h1:rlOB0ZR/rEs3efq3yIGKWiVM60bCSGT+mj6RT+i7Tzs= +github.com/aws/aws-sdk-go-v2/service/ram v1.1.1/go.mod h1:9ybGheC2Hj3XlmQRaK2LgT36TqqO9gCwtZZ50Jyckek= +github.com/aws/aws-sdk-go-v2/service/rds v1.1.1 h1:bA0wFJBnOiEa5ZcNHt9vHlTjjjj/rFvCcQq7nqE36WI= +github.com/aws/aws-sdk-go-v2/service/rds v1.1.1/go.mod h1:5KthKjThUjPkKAfTTtqEreCr5Lu5zYu78xfiSxo9KF4= +github.com/aws/aws-sdk-go-v2/service/redshift v1.1.1 h1:oUzE4Tq+1u7XJfTuA5cgAwsch0i9iZgHT/d24IVKqsA= +github.com/aws/aws-sdk-go-v2/service/redshift v1.1.1/go.mod h1:eQX1jOv0BfjoMLBSSCYVmqWr2ent5R/8Fk8tisGnKgs= +github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.1.1 h1:uDSFv0UmCcrrqhRrTlP9l/YTSESnZkZIHdJVdVDYY/4= +github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.1.1/go.mod h1:21JHC8cArZT+J7hgQZgS+4kx8s9SdSFIqxOmiR+sGto= +github.com/aws/aws-sdk-go-v2/service/route53 v1.1.1 h1:cKr6St+CtC3/dl/rEBJvlk7A/IN5D5F02GNkGzfbtVU= +github.com/aws/aws-sdk-go-v2/service/route53 v1.1.1/go.mod h1:rLiOUrPLW/Er5kRcQ7NkwbjlijluLsrIbu/iyl35RO4= +github.com/aws/aws-sdk-go-v2/service/route53resolver v1.1.1 h1:tl24O2JZWqshF6Hm/qe8uanfCETHW/VUUsEGTJsBEss= +github.com/aws/aws-sdk-go-v2/service/route53resolver v1.1.1/go.mod h1:oZuezsq1ezPx/I3yG3gHV6eTh+KwCyw2PGd3wSiKXGg= +github.com/aws/aws-sdk-go-v2/service/s3 v1.2.0 h1:p20kkvl+DwV3wYsnLGcmsspBzWGD6EsWKi/W+09Z1NI= +github.com/aws/aws-sdk-go-v2/service/s3 v1.2.0/go.mod h1:nHAD0aOk81kN3xdNYzKg4g9JISKSwRdUUDEXOgIojf4= +github.com/aws/aws-sdk-go-v2/service/s3control v1.2.0 h1:lMDdRhQ1yVtk6DEo5oBFugQhPhUbxIp21+jxzykGYto= +github.com/aws/aws-sdk-go-v2/service/s3control v1.2.0/go.mod h1:7xR7Ojoec0G8p49IbbFw/T70fLudDE64C2mlJK930OE= +github.com/aws/aws-sdk-go-v2/service/s3outposts v1.1.2 h1:oCtTnsBviVlMbgmbFphEzhHYXI/DkRDqIyqPfCtcpfA= +github.com/aws/aws-sdk-go-v2/service/s3outposts v1.1.2/go.mod h1:DLoGGEgqoOQAE8ggXXLw0t7xEOCgUvESjBcQ6Kg3U4I= +github.com/aws/aws-sdk-go-v2/service/sagemaker v1.1.1 h1:X9KzM9/G8q8XyaebYyA/nQUPAj37Voi9R3JPaBr2xnM= +github.com/aws/aws-sdk-go-v2/service/sagemaker v1.1.1/go.mod h1:968fFTh4L/Tvr5aMOM9yCIxT5g3vA6tDY2XdRXbVLyU= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.1.1 h1:tOZVE/wpwnCH6zMCvDi8WsuXLV1p5PG/WOhHu8LWphE= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.1.1/go.mod h1:ytf+Mop8BTUFmWJSCI/U33FawS9A8UWwybOdNOXU6zE= +github.com/aws/aws-sdk-go-v2/service/securityhub v1.1.1 h1:80QYiUXqf6EHmxhW3wk9VGaGuem7GAeW2TcJj7hc0Do= +github.com/aws/aws-sdk-go-v2/service/securityhub v1.1.1/go.mod h1:M/Eb/iVz5QLNeFxNP10Ww6uYarHvm8X1SaTc23NhoYw= +github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.1.1 h1:5qx3KZq6WyQnX+gvLuU6sLBBWJulFrVn7sZoe+9GpJQ= +github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.1.1/go.mod h1:AxJdVkbAHbnhUhUP3cFgMGEe288M8+YDXW7gbcdqOtQ= +github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.1.1 h1:7MWtIOjK3XC22+inrENVLjaI/Ud0Ta4JOcnpfWjU3vY= +github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.1.1/go.mod h1:L5chFjExDpuzzyMIqVpcxwkVddok3sxwuT3a6Tg0Wt0= +github.com/aws/aws-sdk-go-v2/service/servicequotas v1.1.1 h1:h/ZkJFaFUV7apuIIGvbksey2zUyenjE6LYUltsJ69jE= +github.com/aws/aws-sdk-go-v2/service/servicequotas v1.1.1/go.mod h1:jt4yLkwvH+rWXTxfpwEKoldEuFB0dy5bAqlvGYpbjCE= +github.com/aws/aws-sdk-go-v2/service/ses v1.1.1 h1:ZCT1HdrWSIt8014g2Wia7B1SpytNh9EGZ/qKpZvRVgA= +github.com/aws/aws-sdk-go-v2/service/ses v1.1.1/go.mod h1:U9bdibu41007uBclE2QUdURjHU6SzQKqxY5GKppL7gE= +github.com/aws/aws-sdk-go-v2/service/sfn v1.1.1 h1:GexTkfjidovrPhnvLrX2ggMo7pooiZJfZw/K1MOwe/o= +github.com/aws/aws-sdk-go-v2/service/sfn v1.1.1/go.mod h1:e1kcDzRmGL4UoKqMcyJT344yqMivOXIftV+O1H6fixY= +github.com/aws/aws-sdk-go-v2/service/shield v1.1.1 h1:beWpVDkWf33DT2Dx9au0WY9PTSjbeBMj3yP5aPRWzxU= +github.com/aws/aws-sdk-go-v2/service/shield v1.1.1/go.mod h1:Q+VSHWZ75Rlk9XCYVBGN9AvhY0D+oujYnPVc6H+Wh14= +github.com/aws/aws-sdk-go-v2/service/signer v1.1.1 h1:FHdR85yf4g4bdSNjioFOJLGNYluPActi/vtWHSwqOcc= +github.com/aws/aws-sdk-go-v2/service/signer v1.1.1/go.mod h1:Ff15jknVfn4zNvuUSaQjh+z9PayetTNb8b5f7ETFmxI= +github.com/aws/aws-sdk-go-v2/service/sns v1.1.1 h1:5Js3R6coB5uI/h/Gua2Vm+uyuZrgmXs80zqtkOBumxk= +github.com/aws/aws-sdk-go-v2/service/sns v1.1.1/go.mod h1:V2HdUZQcKhcF58AwYU78fkQ5Drfw3qAGMUd9o1uvrf8= +github.com/aws/aws-sdk-go-v2/service/sqs v1.1.1 h1:T1fzWyfSgTNfFwpePwG9l0re3HWHprjUId/zy1Q4YvM= +github.com/aws/aws-sdk-go-v2/service/sqs v1.1.1/go.mod h1:vT8RRjBL5Z9KBZGGhjLcG6pngVLeq7MqySFsNdGFjSc= +github.com/aws/aws-sdk-go-v2/service/ssm v1.1.1 h1:7KkZoTdApfXlU7boQG3/DpdfsbYJiJKIpglGitlGL0o= +github.com/aws/aws-sdk-go-v2/service/ssm v1.1.1/go.mod h1:351FC4X3HnrPJ8/RwHuFRr6uLq1LrXFfh8V5vBhT6/Q= +github.com/aws/aws-sdk-go-v2/service/sso v1.1.1 h1:37QubsarExl5ZuCBlnRP+7l1tNwZPBSTqpTBrPH98RU= +github.com/aws/aws-sdk-go-v2/service/sso v1.1.1/go.mod h1:SuZJxklHxLAXgLTc1iFXbEWkXs7QRTQpCLGaKIprQW0= +github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.1.2 h1:ZU5n0Q7sMDE7DBPM1aV+5I+RSssaKhGLwjulIVfWlS4= +github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.1.2/go.mod h1:SxsL0DgassBKOFCsitgahky3sncRD+K6lIbNcL3zpyI= +github.com/aws/aws-sdk-go-v2/service/storagegateway v1.1.1 h1:j+imr4ycrTtJkJOsfIKZsr0S7fpdB/u+BVItnSCOKl0= +github.com/aws/aws-sdk-go-v2/service/storagegateway v1.1.1/go.mod h1:k/N3PZXJUJVIAecRsIOZaGPi4NVVCCh9/5mTY2sQRMU= +github.com/aws/aws-sdk-go-v2/service/sts v1.1.1 h1:TJoIfnIFubCX0ACVeJ0w46HEH5MwjwYN4iFhuYIhfIY= +github.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxqTCJGUfYTWXrrBwkq736bM= +github.com/aws/aws-sdk-go-v2/service/swf v1.1.1 h1:EStZ7gUWjg5++OVEZu3xjfIkD8hD4dGqV+9EwHtjfDo= +github.com/aws/aws-sdk-go-v2/service/swf v1.1.1/go.mod h1:bbRKpQC4O12+BLlo6k67OyXWeJB8jWQwcmmKLrJgQVQ= +github.com/aws/aws-sdk-go-v2/service/synthetics v1.1.1 h1:i3NDvTMRfBgD0TJSH3EuWBxwQVGYect//ukvdjLiCcY= +github.com/aws/aws-sdk-go-v2/service/synthetics v1.1.1/go.mod h1:ScvXdDGp+xdreKBn3pazUIpep6+QYFI4HUEXzUvYDB4= +github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.2.1 h1:ia1bAGBQ/uY6ZRbRAAh7FdAtS97nY+CuYilrGCWt/PA= +github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.2.1/go.mod h1:dZMLLtiDpurD+qb0UeTwsYiibma7KK/1dB5oQqD4mus= +github.com/aws/aws-sdk-go-v2/service/transfer v1.1.1 h1:iTc3hZxwl/+BvFPmqGHEKRQ+KGttzlHkH4M+mVDbmgQ= +github.com/aws/aws-sdk-go-v2/service/transfer v1.1.1/go.mod h1:EJMwStspHULDeWbMr9qhMXzdS6UDKPJTiB+V0zfrJVc= +github.com/aws/aws-sdk-go-v2/service/waf v1.1.1 h1:ttI5GZs4+1gUrjkO9ghNbu1TQ2jyO3DloZ8DRozl0VQ= +github.com/aws/aws-sdk-go-v2/service/waf v1.1.1/go.mod h1:aSpFbfXuliA/KIQ6EfxYRXSJlnXpMfwUEPY7v5XtABw= +github.com/aws/aws-sdk-go-v2/service/wafregional v1.1.1 h1:4UytI/MUBqd9Be5DgWXwWuzSRvbt6S4B5toSgbAZlEw= +github.com/aws/aws-sdk-go-v2/service/wafregional v1.1.1/go.mod h1:rcc9EDUl/wpNAF+7AvKKh/r2fP6kpl8buDxwQ5Ep6ak= +github.com/aws/aws-sdk-go-v2/service/wafv2 v1.1.1 h1:slKX84cVFG5zMfeWUhoP2+Z2ahrjvp7QqDFwRpRlkxk= +github.com/aws/aws-sdk-go-v2/service/wafv2 v1.1.1/go.mod h1:xOuEc07Ci0Qi7jhQYYRbf9N2O1OuJs8cXQdLln7gYvM= +github.com/aws/aws-sdk-go-v2/service/worklink v1.1.1 h1:3fNP3rAfsPLLuWHGOP2O3C6IwLkcm5hMDrHgNPW3Z3c= +github.com/aws/aws-sdk-go-v2/service/worklink v1.1.1/go.mod h1:1D3XdcN9A/9FjNJ0uMWLUYQIG9NIjVl2xXAc/FXZY7I= +github.com/aws/aws-sdk-go-v2/service/workspaces v1.1.1 h1:QXIL9UoGbmATmspJ8v+OMp4er7K/q8ZQ5O0/iyfAG2w= +github.com/aws/aws-sdk-go-v2/service/workspaces v1.1.1/go.mod h1:/EpCu/KcalvPnsyM8zYgXCQ+dStC43HbtCO0hInHZP8= +github.com/aws/aws-sdk-go-v2/service/xray v1.1.1 h1:KdBCrnM+HnMW/On4O6EQ9OhiM3Fz0hrpvMhzIRY1/eY= +github.com/aws/aws-sdk-go-v2/service/xray v1.1.1/go.mod h1:yXqbCaS1hC9CrShJsTrshudAvR/pspjeIRDbMpPRrC0= +github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= +github.com/aws/smithy-go v1.2.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/aws/smithy-go v1.4.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/aws/smithy-go v1.9.1 h1:5vetTooLk4hPWV8q6ym6+lXKAT1Urnm49YkrRKo2J8o= +github.com/aws/smithy-go v1.9.1/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I= github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -155,7 +439,6 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= -github.com/disneystreaming/go-ssmhelpers v0.2.1 h1:vdYa3NPnPgB4QaqA6yZ030DLaQqrmRrkyMZ/x8vFWag= github.com/disneystreaming/go-ssmhelpers v0.2.1/go.mod h1:1DzuN6mMT/+m+944fuHkN+L+BH/O4nHQXJh7iv1t6t4= github.com/dnaeon/go-vcr v0.0.0-20180920040454-5637cf3d8a31/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= @@ -183,14 +466,13 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= +github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= +github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/go-errors/errors v1.0.2-0.20180813162953-d98b870cc4e0 h1:skJKxRtNmevLqnayafdLe2AsenqRupVmzZSqrvb5caU= github.com/go-errors/errors v1.0.2-0.20180813162953-d98b870cc4e0/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= @@ -237,7 +519,6 @@ github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+ github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.4 h1:87PNWwrRvUSnqS4dlcBU/ftvOIBep4sYuBLlh6rX2wk= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= @@ -247,8 +528,10 @@ github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-containerregistry v0.0.0-20200110202235-f4fb41bf00a3/go.mod h1:2wIuQute9+hhWqvL3vEI7YB0EKluF4WcPzI1eAliazk= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= @@ -335,8 +618,9 @@ github.com/hashicorp/hil v0.0.0-20190212112733-ab17b08d6590 h1:2yzhWGdgQUWZUCNK+ github.com/hashicorp/hil v0.0.0-20190212112733-ab17b08d6590/go.mod h1:n2TSygSNwsLJ76m8qFXTSc7beTb+auJxYdqrnoqwZWE= github.com/hashicorp/memberlist v0.1.0/go.mod h1:ncdBp14cuox2iFOq3kDiquKU6fqsTBc3W6JvZwjxxsE= github.com/hashicorp/serf v0.0.0-20160124182025-e4ec8cc423bb/go.mod h1:h/Ru6tmZazX7WO/GDmwdpS975F019L4t5ng5IgwbNrE= -github.com/hashicorp/terraform v0.12.28 h1:mBA+A9dvMXk1xDpflKEP5mL/KOD0sXap+M4F4Vlgnvc= github.com/hashicorp/terraform v0.12.28/go.mod h1:CBxNAiTW0pLap44/3GU4j7cYE2bMhkKZNlHPcr4P55U= +github.com/hashicorp/terraform v0.12.31 h1:df2bOxAOaR2r8kDfkqNlNk4anH2DjkPwJ4K7mEwUd9M= +github.com/hashicorp/terraform v0.12.31/go.mod h1:CBxNAiTW0pLap44/3GU4j7cYE2bMhkKZNlHPcr4P55U= github.com/hashicorp/terraform-config-inspect v0.0.0-20191212124732-c6ae6269b9d7 h1:Pc5TCv9mbxFN6UVX0LH6CpQrdTM5YjbVI2w15237Pjk= github.com/hashicorp/terraform-config-inspect v0.0.0-20191212124732-c6ae6269b9d7/go.mod h1:p+ivJws3dpqbp1iP84+npOyAmTTOLMgCzrXd3GSdn/A= github.com/hashicorp/terraform-svchost v0.0.0-20191011084731-65d371908596 h1:hjyO2JsNZUKT1ym+FAdlBEkGPevazYsmVgIMw7dVELg= @@ -350,16 +634,22 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1: github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jckuester/awsls v0.8.1 h1:k329Ey/odG/hdbTiubvGHFxIEVRpL1KLNTOaO8P+Eow= -github.com/jckuester/awsls v0.8.1/go.mod h1:PfviZPTqz64c9EfNj6b1ygggheRl51JrJWT7R3z+2BQ= -github.com/jckuester/terradozer v0.1.3 h1:xrRxr+L58QAVz5Kwq2fyWCNiK1NWOuKo8g5Q2664WZ4= +github.com/jckuester/awsls v0.8.2/go.mod h1:yn+/A3rsO+71qjLZ/9A0yYa7Jw34zLLpBEqHa0mthYo= +github.com/jckuester/awsls v0.8.3/go.mod h1:U0clHlW/c05kB1Cb4qO5pwGjxtR1CeHpgUzHhhI93CE= +github.com/jckuester/awsls v0.11.1-0.20211024194801-688a8938b1b3 h1:lhkWIhjaHzL44QpQMkgLoYwWW3e0zOKtyE9knbptvio= +github.com/jckuester/awsls v0.11.1-0.20211024194801-688a8938b1b3/go.mod h1:t0xkzM5/0wz1JcvIQ489W5IOmtgpPotW4jlXEGpO2Mw= +github.com/jckuester/awstools-lib v0.0.0-20210215194522-14607cce3470/go.mod h1:71+ozVxBDbhfKZH5ybJVxWo+mO1SVfpGiLfwXU5qD/w= +github.com/jckuester/awstools-lib v0.0.0-20210220131009-cbbff634aac8/go.mod h1:VnXw3pHiRaNKPzypiBk+814DUarSyNBExo5D4y77G7o= +github.com/jckuester/awstools-lib v0.0.0-20210524191941-23f0e367139d h1:ZG0iMdTi2ofFcAZ/IYLYsNe5/vqUaxmRkA35MbY3Fnw= +github.com/jckuester/awstools-lib v0.0.0-20210524191941-23f0e367139d/go.mod h1:183IKDoURr0g8Sg/7mcz50KlJt0S/0TEFqK7RXV3giM= github.com/jckuester/terradozer v0.1.3/go.mod h1:ER3EJojZmO2u6lfcdgnmC+Nrg/TV2T2bacY5FZpqgks= +github.com/jckuester/terradozer v0.1.4-0.20210524132110-395dc12d3bf5/go.mod h1:KqjvtGWVGzRw5yFdbcO9c74s5hlKjU6IMqfFd7PhOr4= +github.com/jckuester/terradozer v0.1.4-0.20210524190016-3e6d42479316 h1:Zm8WQUYMxmcSU0I7TpxropiArVT2BhX9T1XtGhQoPts= +github.com/jckuester/terradozer v0.1.4-0.20210524190016-3e6d42479316/go.mod h1:KqjvtGWVGzRw5yFdbcO9c74s5hlKjU6IMqfFd7PhOr4= github.com/jhump/protoreflect v1.6.0 h1:h5jfMVslIg6l29nsMs0D8Wj17RDVdNYti0vDN/PZZoE= github.com/jhump/protoreflect v1.6.0/go.mod h1:eaTn3RZAmMBcV0fifFvlm6VHNz3wSkYyXYWUh7ymB74= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.3.0 h1:OS12ieG61fsCg5+qLJ+SsW9NicxNkg3b25OyT2yCeUc= github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -387,8 +677,9 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= @@ -417,15 +708,17 @@ github.com/masterzen/winrm v0.0.0-20190223112901-5e5c9a7fe54b/go.mod h1:wr1VqkwW github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= -github.com/mattn/go-isatty v0.0.11 h1:FxPOTFNqGkuDUGi3H/qkUbQO4ZiBa2brKq5r0l8TGeM= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-shellwords v1.0.4/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= @@ -563,13 +856,18 @@ github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRci github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/svanharmelen/jsonapi v0.0.0-20180618144545-0c0828c3f16d/go.mod h1:BSTlc8jOjh0niykqEGVXOLXdi9o0r0kR8tCYiMvjFgw= github.com/tencentcloud/tencentcloud-sdk-go v3.0.82+incompatible/go.mod h1:0PfYow01SHPMhKY31xa+EFz2RStxIqj6JFAJS+IkCi4= github.com/tencentyun/cos-go-sdk-v5 v0.0.0-20190808065407-f07404cefc8c/go.mod h1:wk2XFUg6egk4tSDNZtXeKfe2G6690UVyt163PuUxBZk= github.com/terraform-providers/terraform-provider-openstack v1.15.0/go.mod h1:2aQ6n/BtChAl1y2S60vebhyJyZXBsuAI5G4+lHrT1Ew= github.com/tj/assert v0.0.0-20171129193455-018094318fb0/go.mod h1:mZ9/Rh9oLWpLLDRpvE+3b7gP/C2YyLFYxNmcLnPTMe0= +github.com/tj/assert v0.0.3 h1:Df/BlaZ20mq6kuai7f5z2TvPFiwC3xaWJSDQNiIS3Rk= +github.com/tj/assert v0.0.3/go.mod h1:Ne6X72Q+TB1AteidzQncjw9PabbMp4PBMZ1k+vd1Pvk= +github.com/tj/go-buffer v1.1.0/go.mod h1:iyiJpfFcR2B9sXu7KvjbT9fpM4mOelRSDTbntVj52Uc= github.com/tj/go-elastic v0.0.0-20171221160941-36157cbbebc2/go.mod h1:WjeM0Oo1eNAjXGDx2yma7uG2XoyRZTq1uv3M/o7imD0= github.com/tj/go-kinesis v0.0.0-20171128231115-08b17f58cb1b/go.mod h1:/yhzCV0xPfx6jb1bBgRFjl5lytqVqZXEaeqWP8lTEao= github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= @@ -585,6 +883,10 @@ github.com/vdemeester/k8s-pkg-credentialprovider v0.0.0-20200107171650-7c61ffa44 github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack v4.0.1+incompatible h1:RMF1enSPeKTlXrXdOcqjFUElywVZjjC6pqse21bKbEU= github.com/vmihailenco/msgpack v4.0.1+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= +github.com/vmihailenco/msgpack/v4 v4.3.12 h1:07s4sz9IReOgdikxLTKNbBdqDMLsjPKXwvCazn8G65U= +github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= +github.com/vmihailenco/tagparser v0.1.1 h1:quXMXlA39OCbd2wAdTsGDlK9RkOk6Wuw+x37wVyIuWY= +github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/vmware/govmomi v0.20.3/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU= github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4= github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= @@ -594,10 +896,10 @@ github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1: github.com/zclconf/go-cty v1.0.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= github.com/zclconf/go-cty v1.1.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= -github.com/zclconf/go-cty v1.2.1 h1:vGMsygfmeCl4Xb6OA5U5XVAaQZ69FvoG7X2jUtQujb8= github.com/zclconf/go-cty v1.2.1/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= -github.com/zclconf/go-cty v1.4.0 h1:+q+tmgyUB94HIdH/uVTIi/+kt3pt4sHwEZAcTyLoGsQ= github.com/zclconf/go-cty v1.4.0/go.mod h1:nHzOclRkoj++EU9ZjSrZvRG0BXIWt8c7loYc0qXAFGQ= +github.com/zclconf/go-cty v1.7.1 h1:AvsC01GMhMLFL8CgEYdHGM+yLnnDOwhPAYcgTkeF0Gw= +github.com/zclconf/go-cty v1.7.1/go.mod h1:VDR4+I79ubFBGm1uJac1226K5yANQFHeauxPBoP54+o= github.com/zclconf/go-cty-yaml v1.0.1 h1:up11wlgAaDvlAGENcFDnZgkn0qUJurso7k6EpURKNF8= github.com/zclconf/go-cty-yaml v1.0.1/go.mod h1:IP3Ylp0wQpYm50IHK8OZWKMu6sPJIUgKa8XhiVHura0= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= @@ -624,10 +926,10 @@ golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200109152110-61a87790db17 h1:nVJ3guKA9qdkEQ3TUdXI9QSINo2CUPM/cySEvw2w8I0= golang.org/x/crypto v0.0.0-20200109152110-61a87790db17/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37 h1:cg5LA/zNPRzIXIWSCxQW10Rvpy94aQh3LT/ShoCpkHw= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -675,10 +977,11 @@ golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191009170851-d66e71096ffb/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2 h1:CCH4IOTTfewWjGOlSp+zGcjutRKlBEZQ6wTn8ozI/nI= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -723,14 +1026,18 @@ golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191110163157-d32e6e3b99c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200107162124-548cf772de50 h1:YvQ10rzcqWXLlJZ3XCUoO25savxmscf4+SC+ZqiCHhA= golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -801,14 +1108,14 @@ google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ij google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= -google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1 h1:zvIju4sqAGvwKspUQOhwnpcqSbzi7/H6QomNNjTL4sk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= @@ -829,6 +1136,9 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c h1:grhR+C34yXImVGp7EzNk+DTIk+323eIUWOmEevy6bDo= +gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/internal/confirm.go b/internal/confirm.go index 12fdb756d..0e8e4d4ce 100644 --- a/internal/confirm.go +++ b/internal/confirm.go @@ -8,12 +8,7 @@ import ( ) // UserConfirmedDeletion asks the user to confirm deletion of resources -func UserConfirmedDeletion(r io.Reader, force bool) bool { - if force { - LogTitle("user will not be asked for confirmation (force mode)") - return true - } - +func UserConfirmedDeletion(r io.Reader) bool { log.Info("Are you sure you want to delete these resources (cannot be undone)? Only YES will be accepted.") fmt.Print(fmt.Sprintf("%23v", "Enter a value: ")) diff --git a/internal/confirm_test.go b/internal/confirm_test.go index 16224e0ea..cb5ca4bd5 100644 --- a/internal/confirm_test.go +++ b/internal/confirm_test.go @@ -24,15 +24,10 @@ func TestUserConfirmedDeletion(t *testing.T) { name: "confirmed with yes", userInput: "yes", }, - { - name: "force mode", - force: true, - expectedConfirmation: true, - }, } for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { - actualConfirmation := internal.UserConfirmedDeletion(strings.NewReader(tc.userInput), tc.force) + actualConfirmation := internal.UserConfirmedDeletion(strings.NewReader(tc.userInput)) assert.Equal(t, tc.expectedConfirmation, actualConfirmation) }) } diff --git a/main.go b/main.go index 9b6acc2b7..fbca32204 100644 --- a/main.go +++ b/main.go @@ -1,17 +1,21 @@ package main import ( + "context" + "errors" "fmt" "io/ioutil" stdlog "log" "os" + "os/signal" "strings" "time" "github.com/apex/log" "github.com/apex/log/handlers/cli" "github.com/fatih/color" - "github.com/jckuester/awsls/util" + "github.com/jckuester/awstools-lib/aws" + "github.com/jckuester/awstools-lib/terraform" "github.com/jckuester/awsweeper/internal" "github.com/jckuester/awsweeper/pkg/resource" terradozerRes "github.com/jckuester/terradozer/pkg/resource" @@ -48,11 +52,11 @@ func mainExitCode() int { flags.BoolVar(&version, "version", false, "Show application version") flags.BoolVar(&force, "force", false, "Delete without asking for confirmation") flags.StringVar(&timeout, "timeout", "30s", "Amount of time to wait for a destroy of a resource to finish") - //maxRetries := set.Int("max-retries", 25, "The maximum number of times an AWS API request is being executed") err := flags.Parse(os.Args[1:]) if err != nil { - // the Parse function prints already an error + help message, so we don't want to output it here again + // the Parse() function prints already an error + help message, + // so we don't want to output it here again log.WithError(err).Debug("failed to parse command line arguments") return 1 } @@ -126,23 +130,44 @@ func mainExitCode() int { return 1 } - clients, err := util.NewAWSClientPool(profiles, regions) + ctx := context.Background() + + clients, err := aws.NewClientPool(ctx, profiles, regions) if err != nil { fmt.Fprint(os.Stderr, color.RedString("\nError: %s\n", err)) return 1 } - clientKeys := make([]util.AWSClientKey, 0, len(clients)) + // trap Ctrl+C and call cancel on the context + ctx, cancel := context.WithCancel(ctx) + signalCh := make(chan os.Signal, 1) + signal.Notify(signalCh, ignoreSignals...) + signal.Notify(signalCh, forwardSignals...) + defer func() { + signal.Stop(signalCh) + cancel() + }() + go func() { + select { + case <-signalCh: + fmt.Fprint(os.Stderr, color.RedString("\nAborting...\n")) + cancel() + case <-ctx.Done(): + } + }() + + clientKeys := make([]aws.ClientKey, 0, len(clients)) for k := range clients { clientKeys = append(clientKeys, k) } // initialize a Terraform AWS provider for each AWS client with a matching config - providers, err := util.NewProviderPool(clientKeys, "v3.16.0", "~/.awsweeper", timeoutDuration) + providers, err := terraform.NewProviderPool(ctx, clientKeys, "v3.42.0", "~/.awsweeper", timeoutDuration) if err != nil { - fmt.Fprint(os.Stderr, color.RedString("\nError: %s\n", err)) - + if !errors.Is(err, context.Canceled) { + fmt.Fprint(os.Stderr, color.RedString("\nError: %s\n", err)) + } return 1 } @@ -153,18 +178,49 @@ func mainExitCode() int { }() internal.LogTitle("showing resources that would be deleted (dry run)") - resources := resource.List(filter, clients, providers, outputType) + var resources []terradozerRes.DestroyableResource + + resourcesCh := make(chan []terradozerRes.DestroyableResource, 1) + go func() { + resourcesCh <- resource.List(context.Background(), filter, clients, providers, outputType) + }() + select { + case <-ctx.Done(): + return 1 + case result := <-resourcesCh: + resources = result + } + + doneDelete := make(chan bool, 1) + go func() { + delete(resources, force, dryRun, parallel, doneDelete) + }() + select { + case <-ctx.Done(): + return 0 + case <-doneDelete: + } + return 0 +} + +func delete(resources []terradozerRes.DestroyableResource, force bool, dryRun bool, parallel int, done chan bool) { if len(resources) == 0 { internal.LogTitle("no resources found to delete") - return 0 + done <- true + return } internal.LogTitle(fmt.Sprintf("total number of resources that would be deleted: %d", len(resources))) if !dryRun { - if !internal.UserConfirmedDeletion(os.Stdin, force) { - return 0 + if !force { + if !internal.UserConfirmedDeletion(os.Stdin) { + done <- true + return + } + } else { + internal.LogTitle("Proceeding with deletion and skipping confirmation (force)") } internal.LogTitle("Starting to delete resources") @@ -174,7 +230,7 @@ func mainExitCode() int { internal.LogTitle(fmt.Sprintf("total number of deleted resources: %d", numDeletedResources)) } - return 0 + done <- true } func printHelp(fs *flag.FlagSet) { diff --git a/pkg/resource/filter.go b/pkg/resource/filter.go index 558b91f0c..6a9878595 100644 --- a/pkg/resource/filter.go +++ b/pkg/resource/filter.go @@ -11,8 +11,8 @@ import ( "time" "github.com/apex/log" - awsls "github.com/jckuester/awsls/aws" "github.com/jckuester/awsls/resource" + "github.com/jckuester/awstools-lib/terraform" "gopkg.in/yaml.v2" ) @@ -125,7 +125,7 @@ func (f TypeFilter) MatchTagged(tags map[string]string) bool { return false } -// MatchesTags checks whether a resource's tag set matches the filter. +// MatchTags checks whether a resource's tag set matches the filter. func (f TypeFilter) MatchTags(tags map[string]string) bool { return f.matchIncludedTags(tags) && f.matchExcludedTags(tags) } @@ -238,7 +238,7 @@ func (f TypeFilter) matchCreated(creationTime *time.Time) bool { } // Match checks whether a resource matches the filter criteria. -func (f Filter) Match(r awsls.Resource) bool { +func (f Filter) Match(r terraform.Resource) bool { resTypeFilters, found := f[r.Type] if !found { return false diff --git a/pkg/resource/list.go b/pkg/resource/list.go index 9ede48444..b9d835bdf 100644 --- a/pkg/resource/list.go +++ b/pkg/resource/list.go @@ -14,32 +14,36 @@ import ( "github.com/fatih/color" awsls "github.com/jckuester/awsls/aws" awslsRes "github.com/jckuester/awsls/resource" - "github.com/jckuester/awsls/util" + "github.com/jckuester/awstools-lib/aws" + "github.com/jckuester/awstools-lib/terraform" "github.com/jckuester/terradozer/pkg/provider" terradozerRes "github.com/jckuester/terradozer/pkg/resource" "github.com/zclconf/go-cty/cty" "gopkg.in/yaml.v2" ) -func List(filter *Filter, clients map[util.AWSClientKey]awsls.Client, - providers map[util.AWSClientKey]provider.TerraformProvider, outputType string) []terradozerRes.DestroyableResource { +func List(ctx context.Context, filter *Filter, clients map[aws.ClientKey]aws.Client, + providers map[aws.ClientKey]provider.TerraformProvider, outputType string) []terradozerRes.DestroyableResource { var destroyableRes []terradozerRes.DestroyableResource for _, rType := range filter.Types() { for key, client := range clients { - err := client.SetAccountID() + err := client.SetAccountID(ctx) if err != nil { log.WithError(err).Fatal("failed to set account ID") continue } - resources, err := awsls.ListResourcesByType(&client, rType) + resources, err := awsls.ListResourcesByType(ctx, &client, rType) if err != nil { log.WithError(err).Fatal("failed to list awsls supported resources") continue } - resourcesWithStates := awslsRes.GetStates(resources, providers) + resourcesWithStates, errs := terraform.UpdateStates(resources, providers, 10, true) + for _, err := range errs { + fmt.Fprint(os.Stderr, color.RedString("Error %s: %s\n", rType, err)) + } filteredRes := filter.Apply(resourcesWithStates) print(filteredRes, outputType) @@ -48,10 +52,10 @@ func List(filter *Filter, clients map[util.AWSClientKey]awsls.Client, switch rType { case "aws_iam_user": - attachedPolicies := getAttachedUserPolicies(filteredRes, client, &p) + attachedPolicies := getAttachedUserPolicies(ctx, filteredRes, client, &p) print(attachedPolicies, outputType) - inlinePolicies := getInlineUserPolicies(filteredRes, client, &p) + inlinePolicies := getInlineUserPolicies(ctx, filteredRes, client, &p) print(inlinePolicies, outputType) filteredRes = append(filteredRes, attachedPolicies...) @@ -63,7 +67,7 @@ func List(filter *Filter, clients map[util.AWSClientKey]awsls.Client, filteredRes = append(filteredRes, policyAttachments...) case "aws_efs_file_system": - mountTargets := getEfsMountTargets(filteredRes, client, &p) + mountTargets := getEfsMountTargets(ctx, filteredRes, client, &p) print(mountTargets, outputType) filteredRes = append(filteredRes, mountTargets...) @@ -78,21 +82,24 @@ func List(filter *Filter, clients map[util.AWSClientKey]awsls.Client, return destroyableRes } -func getAttachedUserPolicies(users []awsls.Resource, client awsls.Client, - provider *provider.TerraformProvider) []awsls.Resource { - var result []awsls.Resource +func getAttachedUserPolicies(ctx context.Context, users []terraform.Resource, client aws.Client, + provider *provider.TerraformProvider) []terraform.Resource { + var result []terraform.Resource for _, user := range users { - req := client.Iamconn.ListAttachedUserPoliciesRequest(&iam.ListAttachedUserPoliciesInput{ + pg := iam.NewListAttachedUserPoliciesPaginator(client.Iamconn, &iam.ListAttachedUserPoliciesInput{ UserName: &user.ID, }) - pg := iam.NewListAttachedUserPoliciesPaginator(req) - for pg.Next(context.Background()) { - page := pg.CurrentPage() + for pg.HasMorePages() { + page, err := pg.NextPage(ctx) + if err != nil { + fmt.Fprint(os.Stderr, color.RedString("Error: %s\n", err)) + continue + } for _, attachedPolicy := range page.AttachedPolicies { - r := awsls.Resource{ + r := terraform.Resource{ Type: "aws_iam_user_policy_attachment", ID: *attachedPolicy.PolicyArn, } @@ -111,31 +118,29 @@ func getAttachedUserPolicies(users []awsls.Resource, client awsls.Client, result = append(result, r) } } - - if err := pg.Err(); err != nil { - fmt.Fprint(os.Stderr, color.RedString("Error: %s\n", err)) - continue - } } return result } -func getInlineUserPolicies(users []awsls.Resource, client awsls.Client, - provider *provider.TerraformProvider) []awsls.Resource { - var result []awsls.Resource +func getInlineUserPolicies(ctx context.Context, users []terraform.Resource, client aws.Client, + provider *provider.TerraformProvider) []terraform.Resource { + var result []terraform.Resource for _, user := range users { - req := client.Iamconn.ListUserPoliciesRequest(&iam.ListUserPoliciesInput{ + pg := iam.NewListUserPoliciesPaginator(client.Iamconn, &iam.ListUserPoliciesInput{ UserName: &user.ID, }) - pg := iam.NewListUserPoliciesPaginator(req) - for pg.Next(context.Background()) { - page := pg.CurrentPage() + for pg.HasMorePages() { + page, err := pg.NextPage(ctx) + if err != nil { + fmt.Fprint(os.Stderr, color.RedString("Error: %s\n", err)) + continue + } for _, inlinePolicy := range page.PolicyNames { - r := awsls.Resource{ + r := terraform.Resource{ Type: "aws_iam_user_policy", ID: user.ID + ":" + inlinePolicy, } @@ -151,18 +156,13 @@ func getInlineUserPolicies(users []awsls.Resource, client awsls.Client, result = append(result, r) } } - - if err := pg.Err(); err != nil { - fmt.Fprint(os.Stderr, color.RedString("Error: %s\n", err)) - continue - } } return result } -func getPolicyAttachments(policies []awsls.Resource, provider *provider.TerraformProvider) []awsls.Resource { - var result []awsls.Resource +func getPolicyAttachments(policies []terraform.Resource, provider *provider.TerraformProvider) []terraform.Resource { + var result []terraform.Resource for _, policy := range policies { arn, err := awslsRes.GetAttribute("arn", &policy) @@ -171,7 +171,7 @@ func getPolicyAttachments(policies []awsls.Resource, provider *provider.Terrafor continue } - r := awsls.Resource{ + r := terraform.Resource{ Type: "aws_iam_policy_attachment", // Note: ID is only set for pretty printing (could be also left empty) ID: policy.ID, @@ -193,24 +193,23 @@ func getPolicyAttachments(policies []awsls.Resource, provider *provider.Terrafor return result } -func getEfsMountTargets(efsFileSystems []awsls.Resource, client awsls.Client, - provider *provider.TerraformProvider) []awsls.Resource { - var result []awsls.Resource +func getEfsMountTargets(ctx context.Context, efsFileSystems []terraform.Resource, client aws.Client, + provider *provider.TerraformProvider) []terraform.Resource { + var result []terraform.Resource for _, fs := range efsFileSystems { // TODO result is paginated, but there is no paginator API function - req := client.Efsconn.DescribeMountTargetsRequest(&efs.DescribeMountTargetsInput{ + req, err := client.Efsconn.DescribeMountTargets(ctx, &efs.DescribeMountTargetsInput{ FileSystemId: &fs.ID, }) - resp, err := req.Send(context.Background()) if err != nil { fmt.Fprint(os.Stderr, color.RedString("Error: %s\n", err)) continue } - for _, mountTarget := range resp.MountTargets { - r := awsls.Resource{ + for _, mountTarget := range req.MountTargets { + r := terraform.Resource{ Type: "aws_efs_mount_target", ID: *mountTarget.MountTargetId, } @@ -230,7 +229,7 @@ func getEfsMountTargets(efsFileSystems []awsls.Resource, client awsls.Client, return result } -func print(res []awsls.Resource, outputType string) { +func print(res []terraform.Resource, outputType string) { if len(res) == 0 { return } @@ -247,7 +246,7 @@ func print(res []awsls.Resource, outputType string) { } } -func printString(res []awsls.Resource) { +func printString(res []terraform.Resource) { fmt.Printf("\n\t---\n\tType: %s\n\tFound: %d\n\n", res[0].Type, len(res)) for _, r := range res { @@ -275,7 +274,7 @@ func printString(res []awsls.Resource) { fmt.Print("\t---\n\n") } -func printJson(res []awsls.Resource) { +func printJson(res []terraform.Resource) { b, err := json.Marshal(res) if err != nil { log.WithError(err).Fatal("failed to marshal resources into JSON") @@ -284,7 +283,7 @@ func printJson(res []awsls.Resource) { fmt.Print(string(b)) } -func printYaml(res []awsls.Resource) { +func printYaml(res []terraform.Resource) { b, err := yaml.Marshal(res) if err != nil { log.WithError(err).Fatal("failed to marshal resources into YAML") diff --git a/pkg/resource/select.go b/pkg/resource/select.go index cb53c4db0..bb962fc41 100644 --- a/pkg/resource/select.go +++ b/pkg/resource/select.go @@ -4,13 +4,13 @@ import ( "fmt" "github.com/apex/log" - awsls "github.com/jckuester/awsls/aws" + "github.com/jckuester/awstools-lib/terraform" "github.com/zclconf/go-cty/cty" "github.com/zclconf/go-cty/cty/gocty" ) // Apply applies the filter to the given resources. -func (f Filter) Apply(res []awsls.Resource) []awsls.Resource { +func (f Filter) Apply(res []terraform.Resource) []terraform.Resource { for i, r := range res { tags, err := GetTags(&r) if err != nil { @@ -25,7 +25,7 @@ func (f Filter) Apply(res []awsls.Resource) []awsls.Resource { res[i].Tags = tags } - var result []awsls.Resource + var result []terraform.Resource for _, r := range res { if f.Match(r) { @@ -36,7 +36,7 @@ func (f Filter) Apply(res []awsls.Resource) []awsls.Resource { return result } -func GetTags(r *awsls.Resource) (map[string]string, error) { +func GetTags(r *terraform.Resource) (map[string]string, error) { if r == nil || r.UpdatableResource == nil { return nil, fmt.Errorf("resource is nil: %+v", r) } @@ -56,6 +56,10 @@ func GetTags(r *awsls.Resource) (map[string]string, error) { return nil, fmt.Errorf("attribute not found: tags") } + if attrValue.IsNull() { + return nil, fmt.Errorf("attribute is null value") + } + switch attrValue.Type() { case cty.Map(cty.String): var v map[string]string diff --git a/pkg/resource/select_test.go b/pkg/resource/select_test.go index 3f2990df7..88c951bcd 100644 --- a/pkg/resource/select_test.go +++ b/pkg/resource/select_test.go @@ -6,7 +6,7 @@ import ( "time" "github.com/aws/aws-sdk-go-v2/aws" - awsls "github.com/jckuester/awsls/aws" + "github.com/jckuester/awstools-lib/terraform" "github.com/jckuester/awsweeper/pkg/resource" terradozerRes "github.com/jckuester/terradozer/pkg/resource" "github.com/stretchr/testify/assert" @@ -18,7 +18,7 @@ func TestYamlFilter_Apply_EmptyConfig(t *testing.T) { //given f := &resource.Filter{} - res := []awsls.Resource{ + res := []terraform.Resource{ { Type: "aws_instance", ID: "foo", @@ -37,7 +37,7 @@ func TestYamlFilter_Apply_FilterAll(t *testing.T) { f := &resource.Filter{ "aws_instance": {}, } - res := []awsls.Resource{ + res := []terraform.Resource{ { Type: "aws_instance", ID: "foo", @@ -63,7 +63,7 @@ func TestYamlFilter_Apply_FilterByID(t *testing.T) { } // when - res := []awsls.Resource{ + res := []terraform.Resource{ { Type: "aws_instance", ID: "select-this", @@ -93,7 +93,7 @@ func TestYamlFilter_Apply_FilterByTag(t *testing.T) { }, } - res := []awsls.Resource{ + res := []terraform.Resource{ { Type: "aws_instance", ID: "select-this", @@ -135,7 +135,7 @@ func TestYamlFilter_Apply_FilterByMultipleTags(t *testing.T) { }, } - res := []awsls.Resource{ + res := []terraform.Resource{ { Type: "aws_instance", ID: "select-this", @@ -174,7 +174,7 @@ func TestYamlFilter_Apply_FilterByIDandTag(t *testing.T) { }, } - res := []awsls.Resource{ + res := []terraform.Resource{ { Type: "aws_instance", ID: "foo", @@ -216,7 +216,7 @@ func TestYamlFilter_Apply_Created(t *testing.T) { }, } - res := []awsls.Resource{ + res := []terraform.Resource{ { Type: "aws_instance", ID: "foo", @@ -263,7 +263,7 @@ func TestYamlFilter_Apply_CreatedBefore(t *testing.T) { }, } - res := []awsls.Resource{ + res := []terraform.Resource{ { Type: "aws_instance", ID: "foo", @@ -300,7 +300,7 @@ func TestYamlFilter_Apply_CreatedAfter(t *testing.T) { }, } - res := []awsls.Resource{ + res := []terraform.Resource{ { Type: "aws_instance", ID: "foo", @@ -340,7 +340,7 @@ func TestYamlFilter_Apply_MultipleFiltersPerResourceType(t *testing.T) { }, } - res := []awsls.Resource{ + res := []terraform.Resource{ { Type: "aws_instance", ID: "select-this", @@ -388,7 +388,7 @@ func TestYamlFilter_Apply_NegatedStringFilter(t *testing.T) { }, } - res := []awsls.Resource{ + res := []terraform.Resource{ { Type: "aws_instance", ID: "select-this-not", @@ -416,7 +416,7 @@ func TestYamlFilter_Apply_NegatedStringFilter(t *testing.T) { func TestGetTags(t *testing.T) { tests := []struct { name string - arg *awsls.Resource + arg *terraform.Resource want map[string]string wantErr string }{ @@ -426,26 +426,26 @@ func TestGetTags(t *testing.T) { }, { name: "embedded updatable resource is nil", - arg: &awsls.Resource{}, + arg: &terraform.Resource{}, wantErr: "resource is nil: &{Type: ID: Region: Profile: AccountID: Tags:map[] CreatedAt: UpdatableResource:}", }, { name: "state is nil", - arg: &awsls.Resource{ + arg: &terraform.Resource{ UpdatableResource: &terradozerRes.Resource{}, }, wantErr: "state is nil: ", }, { name: "state is nil value", - arg: &awsls.Resource{ + arg: &terraform.Resource{ UpdatableResource: terradozerRes.NewWithState("aws_foo", "1234", nil, &cty.NilVal), }, wantErr: "state is nil: &{ty:{typeImpl:} v:}", }, { name: "null map", - arg: &awsls.Resource{ + arg: &terraform.Resource{ UpdatableResource: terradozerRes.NewWithState("aws_foo", "1234", nil, ctyValuePtr(cty.NullVal(cty.Map(cty.String)))), }, @@ -453,7 +453,7 @@ func TestGetTags(t *testing.T) { }, { name: "unhandled type", - arg: &awsls.Resource{ + arg: &terraform.Resource{ UpdatableResource: terradozerRes.NewWithState("aws_foo", "1234", nil, ctyValuePtr(cty.ObjectVal(map[string]cty.Value{ "tags": cty.StringVal("foo"), @@ -463,7 +463,7 @@ func TestGetTags(t *testing.T) { }, { name: "tags attribute not found", - arg: &awsls.Resource{ + arg: &terraform.Resource{ UpdatableResource: terradozerRes.NewWithState("aws_foo", "1234", nil, ctyValuePtr(cty.ObjectVal(map[string]cty.Value{ "tag": cty.StringVal("foo"), @@ -473,7 +473,7 @@ func TestGetTags(t *testing.T) { }, { name: "cannot iterate element", - arg: &awsls.Resource{ + arg: &terraform.Resource{ UpdatableResource: terradozerRes.NewWithState("aws_foo", "1234", nil, ctyValuePtr(cty.StringVal("foo"))), }, @@ -481,7 +481,7 @@ func TestGetTags(t *testing.T) { }, { name: "empty map of tags", - arg: &awsls.Resource{ + arg: &terraform.Resource{ UpdatableResource: terradozerRes.NewWithState("aws_foo", "1234", nil, ctyValuePtr(cty.ObjectVal(map[string]cty.Value{ "tags": cty.MapValEmpty(cty.String), @@ -491,7 +491,7 @@ func TestGetTags(t *testing.T) { }, { name: "some tags", - arg: &awsls.Resource{ + arg: &terraform.Resource{ UpdatableResource: terradozerRes.NewWithState("aws_foo", "1234", nil, ctyValuePtr(cty.ObjectVal(map[string]cty.Value{ "tags": cty.MapVal(map[string]cty.Value{"foo": cty.StringVal("bar")}), diff --git a/signal_unix.go b/signal_unix.go new file mode 100644 index 000000000..573964cfe --- /dev/null +++ b/signal_unix.go @@ -0,0 +1,11 @@ +// +build !windows + +package main + +import ( + "os" + "syscall" +) + +var ignoreSignals = []os.Signal{os.Interrupt} +var forwardSignals = []os.Signal{syscall.SIGTERM} diff --git a/signal_windows.go b/signal_windows.go new file mode 100644 index 000000000..ad1da298e --- /dev/null +++ b/signal_windows.go @@ -0,0 +1,10 @@ +// +build windows + +package main + +import ( + "os" +) + +var ignoreSignals = []os.Signal{os.Interrupt} +var forwardSignals []os.Signal diff --git a/test/autoscaling_group_test.go b/test/autoscaling_group_test.go index 22f4a6c9a..f3a53c15d 100644 --- a/test/autoscaling_group_test.go +++ b/test/autoscaling_group_test.go @@ -87,17 +87,17 @@ func assertAutoscalingGroupDeleted(t *testing.T, env EnvVars, id string) { } func autoscalingGroupExists(t *testing.T, env EnvVars, id string) bool { - req := env.AWSClient.Autoscalingconn.DescribeAutoScalingGroupsRequest( + req, err := env.AWSClient.Autoscalingconn.DescribeAutoScalingGroups( + context.Background(), &autoscaling.DescribeAutoScalingGroupsInput{ AutoScalingGroupNames: []string{id}, }) - resp, err := req.Send(context.Background()) if err != nil { t.Fatal(err) } - if len(resp.AutoScalingGroups) == 0 { + if len(req.AutoScalingGroups) == 0 { return false } diff --git a/test/cloudtrail_test.go b/test/cloudtrail_test.go index d6c723ae7..2db0ace17 100644 --- a/test/cloudtrail_test.go +++ b/test/cloudtrail_test.go @@ -79,16 +79,16 @@ func assertCloudTrailDeleted(t *testing.T, env EnvVars, id string) { } func cloudTrailExists(t *testing.T, env EnvVars, id string) bool { - req := env.AWSClient.Cloudtrailconn.DescribeTrailsRequest(&cloudtrail.DescribeTrailsInput{ - TrailNameList: []string{id}, - }) + req, err := env.AWSClient.Cloudtrailconn.DescribeTrails(context.Background(), + &cloudtrail.DescribeTrailsInput{ + TrailNameList: []string{id}, + }) - resp, err := req.Send(context.Background()) if err != nil { t.Fatal() } - if len(resp.TrailList) == 0 { + if len(req.TrailList) == 0 { return false } diff --git a/test/cloudwatch_log_group_test.go b/test/cloudwatch_log_group_test.go index a15ac109c..7218a1d99 100644 --- a/test/cloudwatch_log_group_test.go +++ b/test/cloudwatch_log_group_test.go @@ -7,7 +7,6 @@ import ( "testing" "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs" - "github.com/gruntwork-io/terratest/modules/terraform" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -80,17 +79,17 @@ func assertCloudWatchLogGroupDeleted(t *testing.T, env EnvVars, id string) { } func cloudWatchLogGroupExists(t *testing.T, env EnvVars, id string) bool { - req := env.AWSClient.Cloudwatchlogsconn.DescribeLogGroupsRequest( + req, err := env.AWSClient.Cloudwatchlogsconn.DescribeLogGroups( + context.Background(), &cloudwatchlogs.DescribeLogGroupsInput{ LogGroupNamePrefix: &id, }) - resp, err := req.Send(context.Background()) if err != nil { t.Fatal(err) } - if len(resp.LogGroups) == 0 { + if len(req.LogGroups) == 0 { return false } diff --git a/test/db_instance_test.go b/test/db_instance_test.go index e55cb6c8c..9a0cad266 100644 --- a/test/db_instance_test.go +++ b/test/db_instance_test.go @@ -2,13 +2,13 @@ package test import ( "context" + "errors" "fmt" "os" "testing" - "github.com/aws/aws-sdk-go-v2/aws/awserr" - "github.com/aws/aws-sdk-go-v2/service/rds" + "github.com/aws/smithy-go" "github.com/gruntwork-io/terratest/modules/terraform" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -18,7 +18,7 @@ func TestAcc_DBInstance_DeleteByID(t *testing.T) { if testing.Short() { t.Skip("Skipping acceptance test.") } - t.Skip("Only running from time to time, as this test costs money.") + t.Skip("Only running manually from time to time, as this test costs money.") env := InitEnv(t) @@ -36,7 +36,7 @@ func TestAcc_DBInstance_DeleteByID(t *testing.T) { writeConfigID(t, terraformDir, "aws_db_instance", id) defer os.Remove(terraformDir + "/config.yml") - logBuffer, err := runBinary(t, terraformDir, "YES\n", "--timeout", "5m") + logBuffer, err := runBinary(t, terraformDir, "YES\n", "--timeout", "10m") require.NoError(t, err) assertDBInstanceDeleted(t, env, id) @@ -48,7 +48,7 @@ func TestAcc_DBInstance_DeleteByTag(t *testing.T) { if testing.Short() { t.Skip("Skipping acceptance test.") } - t.Skip("Only running from time to time, as this test costs money.") + t.Skip("Only running manually from time to time, as this test costs money.") env := InitEnv(t) @@ -83,24 +83,23 @@ func assertDBInstanceDeleted(t *testing.T, env EnvVars, id string) { } func dbInstanceExists(t *testing.T, env EnvVars, id string) bool { - req := env.AWSClient.Rdsconn.DescribeDBInstancesRequest(&rds.DescribeDBInstancesInput{ - DBInstanceIdentifier: &id, - }) - - resp, err := req.Send(context.Background()) + req, err := env.AWSClient.Rdsconn.DescribeDBInstances(context.Background(), + &rds.DescribeDBInstancesInput{ + DBInstanceIdentifier: &id, + }) if err != nil { - awsErr, ok := err.(awserr.Error) - if !ok { + var ae smithy.APIError + if errors.As(err, &ae) { + if ae.ErrorCode() == "DBInstanceNotFound" { + return false + } t.Fatal(err) } - if awsErr.Code() == "DBInstanceNotFound" { - return false - } t.Fatal(err) } - if len(resp.DBInstances) == 0 { + if len(req.DBInstances) == 0 { return false } diff --git a/test/ebs_snapshot_test.go b/test/ebs_snapshot_test.go index 02cd20477..847a07b32 100644 --- a/test/ebs_snapshot_test.go +++ b/test/ebs_snapshot_test.go @@ -2,12 +2,13 @@ package test import ( "context" + "errors" "fmt" "os" "testing" - "github.com/aws/aws-sdk-go-v2/aws/awserr" "github.com/aws/aws-sdk-go-v2/service/ec2" + "github.com/aws/smithy-go" "github.com/gruntwork-io/terratest/modules/terraform" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -80,25 +81,24 @@ func assertEbsSnapshotDeleted(t *testing.T, env EnvVars, id string) { } func ebsSnapshotExists(t *testing.T, env EnvVars, id string) bool { - req := env.AWSClient.Ec2conn.DescribeSnapshotsRequest( + req, err := env.AWSClient.Ec2conn.DescribeSnapshots( + context.Background(), &ec2.DescribeSnapshotsInput{ SnapshotIds: []string{id}, }) - resp, err := req.Send(context.Background()) - if err != nil { - ec2err, ok := err.(awserr.Error) - if !ok { + var ae smithy.APIError + if errors.As(err, &ae) { + if ae.ErrorCode() == "InvalidSnapshot.NotFound" { + return false + } t.Fatal(err) } - if ec2err.Code() == "InvalidSnapshot.NotFound" { - return false - } t.Fatal(err) } - if len(resp.Snapshots) == 0 { + if len(req.Snapshots) == 0 { return false } diff --git a/test/ecs_cluster_test.go b/test/ecs_cluster_test.go index 045e8d184..17d818219 100644 --- a/test/ecs_cluster_test.go +++ b/test/ecs_cluster_test.go @@ -82,21 +82,21 @@ func assertEcsClusterDeleted(t *testing.T, env EnvVars, id string) { } func ecsClusterExists(t *testing.T, env EnvVars, id string) bool { - req := env.AWSClient.Ecsconn.DescribeClustersRequest( + req, err := env.AWSClient.Ecsconn.DescribeClusters( + context.Background(), &ecs.DescribeClustersInput{ Clusters: []string{id}, }) - resp, err := req.Send(context.Background()) if err != nil { t.Fatal(err) } - if len(resp.Clusters) == 0 { + if len(req.Clusters) == 0 { return false } - if *resp.Clusters[0].Status == "INACTIVE" { + if *req.Clusters[0].Status == "INACTIVE" { return false } diff --git a/test/elb_test.go b/test/elb_test.go index 1b130f224..bc92375a4 100644 --- a/test/elb_test.go +++ b/test/elb_test.go @@ -2,13 +2,13 @@ package test import ( "context" + "errors" "fmt" "os" "testing" - "github.com/aws/aws-sdk-go-v2/aws/awserr" - "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing" + "github.com/aws/smithy-go" "github.com/gruntwork-io/terratest/modules/terraform" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -81,25 +81,24 @@ func assertElbDeleted(t *testing.T, env EnvVars, id string) { } func elbExists(t *testing.T, env EnvVars, id string) bool { - req := env.AWSClient.Elasticloadbalancingconn.DescribeLoadBalancersRequest( + req, err := env.AWSClient.Elasticloadbalancingconn.DescribeLoadBalancers( + context.Background(), &elasticloadbalancing.DescribeLoadBalancersInput{ LoadBalancerNames: []string{id}, }) - resp, err := req.Send(context.Background()) - if err != nil { - elbErr, ok := err.(awserr.Error) - if !ok { + var ae smithy.APIError + if errors.As(err, &ae) { + if ae.ErrorCode() == "LoadBalancerNotFound" { + return false + } t.Fatal(err) } - if elbErr.Code() == "LoadBalancerNotFound" { - return false - } t.Fatal(err) } - if len(resp.LoadBalancerDescriptions) == 0 { + if len(req.LoadBalancerDescriptions) == 0 { return false } diff --git a/test/helper_test.go b/test/helper_test.go index cf6b2fd10..d8dd45624 100644 --- a/test/helper_test.go +++ b/test/helper_test.go @@ -2,6 +2,7 @@ package test import ( "bytes" + "context" "fmt" "io/ioutil" "os" @@ -9,11 +10,10 @@ import ( "strings" "testing" - "github.com/aws/aws-sdk-go-v2/aws/external" - awsls "github.com/jckuester/awsls/aws" - + "github.com/aws/aws-sdk-go-v2/config" "github.com/gruntwork-io/terratest/modules/random" "github.com/gruntwork-io/terratest/modules/terraform" + "github.com/jckuester/awstools-lib/aws" "github.com/onsi/gomega/gexec" "github.com/stretchr/testify/require" ) @@ -27,7 +27,7 @@ const ( type EnvVars struct { AWSRegion string AWSProfile string - AWSClient *awsls.Client + AWSClient *aws.Client } // InitEnv sets environment variables for acceptance tests. @@ -37,9 +37,10 @@ func InitEnv(t *testing.T) EnvVars { profile := getEnvOrDefault(t, "AWS_PROFILE", "myaccount1") region := getEnvOrDefault(t, "AWS_DEFAULT_REGION", "us-west-2") - client, err := awsls.NewClient( - external.WithSharedConfigProfile(profile), - external.WithRegion(region)) + client, err := aws.NewClient( + context.Background(), + config.WithSharedConfigProfile(profile), + config.WithRegion(region)) require.NoError(t, err) return EnvVars{ diff --git a/test/iam_policy_test.go b/test/iam_policy_test.go index ae03c1962..a61a86ea1 100644 --- a/test/iam_policy_test.go +++ b/test/iam_policy_test.go @@ -2,13 +2,13 @@ package test import ( "context" + "errors" "fmt" "os" "testing" - "github.com/aws/aws-sdk-go-v2/aws/awserr" - "github.com/aws/aws-sdk-go-v2/service/iam" + "github.com/aws/smithy-go" "github.com/gruntwork-io/terratest/modules/terraform" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -54,19 +54,19 @@ func assertIamPolicyDeleted(t *testing.T, env EnvVars, arn string) { } func iamPolicyExists(t *testing.T, env EnvVars, arn string) bool { - req := env.AWSClient.Iamconn.GetPolicyRequest(&iam.GetPolicyInput{ - PolicyArn: &arn, - }) - - _, err := req.Send(context.Background()) + _, err := env.AWSClient.Iamconn.GetPolicy( + context.Background(), + &iam.GetPolicyInput{ + PolicyArn: &arn, + }) if err != nil { - ec2err, ok := err.(awserr.Error) - if !ok { - t.Fatal() - } - if ec2err.Code() == "NoSuchEntity" { - return false + var ae smithy.APIError + if errors.As(err, &ae) { + if ae.ErrorCode() == "NoSuchEntity" { + return false + } + t.Fatal(err) } t.Fatal(err) } diff --git a/test/iam_user_test.go b/test/iam_user_test.go index 891dd2ea8..6bb4c86e2 100644 --- a/test/iam_user_test.go +++ b/test/iam_user_test.go @@ -2,12 +2,13 @@ package test import ( "context" + "errors" "fmt" "os" "testing" - "github.com/aws/aws-sdk-go-v2/aws/awserr" "github.com/aws/aws-sdk-go-v2/service/iam" + "github.com/aws/smithy-go" "github.com/gruntwork-io/terratest/modules/terraform" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -80,21 +81,21 @@ func assertIamUserDeleted(t *testing.T, env EnvVars, id string) { } func iamUserExists(t *testing.T, env EnvVars, id string) bool { - req := env.AWSClient.Iamconn.GetUserRequest(&iam.GetUserInput{ - UserName: &id, - }) - - _, err := req.Send(context.Background()) + _, err := env.AWSClient.Iamconn.GetUser( + context.Background(), + &iam.GetUserInput{ + UserName: &id, + }) if err != nil { - ec2err, ok := err.(awserr.Error) - if !ok { - t.Fatal() - } - if ec2err.Code() == "NoSuchEntity" { - return false + var ae smithy.APIError + if errors.As(err, &ae) { + if ae.ErrorCode() == "NoSuchEntity" { + return false + } + t.Fatal(err) } - t.Fatal() + t.Fatal(err) } return true diff --git a/test/lambda_function_test.go b/test/lambda_function_test.go index 40c43cc3d..cc880e001 100644 --- a/test/lambda_function_test.go +++ b/test/lambda_function_test.go @@ -2,13 +2,13 @@ package test import ( "context" + "errors" "fmt" "os" "testing" - "github.com/aws/aws-sdk-go-v2/aws/awserr" - "github.com/aws/aws-sdk-go-v2/service/lambda" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" "github.com/gruntwork-io/terratest/modules/terraform" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -83,19 +83,15 @@ func assertLambdaFunctionDeleted(t *testing.T, env EnvVars, id string) { } func lambdaFunctionExists(t *testing.T, env EnvVars, id string) bool { - req := env.AWSClient.Lambdaconn.GetFunctionRequest( + _, err := env.AWSClient.Lambdaconn.GetFunction( + context.Background(), &lambda.GetFunctionInput{ FunctionName: &id, }) - _, err := req.Send(context.Background()) - if err != nil { - awsErr, ok := err.(awserr.Error) - if !ok { - t.Fatal(err) - } - if awsErr.Code() == "ResourceNotFoundException" { + var awsErr *types.ResourceNotFoundException + if errors.As(err, &awsErr) { return false } t.Fatal(err) diff --git a/test/test-fixtures/autoscaling-group/main.tf b/test/test-fixtures/autoscaling-group/main.tf index 384a66208..0e05121ef 100644 --- a/test/test-fixtures/autoscaling-group/main.tf +++ b/test/test-fixtures/autoscaling-group/main.tf @@ -1,5 +1,5 @@ provider "aws" { - version = "~> 2.0" + version = "~> 3.0" profile = var.profile region = var.region @@ -83,4 +83,4 @@ data "aws_ami" "amazon_linux_2" { name = "name" values = ["amzn2-ami-hvm*"] } -} \ No newline at end of file +} diff --git a/test/test-fixtures/cloudtrail/main.tf b/test/test-fixtures/cloudtrail/main.tf index 165d3b61c..9e3db0eef 100644 --- a/test/test-fixtures/cloudtrail/main.tf +++ b/test/test-fixtures/cloudtrail/main.tf @@ -1,5 +1,5 @@ provider "aws" { - version = "~> 2.0" + version = "~> 3.0" profile = var.profile region = var.region diff --git a/test/test-fixtures/cloudwatch-log-group/main.tf b/test/test-fixtures/cloudwatch-log-group/main.tf index def183665..3cf6c177b 100644 --- a/test/test-fixtures/cloudwatch-log-group/main.tf +++ b/test/test-fixtures/cloudwatch-log-group/main.tf @@ -1,5 +1,5 @@ provider "aws" { - version = "~> 2.0" + version = "~> 3.0" profile = var.profile region = var.region @@ -17,4 +17,4 @@ resource "aws_cloudwatch_log_group" "test" { tags = { awsweeper = "test-acc" } -} \ No newline at end of file +} diff --git a/test/test-fixtures/db-instance/main.tf b/test/test-fixtures/db-instance/main.tf index 7a6fa07f9..37badb964 100644 --- a/test/test-fixtures/db-instance/main.tf +++ b/test/test-fixtures/db-instance/main.tf @@ -1,5 +1,5 @@ provider "aws" { - version = "~> 2.0" + version = "~> 3.0" profile = var.profile region = var.region @@ -20,8 +20,10 @@ resource "aws_db_instance" "test" { username = "foo" password = "foobarbaz" parameter_group_name = "default.mysql5.7" + skip_final_snapshot = true + apply_immediately = true tags = { awsweeper = "test-acc" } -} \ No newline at end of file +} diff --git a/test/test-fixtures/ebs-snapshot/main.tf b/test/test-fixtures/ebs-snapshot/main.tf index 8696c4f3c..054ff1b45 100644 --- a/test/test-fixtures/ebs-snapshot/main.tf +++ b/test/test-fixtures/ebs-snapshot/main.tf @@ -1,5 +1,5 @@ provider "aws" { - version = "~> 2.0" + version = "~> 3.0" profile = var.profile region = var.region @@ -26,4 +26,4 @@ resource "aws_ebs_snapshot" "test" { tags = { awsweeper = "test-acc" } -} \ No newline at end of file +} diff --git a/test/test-fixtures/ecs-cluster/main.tf b/test/test-fixtures/ecs-cluster/main.tf index 243eafef7..85efc35f0 100644 --- a/test/test-fixtures/ecs-cluster/main.tf +++ b/test/test-fixtures/ecs-cluster/main.tf @@ -1,5 +1,5 @@ provider "aws" { - version = "~> 2.0" + version = "~> 3.0" profile = var.profile region = var.region @@ -16,4 +16,4 @@ resource "aws_ecs_cluster" "test" { tags = { awsweeper = "test-acc" } -} \ No newline at end of file +} diff --git a/test/test-fixtures/elb/elb.tf b/test/test-fixtures/elb/elb.tf index 12095471d..a9cc26d32 100644 --- a/test/test-fixtures/elb/elb.tf +++ b/test/test-fixtures/elb/elb.tf @@ -1,5 +1,5 @@ provider "aws" { - version = "~> 2.0" + version = "~> 3.0" profile = var.profile region = var.region @@ -31,4 +31,4 @@ resource "aws_elb" "test" { resource "aws_default_subnet" "test" { availability_zone = "${var.region}c" -} \ No newline at end of file +} diff --git a/test/test-fixtures/iam-policy/main.tf b/test/test-fixtures/iam-policy/main.tf index 0d3291e8c..e8bd3a89d 100644 --- a/test/test-fixtures/iam-policy/main.tf +++ b/test/test-fixtures/iam-policy/main.tf @@ -1,5 +1,5 @@ provider "aws" { - version = "~> 2.0" + version = "~> 3.0" profile = var.profile region = var.region @@ -73,4 +73,4 @@ resource "aws_iam_policy_attachment" "test" { roles = [aws_iam_role.test.name] groups = [aws_iam_group.test.name] policy_arn = aws_iam_policy.test.arn -} \ No newline at end of file +} diff --git a/test/test-fixtures/iam-user/main.tf b/test/test-fixtures/iam-user/main.tf index eac09a4b2..c8142c6ef 100644 --- a/test/test-fixtures/iam-user/main.tf +++ b/test/test-fixtures/iam-user/main.tf @@ -1,5 +1,5 @@ provider "aws" { - version = "~> 2.0" + version = "~> 3.0" profile = var.profile region = var.region @@ -63,4 +63,4 @@ EOF resource "aws_iam_user_policy_attachment" "test" { user = aws_iam_user.test.name policy_arn = aws_iam_policy.test_policy.arn -} \ No newline at end of file +} diff --git a/test/test-fixtures/lambda-function/main.tf b/test/test-fixtures/lambda-function/main.tf index 366dc2c75..6aefd9869 100644 --- a/test/test-fixtures/lambda-function/main.tf +++ b/test/test-fixtures/lambda-function/main.tf @@ -1,5 +1,5 @@ provider "aws" { - version = "~> 2.0" + version = "~> 3.0" profile = var.profile region = var.region @@ -50,4 +50,4 @@ resource "aws_lambda_function" "test" { tags = { awsweeper = "test-acc" } -} \ No newline at end of file +} diff --git a/test/test-fixtures/vpc/main.tf b/test/test-fixtures/vpc/main.tf index 08dd8732e..628b71fc6 100644 --- a/test/test-fixtures/vpc/main.tf +++ b/test/test-fixtures/vpc/main.tf @@ -1,5 +1,5 @@ provider "aws" { - version = "~> 2.0" + version = "~> 3.0" profile = var.profile region = var.region @@ -17,4 +17,4 @@ resource "aws_vpc" "test" { tags = { awsweeper = "test-acc" } -} \ No newline at end of file +} diff --git a/test/vpc_test.go b/test/vpc_test.go index 5c47cf665..d60e46276 100644 --- a/test/vpc_test.go +++ b/test/vpc_test.go @@ -2,13 +2,13 @@ package test import ( "context" + "errors" "fmt" "os" "testing" - "github.com/aws/aws-sdk-go-v2/aws/awserr" - "github.com/aws/aws-sdk-go-v2/service/ec2" + "github.com/aws/smithy-go" "github.com/gruntwork-io/terratest/modules/terraform" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -81,25 +81,24 @@ func assertVpcDeleted(t *testing.T, env EnvVars, id string) { } func vpcExists(t *testing.T, env EnvVars, id string) bool { - req := env.AWSClient.Ec2conn.DescribeVpcsRequest( + req, err := env.AWSClient.Ec2conn.DescribeVpcs( + context.Background(), &ec2.DescribeVpcsInput{ VpcIds: []string{id}, }) - resp, err := req.Send(context.Background()) - if err != nil { - ec2err, ok := err.(awserr.Error) - if !ok { - t.Fatal() - } - if ec2err.Code() == "InvalidVpcID.NotFound" { - return false + var ae smithy.APIError + if errors.As(err, &ae) { + if ae.ErrorCode() == "InvalidVpcID.NotFound" { + return false + } + t.Fatal(err) } - t.Fatal() + t.Fatal(err) } - if len(resp.Vpcs) == 0 { + if len(req.Vpcs) == 0 { return false }