From b772561bfd7d0b94446e7ba9c088b33dfd3521f2 Mon Sep 17 00:00:00 2001 From: wata_mac Date: Sun, 14 Jul 2019 17:46:31 +0900 Subject: [PATCH] Fix rules tests --- .../aws_alb_invalid_security_group_test.go | 10 ++++++++-- rules/awsrules/aws_alb_invalid_subnet_test.go | 5 ++++- ...b_instance_default_parameter_group_test.go | 5 ++++- ...b_instance_invalid_db_subnet_group_test.go | 5 ++++- ...s_db_instance_invalid_option_group_test.go | 5 ++++- ...b_instance_invalid_parameter_group_test.go | 5 ++++- .../aws_db_instance_invalid_type_test.go | 5 ++++- ...nstance_invalid_vpc_security_group_test.go | 5 ++++- .../aws_db_instance_previous_type_test.go | 5 ++++- .../aws_db_instance_readable_password_test.go | 5 ++++- ...he_cluster_default_parameter_group_test.go | 5 ++++- ...he_cluster_invalid_parameter_group_test.go | 5 ++++- ...che_cluster_invalid_security_group_test.go | 5 ++++- ...cache_cluster_invalid_subnet_group_test.go | 5 ++++- ...s_elasticache_cluster_invalid_type_test.go | 5 ++++- ..._elasticache_cluster_previous_type_test.go | 5 ++++- .../awsrules/aws_elb_invalid_instance_test.go | 5 ++++- .../aws_elb_invalid_security_group_test.go | 5 ++++- rules/awsrules/aws_elb_invalid_subnet_test.go | 5 ++++- ...s_instance_default_standard_volume_test.go | 5 ++++- .../awsrules/aws_instance_invalid_ami_test.go | 20 +++++++++++++++---- .../aws_instance_invalid_iam_profile_test.go | 5 ++++- .../aws_instance_invalid_key_name_test.go | 5 ++++- .../aws_instance_invalid_subnet_test.go | 5 ++++- ...nstance_invalid_vpc_security_group_test.go | 5 ++++- .../aws_instance_previous_type_test.go | 5 ++++- ..._configuration_invalid_iam_profile_test.go | 5 ++++- ...nch_configuration_invalid_image_id_test.go | 20 +++++++++++++++---- ..._route_invalid_egress_only_gateway_test.go | 5 ++++- .../aws_route_invalid_gateway_test.go | 5 ++++- .../aws_route_invalid_instance_test.go | 5 ++++- .../aws_route_invalid_nat_gateway_test.go | 5 ++++- ...ws_route_invalid_network_interface_test.go | 5 ++++- .../aws_route_invalid_route_table_test.go | 5 ++++- ...ute_invalid_vpc_peering_connection_test.go | 5 ++++- .../aws_route_not_specified_target_test.go | 5 ++++- ...s_route_specified_multiple_targets_test.go | 5 ++++- ...rtificate_invalid_certificate_body_test.go | 5 ++++- ...tificate_invalid_certificate_chain_test.go | 5 ++++- ...cm_certificate_invalid_private_key_test.go | 5 ++++- ...certificate_authority_invalid_type_test.go | 5 ++++- .../aws_ami_invalid_architecture_test.go | 5 ++++- ...pi_gateway_authorizer_invalid_type_test.go | 5 ++++- ...way_response_invalid_response_type_test.go | 5 ++++- ...teway_response_invalid_status_code_test.go | 5 ++++- ...ntegration_invalid_connection_type_test.go | 5 ++++- ...tegration_invalid_content_handling_test.go | 5 ++++- ...i_gateway_integration_invalid_type_test.go | 5 ++++- ...ay_rest_api_invalid_api_key_source_test.go | 5 ++++- ...y_stage_invalid_cache_cluster_size_test.go | 5 ++++- ...scaling_policy_invalid_policy_type_test.go | 5 ++++- ..._policy_invalid_scalable_dimension_test.go | 5 ++++- ...g_policy_invalid_service_namespace_test.go | 5 ++++- ...ws_appsync_datasource_invalid_name_test.go | 5 ++++- ...ws_appsync_datasource_invalid_type_test.go | 5 ++++- ...ql_api_invalid_authentication_type_test.go | 5 ++++- .../aws_backup_selection_invalid_name_test.go | 5 ++++- .../aws_backup_vault_invalid_name_test.go | 5 ++++- ..._compute_environment_invalid_state_test.go | 5 ++++- ...h_compute_environment_invalid_type_test.go | 5 ++++- ..._batch_job_definition_invalid_type_test.go | 5 ++++- .../aws_batch_job_queue_invalid_state_test.go | 5 ++++- ..._budgets_budget_invalid_account_id_test.go | 5 ++++- ...budgets_budget_invalid_budget_type_test.go | 5 ++++- .../aws_budgets_budget_invalid_name_test.go | 5 ++++- ...s_budgets_budget_invalid_time_unit_test.go | 5 ++++- ...ironment_ec2_invalid_instance_type_test.go | 5 ++++- ..._environment_ec2_invalid_owner_arn_test.go | 5 ++++- ...formation_stack_invalid_on_failure_test.go | 5 ++++- ...ck_set_instance_invalid_account_id_test.go | 5 ++++- ...ck_set_invalid_execution_role_name_test.go | 5 ++++- ..._distribution_invalid_http_version_test.go | 5 ++++- ...t_distribution_invalid_price_class_test.go | 5 ++++- ...oudhsm_v2_cluster_invalid_hsm_type_test.go | 5 ++++- ...r_invalid_source_backup_identifier_test.go | 5 ++++- ...m_v2_hsm_invalid_availability_zone_test.go | 5 ++++- ...cloudhsm_v2_hsm_invalid_cluster_id_test.go | 5 ++++- ...cloudhsm_v2_hsm_invalid_ip_address_test.go | 5 ++++- ..._cloudhsm_v2_hsm_invalid_subnet_id_test.go | 5 ++++- ...ch_event_permission_invalid_action_test.go | 5 ++++- ...event_permission_invalid_principal_test.go | 5 ++++- ...nt_permission_invalid_statement_id_test.go | 5 ++++- ...cloudwatch_event_rule_invalid_name_test.go | 5 ++++- ...tch_event_target_invalid_target_id_test.go | 5 ++++- ...watch_log_destination_invalid_name_test.go | 5 ++++- ..._cloudwatch_log_group_invalid_name_test.go | 5 ++++- ...tch_log_metric_filter_invalid_name_test.go | 5 ++++- ...cloudwatch_log_stream_invalid_name_test.go | 5 ++++- ...iption_filter_invalid_distribution_test.go | 5 ++++- ...g_subscription_filter_invalid_name_test.go | 5 ++++- ..._alarm_invalid_comparison_operator_test.go | 5 ++++- ...c_alarm_invalid_extended_statistic_test.go | 5 ++++- ...tch_metric_alarm_invalid_namespace_test.go | 5 ++++- ...tch_metric_alarm_invalid_statistic_test.go | 5 ++++- ...oudwatch_metric_alarm_invalid_unit_test.go | 5 ++++- ...repository_invalid_repository_name_test.go | 5 ++++- ...eploy_app_invalid_compute_platform_test.go | 5 ++++- .../aws_codepipeline_invalid_name_test.go | 5 ++++- .../aws_codepipeline_invalid_role_arn_test.go | 5 ++++- ...ine_webhook_invalid_authentication_test.go | 5 ++++- ..._codepipeline_webhook_invalid_name_test.go | 5 ++++- ...line_webhook_invalid_target_action_test.go | 5 ++++- ...ty_pool_invalid_identity_pool_name_test.go | 5 ++++- ...ttachment_invalid_identity_pool_id_test.go | 5 ++++- ...ity_provider_invalid_provider_name_test.go | 5 ++++- ...ity_provider_invalid_provider_type_test.go | 5 ++++- ...tity_provider_invalid_user_pool_id_test.go | 5 ++++- ...resource_server_invalid_identifier_test.go | 5 ++++- ...gnito_resource_server_invalid_name_test.go | 5 ++++- ...ws_cognito_user_group_invalid_name_test.go | 5 ++++- ...ognito_user_group_invalid_role_arn_test.go | 5 ++++- ...lient_invalid_default_redirect_uri_test.go | 5 ++++- ...nito_user_pool_client_invalid_name_test.go | 5 ++++- ...to_user_pool_domain_invalid_domain_test.go | 5 ++++- ...invalid_email_verification_message_test.go | 5 ++++- ...ser_pool_invalid_mfa_configuration_test.go | 5 ++++- ...aws_cognito_user_pool_invalid_name_test.go | 5 ++++- ...invalid_sms_authentication_message_test.go | 5 ++++- ...l_invalid_sms_verification_message_test.go | 5 ++++- ...e_authorization_invalid_account_id_test.go | 5 ++++- ...nvalid_maximum_execution_frequency_test.go | 5 ++++- ...figuration_aggregator_invalid_name_test.go | 5 ++++- ...ort_definition_invalid_compression_test.go | 5 ++++- ...r_report_definition_invalid_format_test.go | 5 ++++- ...ort_definition_invalid_report_name_test.go | 5 ++++- ...eport_definition_invalid_s3_prefix_test.go | 5 ++++- ...eport_definition_invalid_s3_region_test.go | 5 ++++- ...eport_definition_invalid_time_unit_test.go | 5 ++++- ...async_agent_invalid_activation_key_test.go | 5 ++++- .../aws_datasync_agent_invalid_name_test.go | 5 ++++- ...on_efs_invalid_efs_file_system_arn_test.go | 5 ++++- ..._location_efs_invalid_subdirectory_test.go | 5 ++++- ...cation_nfs_invalid_server_hostname_test.go | 5 ++++- ..._location_nfs_invalid_subdirectory_test.go | 5 ++++- ..._location_s3_invalid_s3_bucket_arn_test.go | 5 ++++- ...k_invalid_cloudwatch_log_group_arn_test.go | 5 ++++- ...c_task_invalid_source_location_arn_test.go | 5 ++++- ...nal_forwarder_invalid_directory_id_test.go | 5 ++++- ...rwarder_invalid_remote_domain_name_test.go | 5 ++++- ...vice_directory_invalid_description_test.go | 5 ++++- ..._service_directory_invalid_edition_test.go | 5 ++++- ...ory_service_directory_invalid_name_test.go | 5 ++++- ...rvice_directory_invalid_short_name_test.go | 5 ++++- ...ory_service_directory_invalid_size_test.go | 5 ++++- ...ory_service_directory_invalid_type_test.go | 5 ++++- ...dlm_lifecycle_policy_invalid_state_test.go | 5 ++++- ...dms_endpoint_invalid_endpoint_type_test.go | 5 ++++- .../aws_dms_endpoint_invalid_ssl_mode_test.go | 5 ++++- ...cation_task_invalid_migration_type_test.go | 5 ++++- ...dx_bgp_peer_invalid_address_family_test.go | 5 ++++- ...dynamodb_global_table_invalid_name_test.go | 5 ++++- ...ynamodb_table_invalid_billing_mode_test.go | 5 ++++- ...odb_table_invalid_stream_view_type_test.go | 5 ++++- .../aws_ebs_volume_invalid_type_test.go | 5 ++++- ..._reservation_invalid_end_date_type_test.go | 5 ++++- ...on_invalid_instance_match_criteria_test.go | 5 ++++- ...ervation_invalid_instance_platform_test.go | 5 ++++- ...pacity_reservation_invalid_tenancy_test.go | 5 ++++- ...ndpoint_invalid_transport_protocol_test.go | 5 ++++- ...excess_capacity_termination_policy_test.go | 5 ++++- .../models/aws_ec2_fleet_invalid_type_test.go | 5 ++++- ...lid_auto_accept_shared_attachments_test.go | 5 ++++- ...id_default_route_table_association_test.go | 5 ++++- ...id_default_route_table_propagation_test.go | 5 ++++- ...ransit_gateway_invalid_dns_support_test.go | 5 ++++- ...pc_attachment_invalid_ipv6_support_test.go | 5 ++++- ...ifecycle_policy_invalid_repository_test.go | 5 ++++- ...ws_ecs_service_invalid_launch_type_test.go | 5 ++++- ...ecs_service_invalid_propagate_tags_test.go | 5 ++++- ...ervice_invalid_scheduling_strategy_test.go | 5 ++++- ...s_task_definition_invalid_ipc_mode_test.go | 5 ++++- ...sk_definition_invalid_network_mode_test.go | 5 ++++- ...s_task_definition_invalid_pid_mode_test.go | 5 ++++- ...le_system_invalid_performance_mode_test.go | 5 ++++- ...ile_system_invalid_throughput_mode_test.go | 5 ++++- .../aws_eks_cluster_invalid_name_test.go | 5 ++++- ...lasticache_cluster_invalid_az_mode_test.go | 5 ++++- ...ranscoder_preset_invalid_container_test.go | 5 ++++- ...stance_initiated_shutdown_behavior_test.go | 5 ++++- .../aws_instance_invalid_tenancy_test.go | 5 ++++- ...nch_template_invalid_instance_type_test.go | 5 ++++- .../aws_launch_template_invalid_name_test.go | 5 ++++- .../aws_lb_invalid_ip_address_type_test.go | 5 ++++- .../aws_lb_invalid_load_balancer_type_test.go | 5 ++++- .../aws_lb_listener_invalid_protocol_test.go | 5 ++++- ...b_target_group_invalid_target_type_test.go | 5 ++++- ...s_placement_group_invalid_strategy_test.go | 5 ++++- ...equest_invalid_allocation_strategy_test.go | 5 ++++- ...id_instance_interruption_behaviour_test.go | 5 ++++- rules/awsrules/models/models_test.go | 5 ++++- .../awsrules/models/pattern_rule_test.go.tmpl | 5 ++++- rules/rule_test.go.tmpl | 5 ++++- .../terraform_documented_outputs_test.go | 5 ++++- .../terraform_documented_variables_test.go | 5 ++++- .../terraform_module_pinned_source_test.go | 5 ++++- 195 files changed, 808 insertions(+), 202 deletions(-) diff --git a/rules/awsrules/aws_alb_invalid_security_group_test.go b/rules/awsrules/aws_alb_invalid_security_group_test.go index 0b99046a9..e92818b6f 100644 --- a/rules/awsrules/aws_alb_invalid_security_group_test.go +++ b/rules/awsrules/aws_alb_invalid_security_group_test.go @@ -155,7 +155,10 @@ resource "aws_alb" "balancer" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsALBInvalidSecurityGroupRule() mock := client.NewMockEC2API(ctrl) @@ -239,7 +242,10 @@ resource "aws_alb" "balancer" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsALBInvalidSecurityGroupRule() mock := client.NewMockEC2API(ctrl) diff --git a/rules/awsrules/aws_alb_invalid_subnet_test.go b/rules/awsrules/aws_alb_invalid_subnet_test.go index cbacad3cd..2aca0a281 100644 --- a/rules/awsrules/aws_alb_invalid_subnet_test.go +++ b/rules/awsrules/aws_alb_invalid_subnet_test.go @@ -139,7 +139,10 @@ resource "aws_alb" "balancer" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsALBInvalidSubnetRule() mock := client.NewMockEC2API(ctrl) diff --git a/rules/awsrules/aws_db_instance_default_parameter_group_test.go b/rules/awsrules/aws_db_instance_default_parameter_group_test.go index c67e38879..254421371 100644 --- a/rules/awsrules/aws_db_instance_default_parameter_group_test.go +++ b/rules/awsrules/aws_db_instance_default_parameter_group_test.go @@ -84,7 +84,10 @@ resource "aws_db_instance" "db" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsDBInstanceDefaultParameterGroupRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/aws_db_instance_invalid_db_subnet_group_test.go b/rules/awsrules/aws_db_instance_invalid_db_subnet_group_test.go index 7f6908d9a..e7441cbe7 100644 --- a/rules/awsrules/aws_db_instance_invalid_db_subnet_group_test.go +++ b/rules/awsrules/aws_db_instance_invalid_db_subnet_group_test.go @@ -109,7 +109,10 @@ resource "aws_db_instance" "mysql" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsDBInstanceInvalidDBSubnetGroupRule() mock := client.NewMockRDSAPI(ctrl) diff --git a/rules/awsrules/aws_db_instance_invalid_option_group_test.go b/rules/awsrules/aws_db_instance_invalid_option_group_test.go index c8d8f1f72..a805b479f 100644 --- a/rules/awsrules/aws_db_instance_invalid_option_group_test.go +++ b/rules/awsrules/aws_db_instance_invalid_option_group_test.go @@ -109,7 +109,10 @@ resource "aws_db_instance" "mysql" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsDBInstanceInvalidOptionGroupRule() mock := client.NewMockRDSAPI(ctrl) diff --git a/rules/awsrules/aws_db_instance_invalid_parameter_group_test.go b/rules/awsrules/aws_db_instance_invalid_parameter_group_test.go index 895cadc61..7b6bd355e 100644 --- a/rules/awsrules/aws_db_instance_invalid_parameter_group_test.go +++ b/rules/awsrules/aws_db_instance_invalid_parameter_group_test.go @@ -109,7 +109,10 @@ resource "aws_db_instance" "mysql" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsDBInstanceInvalidParameterGroupRule() mock := client.NewMockRDSAPI(ctrl) diff --git a/rules/awsrules/aws_db_instance_invalid_type_test.go b/rules/awsrules/aws_db_instance_invalid_type_test.go index 3e887faf2..e3b1c7f0a 100644 --- a/rules/awsrules/aws_db_instance_invalid_type_test.go +++ b/rules/awsrules/aws_db_instance_invalid_type_test.go @@ -83,7 +83,10 @@ resource "aws_db_instance" "mysql" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsDBInstanceInvalidTypeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/aws_db_instance_invalid_vpc_security_group_test.go b/rules/awsrules/aws_db_instance_invalid_vpc_security_group_test.go index c7296423f..f67132028 100644 --- a/rules/awsrules/aws_db_instance_invalid_vpc_security_group_test.go +++ b/rules/awsrules/aws_db_instance_invalid_vpc_security_group_test.go @@ -154,7 +154,10 @@ resource "aws_db_instance" "mysql" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsDBInstanceInvalidVPCSecurityGroupRule() mock := client.NewMockEC2API(ctrl) diff --git a/rules/awsrules/aws_db_instance_previous_type_test.go b/rules/awsrules/aws_db_instance_previous_type_test.go index f1756389b..17e21b73e 100644 --- a/rules/awsrules/aws_db_instance_previous_type_test.go +++ b/rules/awsrules/aws_db_instance_previous_type_test.go @@ -84,7 +84,10 @@ resource "aws_db_instance" "mysql" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsDBInstancePreviousTypeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/aws_db_instance_readable_password_test.go b/rules/awsrules/aws_db_instance_readable_password_test.go index 0f9f1bfde..2581ea7b3 100644 --- a/rules/awsrules/aws_db_instance_readable_password_test.go +++ b/rules/awsrules/aws_db_instance_readable_password_test.go @@ -157,7 +157,10 @@ resource "aws_db_instance" "mysql" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsDBInstanceReadablePasswordRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/aws_elasticache_cluster_default_parameter_group_test.go b/rules/awsrules/aws_elasticache_cluster_default_parameter_group_test.go index c550d7657..187c6558f 100644 --- a/rules/awsrules/aws_elasticache_cluster_default_parameter_group_test.go +++ b/rules/awsrules/aws_elasticache_cluster_default_parameter_group_test.go @@ -84,7 +84,10 @@ resource "aws_elasticache_cluster" "cache" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsElastiCacheClusterDefaultParameterGroupRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/aws_elasticache_cluster_invalid_parameter_group_test.go b/rules/awsrules/aws_elasticache_cluster_invalid_parameter_group_test.go index aab96c87d..b7df160d7 100644 --- a/rules/awsrules/aws_elasticache_cluster_invalid_parameter_group_test.go +++ b/rules/awsrules/aws_elasticache_cluster_invalid_parameter_group_test.go @@ -109,7 +109,10 @@ resource "aws_elasticache_cluster" "redis" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsElastiCacheClusterInvalidParameterGroupRule() mock := client.NewMockElastiCacheAPI(ctrl) diff --git a/rules/awsrules/aws_elasticache_cluster_invalid_security_group_test.go b/rules/awsrules/aws_elasticache_cluster_invalid_security_group_test.go index 81c6c0647..4e471e6c9 100644 --- a/rules/awsrules/aws_elasticache_cluster_invalid_security_group_test.go +++ b/rules/awsrules/aws_elasticache_cluster_invalid_security_group_test.go @@ -154,7 +154,10 @@ resource "aws_elasticache_cluster" "redis" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsElastiCacheClusterInvalidSecurityGroupRule() mock := client.NewMockEC2API(ctrl) diff --git a/rules/awsrules/aws_elasticache_cluster_invalid_subnet_group_test.go b/rules/awsrules/aws_elasticache_cluster_invalid_subnet_group_test.go index db8959fd9..ef8c7f59e 100644 --- a/rules/awsrules/aws_elasticache_cluster_invalid_subnet_group_test.go +++ b/rules/awsrules/aws_elasticache_cluster_invalid_subnet_group_test.go @@ -109,7 +109,10 @@ resource "aws_elasticache_cluster" "redis" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsElastiCacheClusterInvalidSubnetGroupRule() mock := client.NewMockElastiCacheAPI(ctrl) diff --git a/rules/awsrules/aws_elasticache_cluster_invalid_type_test.go b/rules/awsrules/aws_elasticache_cluster_invalid_type_test.go index 84f508c27..410f41490 100644 --- a/rules/awsrules/aws_elasticache_cluster_invalid_type_test.go +++ b/rules/awsrules/aws_elasticache_cluster_invalid_type_test.go @@ -83,7 +83,10 @@ resource "aws_elasticache_cluster" "redis" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsElastiCacheClusterInvalidTypeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/aws_elasticache_cluster_previous_type_test.go b/rules/awsrules/aws_elasticache_cluster_previous_type_test.go index 4a7a7be9e..c8b5169ec 100644 --- a/rules/awsrules/aws_elasticache_cluster_previous_type_test.go +++ b/rules/awsrules/aws_elasticache_cluster_previous_type_test.go @@ -84,7 +84,10 @@ resource "aws_elasticache_cluster" "redis" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsElastiCacheClusterPreviousTypeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/aws_elb_invalid_instance_test.go b/rules/awsrules/aws_elb_invalid_instance_test.go index b0739160d..091ffdded 100644 --- a/rules/awsrules/aws_elb_invalid_instance_test.go +++ b/rules/awsrules/aws_elb_invalid_instance_test.go @@ -154,7 +154,10 @@ resource "aws_elb" "balancer" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsELBInvalidInstanceRule() mock := client.NewMockEC2API(ctrl) diff --git a/rules/awsrules/aws_elb_invalid_security_group_test.go b/rules/awsrules/aws_elb_invalid_security_group_test.go index b5ebb9399..e6ecb4e02 100644 --- a/rules/awsrules/aws_elb_invalid_security_group_test.go +++ b/rules/awsrules/aws_elb_invalid_security_group_test.go @@ -154,7 +154,10 @@ resource "aws_elb" "balancer" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsELBInvalidSecurityGroupRule() mock := client.NewMockEC2API(ctrl) diff --git a/rules/awsrules/aws_elb_invalid_subnet_test.go b/rules/awsrules/aws_elb_invalid_subnet_test.go index c313f7807..914e592bc 100644 --- a/rules/awsrules/aws_elb_invalid_subnet_test.go +++ b/rules/awsrules/aws_elb_invalid_subnet_test.go @@ -154,7 +154,10 @@ resource "aws_elb" "balancer" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsELBInvalidSubnetRule() mock := client.NewMockEC2API(ctrl) diff --git a/rules/awsrules/aws_instance_default_standard_volume_test.go b/rules/awsrules/aws_instance_default_standard_volume_test.go index 69e68c16d..b7f22f21c 100644 --- a/rules/awsrules/aws_instance_default_standard_volume_test.go +++ b/rules/awsrules/aws_instance_default_standard_volume_test.go @@ -237,7 +237,10 @@ resource "aws_instance" "web" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsInstanceDefaultStandardVolumeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/aws_instance_invalid_ami_test.go b/rules/awsrules/aws_instance_invalid_ami_test.go index d9fff583a..4cfa5cd4d 100644 --- a/rules/awsrules/aws_instance_invalid_ami_test.go +++ b/rules/awsrules/aws_instance_invalid_ami_test.go @@ -63,7 +63,10 @@ resource "aws_instance" "invalid" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsInstanceInvalidAMIRule() ec2mock := client.NewMockEC2API(ctrl) @@ -136,7 +139,10 @@ resource "aws_instance" "valid" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsInstanceInvalidAMIRule() ec2mock := client.NewMockEC2API(ctrl) @@ -245,7 +251,10 @@ resource "aws_instance" "valid" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsInstanceInvalidAMIRule() ec2mock := client.NewMockEC2API(ctrl) @@ -398,7 +407,10 @@ resource "aws_instance" "unavailable" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsInstanceInvalidAMIRule() ec2mock := client.NewMockEC2API(ctrl) diff --git a/rules/awsrules/aws_instance_invalid_iam_profile_test.go b/rules/awsrules/aws_instance_invalid_iam_profile_test.go index 6ec6c344c..429257cfe 100644 --- a/rules/awsrules/aws_instance_invalid_iam_profile_test.go +++ b/rules/awsrules/aws_instance_invalid_iam_profile_test.go @@ -109,7 +109,10 @@ resource "aws_instance" "web" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsInstanceInvalidIAMProfileRule() mock := client.NewMockIAMAPI(ctrl) diff --git a/rules/awsrules/aws_instance_invalid_key_name_test.go b/rules/awsrules/aws_instance_invalid_key_name_test.go index 603d6620e..70e1ef6fa 100644 --- a/rules/awsrules/aws_instance_invalid_key_name_test.go +++ b/rules/awsrules/aws_instance_invalid_key_name_test.go @@ -106,7 +106,10 @@ resource "aws_instance" "web" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsInstanceInvalidKeyNameRule() mock := client.NewMockEC2API(ctrl) diff --git a/rules/awsrules/aws_instance_invalid_subnet_test.go b/rules/awsrules/aws_instance_invalid_subnet_test.go index 0da73568e..ee61923f9 100644 --- a/rules/awsrules/aws_instance_invalid_subnet_test.go +++ b/rules/awsrules/aws_instance_invalid_subnet_test.go @@ -106,7 +106,10 @@ resource "aws_instance" "web" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsInstanceInvalidSubnetRule() mock := client.NewMockEC2API(ctrl) diff --git a/rules/awsrules/aws_instance_invalid_vpc_security_group_test.go b/rules/awsrules/aws_instance_invalid_vpc_security_group_test.go index 215e7a616..f748dc13c 100644 --- a/rules/awsrules/aws_instance_invalid_vpc_security_group_test.go +++ b/rules/awsrules/aws_instance_invalid_vpc_security_group_test.go @@ -154,7 +154,10 @@ resource "aws_instance" "web" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsInstanceInvalidVPCSecurityGroupRule() mock := client.NewMockEC2API(ctrl) diff --git a/rules/awsrules/aws_instance_previous_type_test.go b/rules/awsrules/aws_instance_previous_type_test.go index 39f95e30d..50a38eb40 100644 --- a/rules/awsrules/aws_instance_previous_type_test.go +++ b/rules/awsrules/aws_instance_previous_type_test.go @@ -84,7 +84,10 @@ resource "aws_instance" "web" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsInstancePreviousTypeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/aws_launch_configuration_invalid_iam_profile_test.go b/rules/awsrules/aws_launch_configuration_invalid_iam_profile_test.go index dae722c83..b53ab57cd 100644 --- a/rules/awsrules/aws_launch_configuration_invalid_iam_profile_test.go +++ b/rules/awsrules/aws_launch_configuration_invalid_iam_profile_test.go @@ -109,7 +109,10 @@ resource "aws_launch_configuration" "web" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsLaunchConfigurationInvalidIAMProfileRule() mock := client.NewMockIAMAPI(ctrl) diff --git a/rules/awsrules/aws_launch_configuration_invalid_image_id_test.go b/rules/awsrules/aws_launch_configuration_invalid_image_id_test.go index d18497f54..bd5058770 100644 --- a/rules/awsrules/aws_launch_configuration_invalid_image_id_test.go +++ b/rules/awsrules/aws_launch_configuration_invalid_image_id_test.go @@ -63,7 +63,10 @@ resource "aws_launch_configuration" "invalid" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsLaunchConfigurationInvalidImageIDRule() ec2mock := client.NewMockEC2API(ctrl) @@ -136,7 +139,10 @@ resource "aws_launch_configuration" "valid" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsLaunchConfigurationInvalidImageIDRule() ec2mock := client.NewMockEC2API(ctrl) @@ -245,7 +251,10 @@ resource "aws_launch_configuration" "valid" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsLaunchConfigurationInvalidImageIDRule() ec2mock := client.NewMockEC2API(ctrl) @@ -398,7 +407,10 @@ resource "aws_launch_configuration" "unavailable" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsLaunchConfigurationInvalidImageIDRule() ec2mock := client.NewMockEC2API(ctrl) diff --git a/rules/awsrules/aws_route_invalid_egress_only_gateway_test.go b/rules/awsrules/aws_route_invalid_egress_only_gateway_test.go index dd51a2569..1f722c8dc 100644 --- a/rules/awsrules/aws_route_invalid_egress_only_gateway_test.go +++ b/rules/awsrules/aws_route_invalid_egress_only_gateway_test.go @@ -106,7 +106,10 @@ resource "aws_route" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsRouteInvalidEgressOnlyGatewayRule() mock := client.NewMockEC2API(ctrl) diff --git a/rules/awsrules/aws_route_invalid_gateway_test.go b/rules/awsrules/aws_route_invalid_gateway_test.go index d5861148d..76c241474 100644 --- a/rules/awsrules/aws_route_invalid_gateway_test.go +++ b/rules/awsrules/aws_route_invalid_gateway_test.go @@ -106,7 +106,10 @@ resource "aws_route" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsRouteInvalidGatewayRule() mock := client.NewMockEC2API(ctrl) diff --git a/rules/awsrules/aws_route_invalid_instance_test.go b/rules/awsrules/aws_route_invalid_instance_test.go index a011a25ea..f95fe17a5 100644 --- a/rules/awsrules/aws_route_invalid_instance_test.go +++ b/rules/awsrules/aws_route_invalid_instance_test.go @@ -106,7 +106,10 @@ resource "aws_route" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsRouteInvalidInstanceRule() mock := client.NewMockEC2API(ctrl) diff --git a/rules/awsrules/aws_route_invalid_nat_gateway_test.go b/rules/awsrules/aws_route_invalid_nat_gateway_test.go index 3c257e0bd..2342c67be 100644 --- a/rules/awsrules/aws_route_invalid_nat_gateway_test.go +++ b/rules/awsrules/aws_route_invalid_nat_gateway_test.go @@ -106,7 +106,10 @@ resource "aws_route" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsRouteInvalidNatGatewayRule() mock := client.NewMockEC2API(ctrl) diff --git a/rules/awsrules/aws_route_invalid_network_interface_test.go b/rules/awsrules/aws_route_invalid_network_interface_test.go index c82a0fc2d..1967db74a 100644 --- a/rules/awsrules/aws_route_invalid_network_interface_test.go +++ b/rules/awsrules/aws_route_invalid_network_interface_test.go @@ -106,7 +106,10 @@ resource "aws_route" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsRouteInvalidNetworkInterfaceRule() mock := client.NewMockEC2API(ctrl) diff --git a/rules/awsrules/aws_route_invalid_route_table_test.go b/rules/awsrules/aws_route_invalid_route_table_test.go index 718c7575b..b1ef1e24d 100644 --- a/rules/awsrules/aws_route_invalid_route_table_test.go +++ b/rules/awsrules/aws_route_invalid_route_table_test.go @@ -106,7 +106,10 @@ resource "aws_route" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsRouteInvalidRouteTableRule() mock := client.NewMockEC2API(ctrl) diff --git a/rules/awsrules/aws_route_invalid_vpc_peering_connection_test.go b/rules/awsrules/aws_route_invalid_vpc_peering_connection_test.go index fb267a19b..0c6157327 100644 --- a/rules/awsrules/aws_route_invalid_vpc_peering_connection_test.go +++ b/rules/awsrules/aws_route_invalid_vpc_peering_connection_test.go @@ -106,7 +106,10 @@ resource "aws_route" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsRouteInvalidVPCPeeringConnectionRule() mock := client.NewMockEC2API(ctrl) diff --git a/rules/awsrules/aws_route_not_specified_target_test.go b/rules/awsrules/aws_route_not_specified_target_test.go index d328b5005..d9a41e36f 100644 --- a/rules/awsrules/aws_route_not_specified_target_test.go +++ b/rules/awsrules/aws_route_not_specified_target_test.go @@ -162,7 +162,10 @@ resource "aws_route" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsRouteNotSpecifiedTargetRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/aws_route_specified_multiple_targets_test.go b/rules/awsrules/aws_route_specified_multiple_targets_test.go index 92586d9cd..748b5ab99 100644 --- a/rules/awsrules/aws_route_specified_multiple_targets_test.go +++ b/rules/awsrules/aws_route_specified_multiple_targets_test.go @@ -102,7 +102,10 @@ resource "aws_route" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsRouteSpecifiedMultipleTargetsRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_acm_certificate_invalid_certificate_body_test.go b/rules/awsrules/models/aws_acm_certificate_invalid_certificate_body_test.go index fbd764676..cf70c7b9d 100644 --- a/rules/awsrules/models/aws_acm_certificate_invalid_certificate_body_test.go +++ b/rules/awsrules/models/aws_acm_certificate_invalid_certificate_body_test.go @@ -121,7 +121,10 @@ TEXT t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsAcmCertificateInvalidCertificateBodyRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_acm_certificate_invalid_certificate_chain_test.go b/rules/awsrules/models/aws_acm_certificate_invalid_certificate_chain_test.go index ff88b901b..8345a3879 100644 --- a/rules/awsrules/models/aws_acm_certificate_invalid_certificate_chain_test.go +++ b/rules/awsrules/models/aws_acm_certificate_invalid_certificate_chain_test.go @@ -139,7 +139,10 @@ TEXT t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsAcmCertificateInvalidCertificateChainRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_acm_certificate_invalid_private_key_test.go b/rules/awsrules/models/aws_acm_certificate_invalid_private_key_test.go index 0c6b3781d..218cdb954 100644 --- a/rules/awsrules/models/aws_acm_certificate_invalid_private_key_test.go +++ b/rules/awsrules/models/aws_acm_certificate_invalid_private_key_test.go @@ -132,7 +132,10 @@ TEXT t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsAcmCertificateInvalidPrivateKeyRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_acmpca_certificate_authority_invalid_type_test.go b/rules/awsrules/models/aws_acmpca_certificate_authority_invalid_type_test.go index e5b816588..106788881 100644 --- a/rules/awsrules/models/aws_acmpca_certificate_authority_invalid_type_test.go +++ b/rules/awsrules/models/aws_acmpca_certificate_authority_invalid_type_test.go @@ -84,7 +84,10 @@ resource "aws_acmpca_certificate_authority" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsAcmpcaCertificateAuthorityInvalidTypeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_ami_invalid_architecture_test.go b/rules/awsrules/models/aws_ami_invalid_architecture_test.go index e9e0a2e88..699d86270 100644 --- a/rules/awsrules/models/aws_ami_invalid_architecture_test.go +++ b/rules/awsrules/models/aws_ami_invalid_architecture_test.go @@ -84,7 +84,10 @@ resource "aws_ami" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsAMIInvalidArchitectureRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_api_gateway_authorizer_invalid_type_test.go b/rules/awsrules/models/aws_api_gateway_authorizer_invalid_type_test.go index 54cc261df..f7c40d8e6 100644 --- a/rules/awsrules/models/aws_api_gateway_authorizer_invalid_type_test.go +++ b/rules/awsrules/models/aws_api_gateway_authorizer_invalid_type_test.go @@ -84,7 +84,10 @@ resource "aws_api_gateway_authorizer" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsAPIGatewayAuthorizerInvalidTypeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_api_gateway_gateway_response_invalid_response_type_test.go b/rules/awsrules/models/aws_api_gateway_gateway_response_invalid_response_type_test.go index 91eaa945e..25708ea1f 100644 --- a/rules/awsrules/models/aws_api_gateway_gateway_response_invalid_response_type_test.go +++ b/rules/awsrules/models/aws_api_gateway_gateway_response_invalid_response_type_test.go @@ -84,7 +84,10 @@ resource "aws_api_gateway_gateway_response" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsAPIGatewayGatewayResponseInvalidResponseTypeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_api_gateway_gateway_response_invalid_status_code_test.go b/rules/awsrules/models/aws_api_gateway_gateway_response_invalid_status_code_test.go index 6e675617b..afbdf3acd 100644 --- a/rules/awsrules/models/aws_api_gateway_gateway_response_invalid_status_code_test.go +++ b/rules/awsrules/models/aws_api_gateway_gateway_response_invalid_status_code_test.go @@ -84,7 +84,10 @@ resource "aws_api_gateway_gateway_response" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsAPIGatewayGatewayResponseInvalidStatusCodeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_api_gateway_integration_invalid_connection_type_test.go b/rules/awsrules/models/aws_api_gateway_integration_invalid_connection_type_test.go index 80885bb49..e894f111c 100644 --- a/rules/awsrules/models/aws_api_gateway_integration_invalid_connection_type_test.go +++ b/rules/awsrules/models/aws_api_gateway_integration_invalid_connection_type_test.go @@ -84,7 +84,10 @@ resource "aws_api_gateway_integration" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsAPIGatewayIntegrationInvalidConnectionTypeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_api_gateway_integration_invalid_content_handling_test.go b/rules/awsrules/models/aws_api_gateway_integration_invalid_content_handling_test.go index 7cc8abb34..e2eea3819 100644 --- a/rules/awsrules/models/aws_api_gateway_integration_invalid_content_handling_test.go +++ b/rules/awsrules/models/aws_api_gateway_integration_invalid_content_handling_test.go @@ -84,7 +84,10 @@ resource "aws_api_gateway_integration" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsAPIGatewayIntegrationInvalidContentHandlingRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_api_gateway_integration_invalid_type_test.go b/rules/awsrules/models/aws_api_gateway_integration_invalid_type_test.go index bc791a134..a1f2703e6 100644 --- a/rules/awsrules/models/aws_api_gateway_integration_invalid_type_test.go +++ b/rules/awsrules/models/aws_api_gateway_integration_invalid_type_test.go @@ -84,7 +84,10 @@ resource "aws_api_gateway_integration" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsAPIGatewayIntegrationInvalidTypeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_api_gateway_rest_api_invalid_api_key_source_test.go b/rules/awsrules/models/aws_api_gateway_rest_api_invalid_api_key_source_test.go index 4f87f68a2..e3c73842c 100644 --- a/rules/awsrules/models/aws_api_gateway_rest_api_invalid_api_key_source_test.go +++ b/rules/awsrules/models/aws_api_gateway_rest_api_invalid_api_key_source_test.go @@ -84,7 +84,10 @@ resource "aws_api_gateway_rest_api" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsAPIGatewayRestAPIInvalidAPIKeySourceRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_api_gateway_stage_invalid_cache_cluster_size_test.go b/rules/awsrules/models/aws_api_gateway_stage_invalid_cache_cluster_size_test.go index 86f01b9c4..8b7676289 100644 --- a/rules/awsrules/models/aws_api_gateway_stage_invalid_cache_cluster_size_test.go +++ b/rules/awsrules/models/aws_api_gateway_stage_invalid_cache_cluster_size_test.go @@ -84,7 +84,10 @@ resource "aws_api_gateway_stage" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsAPIGatewayStageInvalidCacheClusterSizeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_appautoscaling_policy_invalid_policy_type_test.go b/rules/awsrules/models/aws_appautoscaling_policy_invalid_policy_type_test.go index d7e5d010e..4bcb95ccb 100644 --- a/rules/awsrules/models/aws_appautoscaling_policy_invalid_policy_type_test.go +++ b/rules/awsrules/models/aws_appautoscaling_policy_invalid_policy_type_test.go @@ -84,7 +84,10 @@ resource "aws_appautoscaling_policy" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsAppautoscalingPolicyInvalidPolicyTypeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_appautoscaling_policy_invalid_scalable_dimension_test.go b/rules/awsrules/models/aws_appautoscaling_policy_invalid_scalable_dimension_test.go index 576918ab0..5dba4fecf 100644 --- a/rules/awsrules/models/aws_appautoscaling_policy_invalid_scalable_dimension_test.go +++ b/rules/awsrules/models/aws_appautoscaling_policy_invalid_scalable_dimension_test.go @@ -84,7 +84,10 @@ resource "aws_appautoscaling_policy" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsAppautoscalingPolicyInvalidScalableDimensionRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_appautoscaling_policy_invalid_service_namespace_test.go b/rules/awsrules/models/aws_appautoscaling_policy_invalid_service_namespace_test.go index 32dc8e486..179cebf07 100644 --- a/rules/awsrules/models/aws_appautoscaling_policy_invalid_service_namespace_test.go +++ b/rules/awsrules/models/aws_appautoscaling_policy_invalid_service_namespace_test.go @@ -84,7 +84,10 @@ resource "aws_appautoscaling_policy" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsAppautoscalingPolicyInvalidServiceNamespaceRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_appsync_datasource_invalid_name_test.go b/rules/awsrules/models/aws_appsync_datasource_invalid_name_test.go index 8764367f5..b30e14a9f 100644 --- a/rules/awsrules/models/aws_appsync_datasource_invalid_name_test.go +++ b/rules/awsrules/models/aws_appsync_datasource_invalid_name_test.go @@ -84,7 +84,10 @@ resource "aws_appsync_datasource" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsAppsyncDatasourceInvalidNameRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_appsync_datasource_invalid_type_test.go b/rules/awsrules/models/aws_appsync_datasource_invalid_type_test.go index 29386fea6..79ed720d5 100644 --- a/rules/awsrules/models/aws_appsync_datasource_invalid_type_test.go +++ b/rules/awsrules/models/aws_appsync_datasource_invalid_type_test.go @@ -84,7 +84,10 @@ resource "aws_appsync_datasource" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsAppsyncDatasourceInvalidTypeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_appsync_graphql_api_invalid_authentication_type_test.go b/rules/awsrules/models/aws_appsync_graphql_api_invalid_authentication_type_test.go index 2c9d85603..282f1df7b 100644 --- a/rules/awsrules/models/aws_appsync_graphql_api_invalid_authentication_type_test.go +++ b/rules/awsrules/models/aws_appsync_graphql_api_invalid_authentication_type_test.go @@ -84,7 +84,10 @@ resource "aws_appsync_graphql_api" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsAppsyncGraphqlAPIInvalidAuthenticationTypeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_backup_selection_invalid_name_test.go b/rules/awsrules/models/aws_backup_selection_invalid_name_test.go index 5a4588f09..e21e7d826 100644 --- a/rules/awsrules/models/aws_backup_selection_invalid_name_test.go +++ b/rules/awsrules/models/aws_backup_selection_invalid_name_test.go @@ -84,7 +84,10 @@ resource "aws_backup_selection" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsBackupSelectionInvalidNameRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_backup_vault_invalid_name_test.go b/rules/awsrules/models/aws_backup_vault_invalid_name_test.go index 23c3f513d..02669bb8c 100644 --- a/rules/awsrules/models/aws_backup_vault_invalid_name_test.go +++ b/rules/awsrules/models/aws_backup_vault_invalid_name_test.go @@ -84,7 +84,10 @@ resource "aws_backup_vault" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsBackupVaultInvalidNameRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_batch_compute_environment_invalid_state_test.go b/rules/awsrules/models/aws_batch_compute_environment_invalid_state_test.go index a112627a4..702159fcb 100644 --- a/rules/awsrules/models/aws_batch_compute_environment_invalid_state_test.go +++ b/rules/awsrules/models/aws_batch_compute_environment_invalid_state_test.go @@ -84,7 +84,10 @@ resource "aws_batch_compute_environment" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsBatchComputeEnvironmentInvalidStateRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_batch_compute_environment_invalid_type_test.go b/rules/awsrules/models/aws_batch_compute_environment_invalid_type_test.go index 2267c7b8d..1d811fe7b 100644 --- a/rules/awsrules/models/aws_batch_compute_environment_invalid_type_test.go +++ b/rules/awsrules/models/aws_batch_compute_environment_invalid_type_test.go @@ -84,7 +84,10 @@ resource "aws_batch_compute_environment" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsBatchComputeEnvironmentInvalidTypeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_batch_job_definition_invalid_type_test.go b/rules/awsrules/models/aws_batch_job_definition_invalid_type_test.go index 8d595e704..5f260b602 100644 --- a/rules/awsrules/models/aws_batch_job_definition_invalid_type_test.go +++ b/rules/awsrules/models/aws_batch_job_definition_invalid_type_test.go @@ -84,7 +84,10 @@ resource "aws_batch_job_definition" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsBatchJobDefinitionInvalidTypeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_batch_job_queue_invalid_state_test.go b/rules/awsrules/models/aws_batch_job_queue_invalid_state_test.go index 2a1d8ca51..39c9326bb 100644 --- a/rules/awsrules/models/aws_batch_job_queue_invalid_state_test.go +++ b/rules/awsrules/models/aws_batch_job_queue_invalid_state_test.go @@ -84,7 +84,10 @@ resource "aws_batch_job_queue" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsBatchJobQueueInvalidStateRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_budgets_budget_invalid_account_id_test.go b/rules/awsrules/models/aws_budgets_budget_invalid_account_id_test.go index f82444cdc..69ccef8ce 100644 --- a/rules/awsrules/models/aws_budgets_budget_invalid_account_id_test.go +++ b/rules/awsrules/models/aws_budgets_budget_invalid_account_id_test.go @@ -84,7 +84,10 @@ resource "aws_budgets_budget" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsBudgetsBudgetInvalidAccountIDRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_budgets_budget_invalid_budget_type_test.go b/rules/awsrules/models/aws_budgets_budget_invalid_budget_type_test.go index a207d5c56..8444bff64 100644 --- a/rules/awsrules/models/aws_budgets_budget_invalid_budget_type_test.go +++ b/rules/awsrules/models/aws_budgets_budget_invalid_budget_type_test.go @@ -84,7 +84,10 @@ resource "aws_budgets_budget" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsBudgetsBudgetInvalidBudgetTypeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_budgets_budget_invalid_name_test.go b/rules/awsrules/models/aws_budgets_budget_invalid_name_test.go index 44f8df5d5..d2725cc96 100644 --- a/rules/awsrules/models/aws_budgets_budget_invalid_name_test.go +++ b/rules/awsrules/models/aws_budgets_budget_invalid_name_test.go @@ -84,7 +84,10 @@ resource "aws_budgets_budget" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsBudgetsBudgetInvalidNameRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_budgets_budget_invalid_time_unit_test.go b/rules/awsrules/models/aws_budgets_budget_invalid_time_unit_test.go index c14058683..fa1caec17 100644 --- a/rules/awsrules/models/aws_budgets_budget_invalid_time_unit_test.go +++ b/rules/awsrules/models/aws_budgets_budget_invalid_time_unit_test.go @@ -84,7 +84,10 @@ resource "aws_budgets_budget" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsBudgetsBudgetInvalidTimeUnitRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cloud9_environment_ec2_invalid_instance_type_test.go b/rules/awsrules/models/aws_cloud9_environment_ec2_invalid_instance_type_test.go index 219cdaf35..30b3367fc 100644 --- a/rules/awsrules/models/aws_cloud9_environment_ec2_invalid_instance_type_test.go +++ b/rules/awsrules/models/aws_cloud9_environment_ec2_invalid_instance_type_test.go @@ -84,7 +84,10 @@ resource "aws_cloud9_environment_ec2" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCloud9EnvironmentEc2InvalidInstanceTypeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cloud9_environment_ec2_invalid_owner_arn_test.go b/rules/awsrules/models/aws_cloud9_environment_ec2_invalid_owner_arn_test.go index 7b36d2136..113d068a7 100644 --- a/rules/awsrules/models/aws_cloud9_environment_ec2_invalid_owner_arn_test.go +++ b/rules/awsrules/models/aws_cloud9_environment_ec2_invalid_owner_arn_test.go @@ -84,7 +84,10 @@ resource "aws_cloud9_environment_ec2" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCloud9EnvironmentEc2InvalidOwnerArnRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cloudformation_stack_invalid_on_failure_test.go b/rules/awsrules/models/aws_cloudformation_stack_invalid_on_failure_test.go index e098265b5..f11de646c 100644 --- a/rules/awsrules/models/aws_cloudformation_stack_invalid_on_failure_test.go +++ b/rules/awsrules/models/aws_cloudformation_stack_invalid_on_failure_test.go @@ -84,7 +84,10 @@ resource "aws_cloudformation_stack" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCloudformationStackInvalidOnFailureRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cloudformation_stack_set_instance_invalid_account_id_test.go b/rules/awsrules/models/aws_cloudformation_stack_set_instance_invalid_account_id_test.go index 5a3be26c1..8db060533 100644 --- a/rules/awsrules/models/aws_cloudformation_stack_set_instance_invalid_account_id_test.go +++ b/rules/awsrules/models/aws_cloudformation_stack_set_instance_invalid_account_id_test.go @@ -84,7 +84,10 @@ resource "aws_cloudformation_stack_set_instance" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCloudformationStackSetInstanceInvalidAccountIDRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cloudformation_stack_set_invalid_execution_role_name_test.go b/rules/awsrules/models/aws_cloudformation_stack_set_invalid_execution_role_name_test.go index db3586ae1..56ce4d2f5 100644 --- a/rules/awsrules/models/aws_cloudformation_stack_set_invalid_execution_role_name_test.go +++ b/rules/awsrules/models/aws_cloudformation_stack_set_invalid_execution_role_name_test.go @@ -84,7 +84,10 @@ resource "aws_cloudformation_stack_set" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCloudformationStackSetInvalidExecutionRoleNameRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cloudfront_distribution_invalid_http_version_test.go b/rules/awsrules/models/aws_cloudfront_distribution_invalid_http_version_test.go index b1f1e6f75..d06aefe29 100644 --- a/rules/awsrules/models/aws_cloudfront_distribution_invalid_http_version_test.go +++ b/rules/awsrules/models/aws_cloudfront_distribution_invalid_http_version_test.go @@ -84,7 +84,10 @@ resource "aws_cloudfront_distribution" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCloudfrontDistributionInvalidHTTPVersionRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cloudfront_distribution_invalid_price_class_test.go b/rules/awsrules/models/aws_cloudfront_distribution_invalid_price_class_test.go index 66fb20b0e..5f3e6de72 100644 --- a/rules/awsrules/models/aws_cloudfront_distribution_invalid_price_class_test.go +++ b/rules/awsrules/models/aws_cloudfront_distribution_invalid_price_class_test.go @@ -84,7 +84,10 @@ resource "aws_cloudfront_distribution" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCloudfrontDistributionInvalidPriceClassRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cloudhsm_v2_cluster_invalid_hsm_type_test.go b/rules/awsrules/models/aws_cloudhsm_v2_cluster_invalid_hsm_type_test.go index a2c16e158..d884f97c8 100644 --- a/rules/awsrules/models/aws_cloudhsm_v2_cluster_invalid_hsm_type_test.go +++ b/rules/awsrules/models/aws_cloudhsm_v2_cluster_invalid_hsm_type_test.go @@ -84,7 +84,10 @@ resource "aws_cloudhsm_v2_cluster" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCloudhsmV2ClusterInvalidHsmTypeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cloudhsm_v2_cluster_invalid_source_backup_identifier_test.go b/rules/awsrules/models/aws_cloudhsm_v2_cluster_invalid_source_backup_identifier_test.go index 785eb5396..c8fc1b545 100644 --- a/rules/awsrules/models/aws_cloudhsm_v2_cluster_invalid_source_backup_identifier_test.go +++ b/rules/awsrules/models/aws_cloudhsm_v2_cluster_invalid_source_backup_identifier_test.go @@ -84,7 +84,10 @@ resource "aws_cloudhsm_v2_cluster" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCloudhsmV2ClusterInvalidSourceBackupIdentifierRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cloudhsm_v2_hsm_invalid_availability_zone_test.go b/rules/awsrules/models/aws_cloudhsm_v2_hsm_invalid_availability_zone_test.go index 8e9db8a9f..db97c9000 100644 --- a/rules/awsrules/models/aws_cloudhsm_v2_hsm_invalid_availability_zone_test.go +++ b/rules/awsrules/models/aws_cloudhsm_v2_hsm_invalid_availability_zone_test.go @@ -84,7 +84,10 @@ resource "aws_cloudhsm_v2_hsm" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCloudhsmV2HsmInvalidAvailabilityZoneRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cloudhsm_v2_hsm_invalid_cluster_id_test.go b/rules/awsrules/models/aws_cloudhsm_v2_hsm_invalid_cluster_id_test.go index cb39da55f..e225a115e 100644 --- a/rules/awsrules/models/aws_cloudhsm_v2_hsm_invalid_cluster_id_test.go +++ b/rules/awsrules/models/aws_cloudhsm_v2_hsm_invalid_cluster_id_test.go @@ -84,7 +84,10 @@ resource "aws_cloudhsm_v2_hsm" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCloudhsmV2HsmInvalidClusterIDRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cloudhsm_v2_hsm_invalid_ip_address_test.go b/rules/awsrules/models/aws_cloudhsm_v2_hsm_invalid_ip_address_test.go index e65671250..e4031a15b 100644 --- a/rules/awsrules/models/aws_cloudhsm_v2_hsm_invalid_ip_address_test.go +++ b/rules/awsrules/models/aws_cloudhsm_v2_hsm_invalid_ip_address_test.go @@ -84,7 +84,10 @@ resource "aws_cloudhsm_v2_hsm" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCloudhsmV2HsmInvalidIPAddressRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cloudhsm_v2_hsm_invalid_subnet_id_test.go b/rules/awsrules/models/aws_cloudhsm_v2_hsm_invalid_subnet_id_test.go index 0c610996f..f9efa3096 100644 --- a/rules/awsrules/models/aws_cloudhsm_v2_hsm_invalid_subnet_id_test.go +++ b/rules/awsrules/models/aws_cloudhsm_v2_hsm_invalid_subnet_id_test.go @@ -84,7 +84,10 @@ resource "aws_cloudhsm_v2_hsm" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCloudhsmV2HsmInvalidSubnetIDRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cloudwatch_event_permission_invalid_action_test.go b/rules/awsrules/models/aws_cloudwatch_event_permission_invalid_action_test.go index 83f73e928..ff2dd36bc 100644 --- a/rules/awsrules/models/aws_cloudwatch_event_permission_invalid_action_test.go +++ b/rules/awsrules/models/aws_cloudwatch_event_permission_invalid_action_test.go @@ -84,7 +84,10 @@ resource "aws_cloudwatch_event_permission" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCloudwatchEventPermissionInvalidActionRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cloudwatch_event_permission_invalid_principal_test.go b/rules/awsrules/models/aws_cloudwatch_event_permission_invalid_principal_test.go index e57d8f927..d0dd63017 100644 --- a/rules/awsrules/models/aws_cloudwatch_event_permission_invalid_principal_test.go +++ b/rules/awsrules/models/aws_cloudwatch_event_permission_invalid_principal_test.go @@ -84,7 +84,10 @@ resource "aws_cloudwatch_event_permission" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCloudwatchEventPermissionInvalidPrincipalRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cloudwatch_event_permission_invalid_statement_id_test.go b/rules/awsrules/models/aws_cloudwatch_event_permission_invalid_statement_id_test.go index de6b00ce1..4e7e3cd9b 100644 --- a/rules/awsrules/models/aws_cloudwatch_event_permission_invalid_statement_id_test.go +++ b/rules/awsrules/models/aws_cloudwatch_event_permission_invalid_statement_id_test.go @@ -84,7 +84,10 @@ resource "aws_cloudwatch_event_permission" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCloudwatchEventPermissionInvalidStatementIDRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cloudwatch_event_rule_invalid_name_test.go b/rules/awsrules/models/aws_cloudwatch_event_rule_invalid_name_test.go index 2d8034c48..b966ffc13 100644 --- a/rules/awsrules/models/aws_cloudwatch_event_rule_invalid_name_test.go +++ b/rules/awsrules/models/aws_cloudwatch_event_rule_invalid_name_test.go @@ -84,7 +84,10 @@ resource "aws_cloudwatch_event_rule" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCloudwatchEventRuleInvalidNameRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cloudwatch_event_target_invalid_target_id_test.go b/rules/awsrules/models/aws_cloudwatch_event_target_invalid_target_id_test.go index a85e1b393..a59a9553a 100644 --- a/rules/awsrules/models/aws_cloudwatch_event_target_invalid_target_id_test.go +++ b/rules/awsrules/models/aws_cloudwatch_event_target_invalid_target_id_test.go @@ -84,7 +84,10 @@ resource "aws_cloudwatch_event_target" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCloudwatchEventTargetInvalidTargetIDRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cloudwatch_log_destination_invalid_name_test.go b/rules/awsrules/models/aws_cloudwatch_log_destination_invalid_name_test.go index 2b8524f23..fd06779d7 100644 --- a/rules/awsrules/models/aws_cloudwatch_log_destination_invalid_name_test.go +++ b/rules/awsrules/models/aws_cloudwatch_log_destination_invalid_name_test.go @@ -84,7 +84,10 @@ resource "aws_cloudwatch_log_destination" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCloudwatchLogDestinationInvalidNameRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cloudwatch_log_group_invalid_name_test.go b/rules/awsrules/models/aws_cloudwatch_log_group_invalid_name_test.go index 0d685515e..44ba82964 100644 --- a/rules/awsrules/models/aws_cloudwatch_log_group_invalid_name_test.go +++ b/rules/awsrules/models/aws_cloudwatch_log_group_invalid_name_test.go @@ -84,7 +84,10 @@ resource "aws_cloudwatch_log_group" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCloudwatchLogGroupInvalidNameRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cloudwatch_log_metric_filter_invalid_name_test.go b/rules/awsrules/models/aws_cloudwatch_log_metric_filter_invalid_name_test.go index 1a6c12727..90572e760 100644 --- a/rules/awsrules/models/aws_cloudwatch_log_metric_filter_invalid_name_test.go +++ b/rules/awsrules/models/aws_cloudwatch_log_metric_filter_invalid_name_test.go @@ -84,7 +84,10 @@ resource "aws_cloudwatch_log_metric_filter" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCloudwatchLogMetricFilterInvalidNameRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cloudwatch_log_stream_invalid_name_test.go b/rules/awsrules/models/aws_cloudwatch_log_stream_invalid_name_test.go index 87e4d4094..344fab986 100644 --- a/rules/awsrules/models/aws_cloudwatch_log_stream_invalid_name_test.go +++ b/rules/awsrules/models/aws_cloudwatch_log_stream_invalid_name_test.go @@ -84,7 +84,10 @@ resource "aws_cloudwatch_log_stream" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCloudwatchLogStreamInvalidNameRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cloudwatch_log_subscription_filter_invalid_distribution_test.go b/rules/awsrules/models/aws_cloudwatch_log_subscription_filter_invalid_distribution_test.go index 550c30a5e..ffe022cc5 100644 --- a/rules/awsrules/models/aws_cloudwatch_log_subscription_filter_invalid_distribution_test.go +++ b/rules/awsrules/models/aws_cloudwatch_log_subscription_filter_invalid_distribution_test.go @@ -84,7 +84,10 @@ resource "aws_cloudwatch_log_subscription_filter" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCloudwatchLogSubscriptionFilterInvalidDistributionRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cloudwatch_log_subscription_filter_invalid_name_test.go b/rules/awsrules/models/aws_cloudwatch_log_subscription_filter_invalid_name_test.go index fc01323b9..ced4d73be 100644 --- a/rules/awsrules/models/aws_cloudwatch_log_subscription_filter_invalid_name_test.go +++ b/rules/awsrules/models/aws_cloudwatch_log_subscription_filter_invalid_name_test.go @@ -84,7 +84,10 @@ resource "aws_cloudwatch_log_subscription_filter" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCloudwatchLogSubscriptionFilterInvalidNameRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cloudwatch_metric_alarm_invalid_comparison_operator_test.go b/rules/awsrules/models/aws_cloudwatch_metric_alarm_invalid_comparison_operator_test.go index 0f3789d73..a0ee08c9b 100644 --- a/rules/awsrules/models/aws_cloudwatch_metric_alarm_invalid_comparison_operator_test.go +++ b/rules/awsrules/models/aws_cloudwatch_metric_alarm_invalid_comparison_operator_test.go @@ -84,7 +84,10 @@ resource "aws_cloudwatch_metric_alarm" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCloudwatchMetricAlarmInvalidComparisonOperatorRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cloudwatch_metric_alarm_invalid_extended_statistic_test.go b/rules/awsrules/models/aws_cloudwatch_metric_alarm_invalid_extended_statistic_test.go index 0f6acc329..063d5a68f 100644 --- a/rules/awsrules/models/aws_cloudwatch_metric_alarm_invalid_extended_statistic_test.go +++ b/rules/awsrules/models/aws_cloudwatch_metric_alarm_invalid_extended_statistic_test.go @@ -84,7 +84,10 @@ resource "aws_cloudwatch_metric_alarm" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCloudwatchMetricAlarmInvalidExtendedStatisticRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cloudwatch_metric_alarm_invalid_namespace_test.go b/rules/awsrules/models/aws_cloudwatch_metric_alarm_invalid_namespace_test.go index 70f4c2c70..f2dc475f4 100644 --- a/rules/awsrules/models/aws_cloudwatch_metric_alarm_invalid_namespace_test.go +++ b/rules/awsrules/models/aws_cloudwatch_metric_alarm_invalid_namespace_test.go @@ -84,7 +84,10 @@ resource "aws_cloudwatch_metric_alarm" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCloudwatchMetricAlarmInvalidNamespaceRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cloudwatch_metric_alarm_invalid_statistic_test.go b/rules/awsrules/models/aws_cloudwatch_metric_alarm_invalid_statistic_test.go index 0de3cb165..5efd3c6e0 100644 --- a/rules/awsrules/models/aws_cloudwatch_metric_alarm_invalid_statistic_test.go +++ b/rules/awsrules/models/aws_cloudwatch_metric_alarm_invalid_statistic_test.go @@ -84,7 +84,10 @@ resource "aws_cloudwatch_metric_alarm" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCloudwatchMetricAlarmInvalidStatisticRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cloudwatch_metric_alarm_invalid_unit_test.go b/rules/awsrules/models/aws_cloudwatch_metric_alarm_invalid_unit_test.go index 808d2eb88..a80346cc1 100644 --- a/rules/awsrules/models/aws_cloudwatch_metric_alarm_invalid_unit_test.go +++ b/rules/awsrules/models/aws_cloudwatch_metric_alarm_invalid_unit_test.go @@ -84,7 +84,10 @@ resource "aws_cloudwatch_metric_alarm" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCloudwatchMetricAlarmInvalidUnitRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_codecommit_repository_invalid_repository_name_test.go b/rules/awsrules/models/aws_codecommit_repository_invalid_repository_name_test.go index 9e1be280b..27e9e334e 100644 --- a/rules/awsrules/models/aws_codecommit_repository_invalid_repository_name_test.go +++ b/rules/awsrules/models/aws_codecommit_repository_invalid_repository_name_test.go @@ -84,7 +84,10 @@ resource "aws_codecommit_repository" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCodecommitRepositoryInvalidRepositoryNameRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_codedeploy_app_invalid_compute_platform_test.go b/rules/awsrules/models/aws_codedeploy_app_invalid_compute_platform_test.go index 314ebd3da..213b00c8e 100644 --- a/rules/awsrules/models/aws_codedeploy_app_invalid_compute_platform_test.go +++ b/rules/awsrules/models/aws_codedeploy_app_invalid_compute_platform_test.go @@ -84,7 +84,10 @@ resource "aws_codedeploy_app" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCodedeployAppInvalidComputePlatformRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_codepipeline_invalid_name_test.go b/rules/awsrules/models/aws_codepipeline_invalid_name_test.go index f20284d39..a72a35043 100644 --- a/rules/awsrules/models/aws_codepipeline_invalid_name_test.go +++ b/rules/awsrules/models/aws_codepipeline_invalid_name_test.go @@ -84,7 +84,10 @@ resource "aws_codepipeline" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCodepipelineInvalidNameRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_codepipeline_invalid_role_arn_test.go b/rules/awsrules/models/aws_codepipeline_invalid_role_arn_test.go index 596d4c4d4..200c90b6b 100644 --- a/rules/awsrules/models/aws_codepipeline_invalid_role_arn_test.go +++ b/rules/awsrules/models/aws_codepipeline_invalid_role_arn_test.go @@ -84,7 +84,10 @@ resource "aws_codepipeline" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCodepipelineInvalidRoleArnRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_codepipeline_webhook_invalid_authentication_test.go b/rules/awsrules/models/aws_codepipeline_webhook_invalid_authentication_test.go index c090fc1c2..4263d4c5e 100644 --- a/rules/awsrules/models/aws_codepipeline_webhook_invalid_authentication_test.go +++ b/rules/awsrules/models/aws_codepipeline_webhook_invalid_authentication_test.go @@ -84,7 +84,10 @@ resource "aws_codepipeline_webhook" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCodepipelineWebhookInvalidAuthenticationRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_codepipeline_webhook_invalid_name_test.go b/rules/awsrules/models/aws_codepipeline_webhook_invalid_name_test.go index 3a65d00c6..63b8eaf59 100644 --- a/rules/awsrules/models/aws_codepipeline_webhook_invalid_name_test.go +++ b/rules/awsrules/models/aws_codepipeline_webhook_invalid_name_test.go @@ -84,7 +84,10 @@ resource "aws_codepipeline_webhook" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCodepipelineWebhookInvalidNameRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_codepipeline_webhook_invalid_target_action_test.go b/rules/awsrules/models/aws_codepipeline_webhook_invalid_target_action_test.go index c209624ff..953d41984 100644 --- a/rules/awsrules/models/aws_codepipeline_webhook_invalid_target_action_test.go +++ b/rules/awsrules/models/aws_codepipeline_webhook_invalid_target_action_test.go @@ -84,7 +84,10 @@ resource "aws_codepipeline_webhook" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCodepipelineWebhookInvalidTargetActionRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cognito_identity_pool_invalid_identity_pool_name_test.go b/rules/awsrules/models/aws_cognito_identity_pool_invalid_identity_pool_name_test.go index cb3cc47ec..3175ed522 100644 --- a/rules/awsrules/models/aws_cognito_identity_pool_invalid_identity_pool_name_test.go +++ b/rules/awsrules/models/aws_cognito_identity_pool_invalid_identity_pool_name_test.go @@ -84,7 +84,10 @@ resource "aws_cognito_identity_pool" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCognitoIdentityPoolInvalidIdentityPoolNameRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cognito_identity_pool_roles_attachment_invalid_identity_pool_id_test.go b/rules/awsrules/models/aws_cognito_identity_pool_roles_attachment_invalid_identity_pool_id_test.go index 6415cf986..194133b56 100644 --- a/rules/awsrules/models/aws_cognito_identity_pool_roles_attachment_invalid_identity_pool_id_test.go +++ b/rules/awsrules/models/aws_cognito_identity_pool_roles_attachment_invalid_identity_pool_id_test.go @@ -84,7 +84,10 @@ resource "aws_cognito_identity_pool_roles_attachment" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCognitoIdentityPoolRolesAttachmentInvalidIdentityPoolIDRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cognito_identity_provider_invalid_provider_name_test.go b/rules/awsrules/models/aws_cognito_identity_provider_invalid_provider_name_test.go index 8ee20c7be..d72c82367 100644 --- a/rules/awsrules/models/aws_cognito_identity_provider_invalid_provider_name_test.go +++ b/rules/awsrules/models/aws_cognito_identity_provider_invalid_provider_name_test.go @@ -84,7 +84,10 @@ resource "aws_cognito_identity_provider" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCognitoIdentityProviderInvalidProviderNameRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cognito_identity_provider_invalid_provider_type_test.go b/rules/awsrules/models/aws_cognito_identity_provider_invalid_provider_type_test.go index 8fc9751bb..7ebed56b7 100644 --- a/rules/awsrules/models/aws_cognito_identity_provider_invalid_provider_type_test.go +++ b/rules/awsrules/models/aws_cognito_identity_provider_invalid_provider_type_test.go @@ -84,7 +84,10 @@ resource "aws_cognito_identity_provider" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCognitoIdentityProviderInvalidProviderTypeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cognito_identity_provider_invalid_user_pool_id_test.go b/rules/awsrules/models/aws_cognito_identity_provider_invalid_user_pool_id_test.go index d6749a0b7..23b763914 100644 --- a/rules/awsrules/models/aws_cognito_identity_provider_invalid_user_pool_id_test.go +++ b/rules/awsrules/models/aws_cognito_identity_provider_invalid_user_pool_id_test.go @@ -84,7 +84,10 @@ resource "aws_cognito_identity_provider" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCognitoIdentityProviderInvalidUserPoolIDRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cognito_resource_server_invalid_identifier_test.go b/rules/awsrules/models/aws_cognito_resource_server_invalid_identifier_test.go index 98451a55a..707c5ffed 100644 --- a/rules/awsrules/models/aws_cognito_resource_server_invalid_identifier_test.go +++ b/rules/awsrules/models/aws_cognito_resource_server_invalid_identifier_test.go @@ -84,7 +84,10 @@ resource "aws_cognito_resource_server" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCognitoResourceServerInvalidIdentifierRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cognito_resource_server_invalid_name_test.go b/rules/awsrules/models/aws_cognito_resource_server_invalid_name_test.go index 114418ae6..30af55b87 100644 --- a/rules/awsrules/models/aws_cognito_resource_server_invalid_name_test.go +++ b/rules/awsrules/models/aws_cognito_resource_server_invalid_name_test.go @@ -84,7 +84,10 @@ resource "aws_cognito_resource_server" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCognitoResourceServerInvalidNameRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cognito_user_group_invalid_name_test.go b/rules/awsrules/models/aws_cognito_user_group_invalid_name_test.go index fd227233a..397f13c7e 100644 --- a/rules/awsrules/models/aws_cognito_user_group_invalid_name_test.go +++ b/rules/awsrules/models/aws_cognito_user_group_invalid_name_test.go @@ -84,7 +84,10 @@ resource "aws_cognito_user_group" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCognitoUserGroupInvalidNameRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cognito_user_group_invalid_role_arn_test.go b/rules/awsrules/models/aws_cognito_user_group_invalid_role_arn_test.go index 29bf9324a..5c516b6f8 100644 --- a/rules/awsrules/models/aws_cognito_user_group_invalid_role_arn_test.go +++ b/rules/awsrules/models/aws_cognito_user_group_invalid_role_arn_test.go @@ -84,7 +84,10 @@ resource "aws_cognito_user_group" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCognitoUserGroupInvalidRoleArnRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cognito_user_pool_client_invalid_default_redirect_uri_test.go b/rules/awsrules/models/aws_cognito_user_pool_client_invalid_default_redirect_uri_test.go index 5705e1662..78e4f7df8 100644 --- a/rules/awsrules/models/aws_cognito_user_pool_client_invalid_default_redirect_uri_test.go +++ b/rules/awsrules/models/aws_cognito_user_pool_client_invalid_default_redirect_uri_test.go @@ -84,7 +84,10 @@ resource "aws_cognito_user_pool_client" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCognitoUserPoolClientInvalidDefaultRedirectURIRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cognito_user_pool_client_invalid_name_test.go b/rules/awsrules/models/aws_cognito_user_pool_client_invalid_name_test.go index 3966fcd0d..a159c82e9 100644 --- a/rules/awsrules/models/aws_cognito_user_pool_client_invalid_name_test.go +++ b/rules/awsrules/models/aws_cognito_user_pool_client_invalid_name_test.go @@ -84,7 +84,10 @@ resource "aws_cognito_user_pool_client" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCognitoUserPoolClientInvalidNameRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cognito_user_pool_domain_invalid_domain_test.go b/rules/awsrules/models/aws_cognito_user_pool_domain_invalid_domain_test.go index 4804e426f..1af0fb405 100644 --- a/rules/awsrules/models/aws_cognito_user_pool_domain_invalid_domain_test.go +++ b/rules/awsrules/models/aws_cognito_user_pool_domain_invalid_domain_test.go @@ -84,7 +84,10 @@ resource "aws_cognito_user_pool_domain" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCognitoUserPoolDomainInvalidDomainRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cognito_user_pool_invalid_email_verification_message_test.go b/rules/awsrules/models/aws_cognito_user_pool_invalid_email_verification_message_test.go index df74921ee..e4e11dcb2 100644 --- a/rules/awsrules/models/aws_cognito_user_pool_invalid_email_verification_message_test.go +++ b/rules/awsrules/models/aws_cognito_user_pool_invalid_email_verification_message_test.go @@ -84,7 +84,10 @@ resource "aws_cognito_user_pool" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCognitoUserPoolInvalidEmailVerificationMessageRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cognito_user_pool_invalid_mfa_configuration_test.go b/rules/awsrules/models/aws_cognito_user_pool_invalid_mfa_configuration_test.go index 64eefc4a5..74a98fce3 100644 --- a/rules/awsrules/models/aws_cognito_user_pool_invalid_mfa_configuration_test.go +++ b/rules/awsrules/models/aws_cognito_user_pool_invalid_mfa_configuration_test.go @@ -84,7 +84,10 @@ resource "aws_cognito_user_pool" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCognitoUserPoolInvalidMfaConfigurationRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cognito_user_pool_invalid_name_test.go b/rules/awsrules/models/aws_cognito_user_pool_invalid_name_test.go index 0e5abfb54..f86791d4b 100644 --- a/rules/awsrules/models/aws_cognito_user_pool_invalid_name_test.go +++ b/rules/awsrules/models/aws_cognito_user_pool_invalid_name_test.go @@ -84,7 +84,10 @@ resource "aws_cognito_user_pool" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCognitoUserPoolInvalidNameRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cognito_user_pool_invalid_sms_authentication_message_test.go b/rules/awsrules/models/aws_cognito_user_pool_invalid_sms_authentication_message_test.go index 2b44ff591..89726e666 100644 --- a/rules/awsrules/models/aws_cognito_user_pool_invalid_sms_authentication_message_test.go +++ b/rules/awsrules/models/aws_cognito_user_pool_invalid_sms_authentication_message_test.go @@ -84,7 +84,10 @@ resource "aws_cognito_user_pool" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCognitoUserPoolInvalidSmsAuthenticationMessageRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cognito_user_pool_invalid_sms_verification_message_test.go b/rules/awsrules/models/aws_cognito_user_pool_invalid_sms_verification_message_test.go index 1482dd7dd..881f67162 100644 --- a/rules/awsrules/models/aws_cognito_user_pool_invalid_sms_verification_message_test.go +++ b/rules/awsrules/models/aws_cognito_user_pool_invalid_sms_verification_message_test.go @@ -84,7 +84,10 @@ resource "aws_cognito_user_pool" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCognitoUserPoolInvalidSmsVerificationMessageRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_config_aggregate_authorization_invalid_account_id_test.go b/rules/awsrules/models/aws_config_aggregate_authorization_invalid_account_id_test.go index 7e06cd885..8442e5ca5 100644 --- a/rules/awsrules/models/aws_config_aggregate_authorization_invalid_account_id_test.go +++ b/rules/awsrules/models/aws_config_aggregate_authorization_invalid_account_id_test.go @@ -84,7 +84,10 @@ resource "aws_config_aggregate_authorization" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsConfigAggregateAuthorizationInvalidAccountIDRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_config_config_rule_invalid_maximum_execution_frequency_test.go b/rules/awsrules/models/aws_config_config_rule_invalid_maximum_execution_frequency_test.go index 35f349796..117cfa524 100644 --- a/rules/awsrules/models/aws_config_config_rule_invalid_maximum_execution_frequency_test.go +++ b/rules/awsrules/models/aws_config_config_rule_invalid_maximum_execution_frequency_test.go @@ -84,7 +84,10 @@ resource "aws_config_config_rule" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsConfigConfigRuleInvalidMaximumExecutionFrequencyRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_config_configuration_aggregator_invalid_name_test.go b/rules/awsrules/models/aws_config_configuration_aggregator_invalid_name_test.go index 7dbf940e0..1e2709060 100644 --- a/rules/awsrules/models/aws_config_configuration_aggregator_invalid_name_test.go +++ b/rules/awsrules/models/aws_config_configuration_aggregator_invalid_name_test.go @@ -84,7 +84,10 @@ resource "aws_config_configuration_aggregator" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsConfigConfigurationAggregatorInvalidNameRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cur_report_definition_invalid_compression_test.go b/rules/awsrules/models/aws_cur_report_definition_invalid_compression_test.go index 65dbd1f1a..d7b7e170e 100644 --- a/rules/awsrules/models/aws_cur_report_definition_invalid_compression_test.go +++ b/rules/awsrules/models/aws_cur_report_definition_invalid_compression_test.go @@ -84,7 +84,10 @@ resource "aws_cur_report_definition" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCurReportDefinitionInvalidCompressionRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cur_report_definition_invalid_format_test.go b/rules/awsrules/models/aws_cur_report_definition_invalid_format_test.go index 628fb6415..fe4ac64b4 100644 --- a/rules/awsrules/models/aws_cur_report_definition_invalid_format_test.go +++ b/rules/awsrules/models/aws_cur_report_definition_invalid_format_test.go @@ -84,7 +84,10 @@ resource "aws_cur_report_definition" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCurReportDefinitionInvalidFormatRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cur_report_definition_invalid_report_name_test.go b/rules/awsrules/models/aws_cur_report_definition_invalid_report_name_test.go index 5c534a25c..feeacedc7 100644 --- a/rules/awsrules/models/aws_cur_report_definition_invalid_report_name_test.go +++ b/rules/awsrules/models/aws_cur_report_definition_invalid_report_name_test.go @@ -84,7 +84,10 @@ resource "aws_cur_report_definition" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCurReportDefinitionInvalidReportNameRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cur_report_definition_invalid_s3_prefix_test.go b/rules/awsrules/models/aws_cur_report_definition_invalid_s3_prefix_test.go index 49fa97028..3ab18a21c 100644 --- a/rules/awsrules/models/aws_cur_report_definition_invalid_s3_prefix_test.go +++ b/rules/awsrules/models/aws_cur_report_definition_invalid_s3_prefix_test.go @@ -86,7 +86,10 @@ resource "aws_cur_report_definition" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCurReportDefinitionInvalidS3PrefixRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cur_report_definition_invalid_s3_region_test.go b/rules/awsrules/models/aws_cur_report_definition_invalid_s3_region_test.go index 3b8fba139..e35ddf23c 100644 --- a/rules/awsrules/models/aws_cur_report_definition_invalid_s3_region_test.go +++ b/rules/awsrules/models/aws_cur_report_definition_invalid_s3_region_test.go @@ -84,7 +84,10 @@ resource "aws_cur_report_definition" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCurReportDefinitionInvalidS3RegionRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_cur_report_definition_invalid_time_unit_test.go b/rules/awsrules/models/aws_cur_report_definition_invalid_time_unit_test.go index b7f9006b6..bcc34b73c 100644 --- a/rules/awsrules/models/aws_cur_report_definition_invalid_time_unit_test.go +++ b/rules/awsrules/models/aws_cur_report_definition_invalid_time_unit_test.go @@ -84,7 +84,10 @@ resource "aws_cur_report_definition" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsCurReportDefinitionInvalidTimeUnitRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_datasync_agent_invalid_activation_key_test.go b/rules/awsrules/models/aws_datasync_agent_invalid_activation_key_test.go index f216730cd..08dc37e68 100644 --- a/rules/awsrules/models/aws_datasync_agent_invalid_activation_key_test.go +++ b/rules/awsrules/models/aws_datasync_agent_invalid_activation_key_test.go @@ -84,7 +84,10 @@ resource "aws_datasync_agent" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsDatasyncAgentInvalidActivationKeyRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_datasync_agent_invalid_name_test.go b/rules/awsrules/models/aws_datasync_agent_invalid_name_test.go index 899154ee8..0fcc6d2de 100644 --- a/rules/awsrules/models/aws_datasync_agent_invalid_name_test.go +++ b/rules/awsrules/models/aws_datasync_agent_invalid_name_test.go @@ -84,7 +84,10 @@ resource "aws_datasync_agent" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsDatasyncAgentInvalidNameRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_datasync_location_efs_invalid_efs_file_system_arn_test.go b/rules/awsrules/models/aws_datasync_location_efs_invalid_efs_file_system_arn_test.go index 17a3f15c7..fdd2f51a8 100644 --- a/rules/awsrules/models/aws_datasync_location_efs_invalid_efs_file_system_arn_test.go +++ b/rules/awsrules/models/aws_datasync_location_efs_invalid_efs_file_system_arn_test.go @@ -84,7 +84,10 @@ resource "aws_datasync_location_efs" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsDatasyncLocationEfsInvalidEfsFileSystemArnRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_datasync_location_efs_invalid_subdirectory_test.go b/rules/awsrules/models/aws_datasync_location_efs_invalid_subdirectory_test.go index 8c4f8884f..4020cce65 100644 --- a/rules/awsrules/models/aws_datasync_location_efs_invalid_subdirectory_test.go +++ b/rules/awsrules/models/aws_datasync_location_efs_invalid_subdirectory_test.go @@ -84,7 +84,10 @@ resource "aws_datasync_location_efs" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsDatasyncLocationEfsInvalidSubdirectoryRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_datasync_location_nfs_invalid_server_hostname_test.go b/rules/awsrules/models/aws_datasync_location_nfs_invalid_server_hostname_test.go index e8817aa85..712784fb7 100644 --- a/rules/awsrules/models/aws_datasync_location_nfs_invalid_server_hostname_test.go +++ b/rules/awsrules/models/aws_datasync_location_nfs_invalid_server_hostname_test.go @@ -84,7 +84,10 @@ resource "aws_datasync_location_nfs" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsDatasyncLocationNfsInvalidServerHostnameRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_datasync_location_nfs_invalid_subdirectory_test.go b/rules/awsrules/models/aws_datasync_location_nfs_invalid_subdirectory_test.go index 8da07db5d..211bed533 100644 --- a/rules/awsrules/models/aws_datasync_location_nfs_invalid_subdirectory_test.go +++ b/rules/awsrules/models/aws_datasync_location_nfs_invalid_subdirectory_test.go @@ -84,7 +84,10 @@ resource "aws_datasync_location_nfs" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsDatasyncLocationNfsInvalidSubdirectoryRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_datasync_location_s3_invalid_s3_bucket_arn_test.go b/rules/awsrules/models/aws_datasync_location_s3_invalid_s3_bucket_arn_test.go index 24a01153c..9d4c773fb 100644 --- a/rules/awsrules/models/aws_datasync_location_s3_invalid_s3_bucket_arn_test.go +++ b/rules/awsrules/models/aws_datasync_location_s3_invalid_s3_bucket_arn_test.go @@ -84,7 +84,10 @@ resource "aws_datasync_location_s3" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsDatasyncLocationS3InvalidS3BucketArnRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_datasync_task_invalid_cloudwatch_log_group_arn_test.go b/rules/awsrules/models/aws_datasync_task_invalid_cloudwatch_log_group_arn_test.go index 4be284609..8a89ef2f9 100644 --- a/rules/awsrules/models/aws_datasync_task_invalid_cloudwatch_log_group_arn_test.go +++ b/rules/awsrules/models/aws_datasync_task_invalid_cloudwatch_log_group_arn_test.go @@ -84,7 +84,10 @@ resource "aws_datasync_task" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsDatasyncTaskInvalidCloudwatchLogGroupArnRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_datasync_task_invalid_source_location_arn_test.go b/rules/awsrules/models/aws_datasync_task_invalid_source_location_arn_test.go index 08e43d8b7..ef31898d5 100644 --- a/rules/awsrules/models/aws_datasync_task_invalid_source_location_arn_test.go +++ b/rules/awsrules/models/aws_datasync_task_invalid_source_location_arn_test.go @@ -84,7 +84,10 @@ resource "aws_datasync_task" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsDatasyncTaskInvalidSourceLocationArnRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_directory_service_conditional_forwarder_invalid_directory_id_test.go b/rules/awsrules/models/aws_directory_service_conditional_forwarder_invalid_directory_id_test.go index 62a10bc79..161b43030 100644 --- a/rules/awsrules/models/aws_directory_service_conditional_forwarder_invalid_directory_id_test.go +++ b/rules/awsrules/models/aws_directory_service_conditional_forwarder_invalid_directory_id_test.go @@ -84,7 +84,10 @@ resource "aws_directory_service_conditional_forwarder" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsDirectoryServiceConditionalForwarderInvalidDirectoryIDRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_directory_service_conditional_forwarder_invalid_remote_domain_name_test.go b/rules/awsrules/models/aws_directory_service_conditional_forwarder_invalid_remote_domain_name_test.go index 2f7ed0b2e..700e8ae4a 100644 --- a/rules/awsrules/models/aws_directory_service_conditional_forwarder_invalid_remote_domain_name_test.go +++ b/rules/awsrules/models/aws_directory_service_conditional_forwarder_invalid_remote_domain_name_test.go @@ -84,7 +84,10 @@ resource "aws_directory_service_conditional_forwarder" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsDirectoryServiceConditionalForwarderInvalidRemoteDomainNameRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_directory_service_directory_invalid_description_test.go b/rules/awsrules/models/aws_directory_service_directory_invalid_description_test.go index 784809a9d..e3205a191 100644 --- a/rules/awsrules/models/aws_directory_service_directory_invalid_description_test.go +++ b/rules/awsrules/models/aws_directory_service_directory_invalid_description_test.go @@ -84,7 +84,10 @@ resource "aws_directory_service_directory" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsDirectoryServiceDirectoryInvalidDescriptionRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_directory_service_directory_invalid_edition_test.go b/rules/awsrules/models/aws_directory_service_directory_invalid_edition_test.go index 65ea738af..31268e139 100644 --- a/rules/awsrules/models/aws_directory_service_directory_invalid_edition_test.go +++ b/rules/awsrules/models/aws_directory_service_directory_invalid_edition_test.go @@ -84,7 +84,10 @@ resource "aws_directory_service_directory" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsDirectoryServiceDirectoryInvalidEditionRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_directory_service_directory_invalid_name_test.go b/rules/awsrules/models/aws_directory_service_directory_invalid_name_test.go index 58240b0f1..d1acb21af 100644 --- a/rules/awsrules/models/aws_directory_service_directory_invalid_name_test.go +++ b/rules/awsrules/models/aws_directory_service_directory_invalid_name_test.go @@ -84,7 +84,10 @@ resource "aws_directory_service_directory" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsDirectoryServiceDirectoryInvalidNameRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_directory_service_directory_invalid_short_name_test.go b/rules/awsrules/models/aws_directory_service_directory_invalid_short_name_test.go index d274d8c21..c794b49dd 100644 --- a/rules/awsrules/models/aws_directory_service_directory_invalid_short_name_test.go +++ b/rules/awsrules/models/aws_directory_service_directory_invalid_short_name_test.go @@ -84,7 +84,10 @@ resource "aws_directory_service_directory" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsDirectoryServiceDirectoryInvalidShortNameRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_directory_service_directory_invalid_size_test.go b/rules/awsrules/models/aws_directory_service_directory_invalid_size_test.go index 5d476ea80..8992471ba 100644 --- a/rules/awsrules/models/aws_directory_service_directory_invalid_size_test.go +++ b/rules/awsrules/models/aws_directory_service_directory_invalid_size_test.go @@ -84,7 +84,10 @@ resource "aws_directory_service_directory" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsDirectoryServiceDirectoryInvalidSizeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_directory_service_directory_invalid_type_test.go b/rules/awsrules/models/aws_directory_service_directory_invalid_type_test.go index c42d15494..642b0ce13 100644 --- a/rules/awsrules/models/aws_directory_service_directory_invalid_type_test.go +++ b/rules/awsrules/models/aws_directory_service_directory_invalid_type_test.go @@ -84,7 +84,10 @@ resource "aws_directory_service_directory" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsDirectoryServiceDirectoryInvalidTypeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_dlm_lifecycle_policy_invalid_state_test.go b/rules/awsrules/models/aws_dlm_lifecycle_policy_invalid_state_test.go index 427c93d40..d4a1983da 100644 --- a/rules/awsrules/models/aws_dlm_lifecycle_policy_invalid_state_test.go +++ b/rules/awsrules/models/aws_dlm_lifecycle_policy_invalid_state_test.go @@ -84,7 +84,10 @@ resource "aws_dlm_lifecycle_policy" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsDlmLifecyclePolicyInvalidStateRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_dms_endpoint_invalid_endpoint_type_test.go b/rules/awsrules/models/aws_dms_endpoint_invalid_endpoint_type_test.go index b6958db8d..78cacd483 100644 --- a/rules/awsrules/models/aws_dms_endpoint_invalid_endpoint_type_test.go +++ b/rules/awsrules/models/aws_dms_endpoint_invalid_endpoint_type_test.go @@ -84,7 +84,10 @@ resource "aws_dms_endpoint" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsDmsEndpointInvalidEndpointTypeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_dms_endpoint_invalid_ssl_mode_test.go b/rules/awsrules/models/aws_dms_endpoint_invalid_ssl_mode_test.go index a82d90103..e71a2fcaa 100644 --- a/rules/awsrules/models/aws_dms_endpoint_invalid_ssl_mode_test.go +++ b/rules/awsrules/models/aws_dms_endpoint_invalid_ssl_mode_test.go @@ -84,7 +84,10 @@ resource "aws_dms_endpoint" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsDmsEndpointInvalidSslModeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_dms_replication_task_invalid_migration_type_test.go b/rules/awsrules/models/aws_dms_replication_task_invalid_migration_type_test.go index 29bc9169f..893e61b84 100644 --- a/rules/awsrules/models/aws_dms_replication_task_invalid_migration_type_test.go +++ b/rules/awsrules/models/aws_dms_replication_task_invalid_migration_type_test.go @@ -84,7 +84,10 @@ resource "aws_dms_replication_task" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsDmsReplicationTaskInvalidMigrationTypeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_dx_bgp_peer_invalid_address_family_test.go b/rules/awsrules/models/aws_dx_bgp_peer_invalid_address_family_test.go index 7f7af8d22..b65c787e7 100644 --- a/rules/awsrules/models/aws_dx_bgp_peer_invalid_address_family_test.go +++ b/rules/awsrules/models/aws_dx_bgp_peer_invalid_address_family_test.go @@ -84,7 +84,10 @@ resource "aws_dx_bgp_peer" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsDxBgpPeerInvalidAddressFamilyRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_dynamodb_global_table_invalid_name_test.go b/rules/awsrules/models/aws_dynamodb_global_table_invalid_name_test.go index 8be96e089..8f3475757 100644 --- a/rules/awsrules/models/aws_dynamodb_global_table_invalid_name_test.go +++ b/rules/awsrules/models/aws_dynamodb_global_table_invalid_name_test.go @@ -84,7 +84,10 @@ resource "aws_dynamodb_global_table" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsDynamoDBGlobalTableInvalidNameRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_dynamodb_table_invalid_billing_mode_test.go b/rules/awsrules/models/aws_dynamodb_table_invalid_billing_mode_test.go index 160add5c0..6566daedb 100644 --- a/rules/awsrules/models/aws_dynamodb_table_invalid_billing_mode_test.go +++ b/rules/awsrules/models/aws_dynamodb_table_invalid_billing_mode_test.go @@ -84,7 +84,10 @@ resource "aws_dynamodb_table" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsDynamoDBTableInvalidBillingModeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_dynamodb_table_invalid_stream_view_type_test.go b/rules/awsrules/models/aws_dynamodb_table_invalid_stream_view_type_test.go index 3aa2e35dc..fd535bcd4 100644 --- a/rules/awsrules/models/aws_dynamodb_table_invalid_stream_view_type_test.go +++ b/rules/awsrules/models/aws_dynamodb_table_invalid_stream_view_type_test.go @@ -84,7 +84,10 @@ resource "aws_dynamodb_table" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsDynamoDBTableInvalidStreamViewTypeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_ebs_volume_invalid_type_test.go b/rules/awsrules/models/aws_ebs_volume_invalid_type_test.go index 01bd29626..eee003803 100644 --- a/rules/awsrules/models/aws_ebs_volume_invalid_type_test.go +++ b/rules/awsrules/models/aws_ebs_volume_invalid_type_test.go @@ -84,7 +84,10 @@ resource "aws_ebs_volume" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsEbsVolumeInvalidTypeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_ec2_capacity_reservation_invalid_end_date_type_test.go b/rules/awsrules/models/aws_ec2_capacity_reservation_invalid_end_date_type_test.go index 28ff660d0..f7e2e0979 100644 --- a/rules/awsrules/models/aws_ec2_capacity_reservation_invalid_end_date_type_test.go +++ b/rules/awsrules/models/aws_ec2_capacity_reservation_invalid_end_date_type_test.go @@ -84,7 +84,10 @@ resource "aws_ec2_capacity_reservation" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsEc2CapacityReservationInvalidEndDateTypeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_ec2_capacity_reservation_invalid_instance_match_criteria_test.go b/rules/awsrules/models/aws_ec2_capacity_reservation_invalid_instance_match_criteria_test.go index 04e4f184b..f06247b81 100644 --- a/rules/awsrules/models/aws_ec2_capacity_reservation_invalid_instance_match_criteria_test.go +++ b/rules/awsrules/models/aws_ec2_capacity_reservation_invalid_instance_match_criteria_test.go @@ -84,7 +84,10 @@ resource "aws_ec2_capacity_reservation" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsEc2CapacityReservationInvalidInstanceMatchCriteriaRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_ec2_capacity_reservation_invalid_instance_platform_test.go b/rules/awsrules/models/aws_ec2_capacity_reservation_invalid_instance_platform_test.go index 7488c497a..e2cd6ec70 100644 --- a/rules/awsrules/models/aws_ec2_capacity_reservation_invalid_instance_platform_test.go +++ b/rules/awsrules/models/aws_ec2_capacity_reservation_invalid_instance_platform_test.go @@ -84,7 +84,10 @@ resource "aws_ec2_capacity_reservation" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsEc2CapacityReservationInvalidInstancePlatformRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_ec2_capacity_reservation_invalid_tenancy_test.go b/rules/awsrules/models/aws_ec2_capacity_reservation_invalid_tenancy_test.go index e767f87d5..371d7c4bc 100644 --- a/rules/awsrules/models/aws_ec2_capacity_reservation_invalid_tenancy_test.go +++ b/rules/awsrules/models/aws_ec2_capacity_reservation_invalid_tenancy_test.go @@ -84,7 +84,10 @@ resource "aws_ec2_capacity_reservation" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsEc2CapacityReservationInvalidTenancyRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_ec2_client_vpn_endpoint_invalid_transport_protocol_test.go b/rules/awsrules/models/aws_ec2_client_vpn_endpoint_invalid_transport_protocol_test.go index a3e71d39c..df39789e9 100644 --- a/rules/awsrules/models/aws_ec2_client_vpn_endpoint_invalid_transport_protocol_test.go +++ b/rules/awsrules/models/aws_ec2_client_vpn_endpoint_invalid_transport_protocol_test.go @@ -84,7 +84,10 @@ resource "aws_ec2_client_vpn_endpoint" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsEc2ClientVpnEndpointInvalidTransportProtocolRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_ec2_fleet_invalid_excess_capacity_termination_policy_test.go b/rules/awsrules/models/aws_ec2_fleet_invalid_excess_capacity_termination_policy_test.go index ba0444372..33c16e117 100644 --- a/rules/awsrules/models/aws_ec2_fleet_invalid_excess_capacity_termination_policy_test.go +++ b/rules/awsrules/models/aws_ec2_fleet_invalid_excess_capacity_termination_policy_test.go @@ -84,7 +84,10 @@ resource "aws_ec2_fleet" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsEc2FleetInvalidExcessCapacityTerminationPolicyRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_ec2_fleet_invalid_type_test.go b/rules/awsrules/models/aws_ec2_fleet_invalid_type_test.go index 5dda8f2cc..b6493a6f5 100644 --- a/rules/awsrules/models/aws_ec2_fleet_invalid_type_test.go +++ b/rules/awsrules/models/aws_ec2_fleet_invalid_type_test.go @@ -84,7 +84,10 @@ resource "aws_ec2_fleet" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsEc2FleetInvalidTypeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_ec2_transit_gateway_invalid_auto_accept_shared_attachments_test.go b/rules/awsrules/models/aws_ec2_transit_gateway_invalid_auto_accept_shared_attachments_test.go index eb71855d1..5dda4dcec 100644 --- a/rules/awsrules/models/aws_ec2_transit_gateway_invalid_auto_accept_shared_attachments_test.go +++ b/rules/awsrules/models/aws_ec2_transit_gateway_invalid_auto_accept_shared_attachments_test.go @@ -84,7 +84,10 @@ resource "aws_ec2_transit_gateway" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsEc2TransitGatewayInvalidAutoAcceptSharedAttachmentsRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_ec2_transit_gateway_invalid_default_route_table_association_test.go b/rules/awsrules/models/aws_ec2_transit_gateway_invalid_default_route_table_association_test.go index e83da72c7..a537be05e 100644 --- a/rules/awsrules/models/aws_ec2_transit_gateway_invalid_default_route_table_association_test.go +++ b/rules/awsrules/models/aws_ec2_transit_gateway_invalid_default_route_table_association_test.go @@ -84,7 +84,10 @@ resource "aws_ec2_transit_gateway" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsEc2TransitGatewayInvalidDefaultRouteTableAssociationRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_ec2_transit_gateway_invalid_default_route_table_propagation_test.go b/rules/awsrules/models/aws_ec2_transit_gateway_invalid_default_route_table_propagation_test.go index be423fe94..4c7a25b63 100644 --- a/rules/awsrules/models/aws_ec2_transit_gateway_invalid_default_route_table_propagation_test.go +++ b/rules/awsrules/models/aws_ec2_transit_gateway_invalid_default_route_table_propagation_test.go @@ -84,7 +84,10 @@ resource "aws_ec2_transit_gateway" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsEc2TransitGatewayInvalidDefaultRouteTablePropagationRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_ec2_transit_gateway_invalid_dns_support_test.go b/rules/awsrules/models/aws_ec2_transit_gateway_invalid_dns_support_test.go index 7b0bc6fe5..4101a6865 100644 --- a/rules/awsrules/models/aws_ec2_transit_gateway_invalid_dns_support_test.go +++ b/rules/awsrules/models/aws_ec2_transit_gateway_invalid_dns_support_test.go @@ -84,7 +84,10 @@ resource "aws_ec2_transit_gateway" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsEc2TransitGatewayInvalidDNSSupportRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_ec2_transit_gateway_vpc_attachment_invalid_ipv6_support_test.go b/rules/awsrules/models/aws_ec2_transit_gateway_vpc_attachment_invalid_ipv6_support_test.go index cd5c138c6..c4442a095 100644 --- a/rules/awsrules/models/aws_ec2_transit_gateway_vpc_attachment_invalid_ipv6_support_test.go +++ b/rules/awsrules/models/aws_ec2_transit_gateway_vpc_attachment_invalid_ipv6_support_test.go @@ -84,7 +84,10 @@ resource "aws_ec2_transit_gateway_vpc_attachment" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsEc2TransitGatewayVpcAttachmentInvalidIpv6SupportRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_ecr_lifecycle_policy_invalid_repository_test.go b/rules/awsrules/models/aws_ecr_lifecycle_policy_invalid_repository_test.go index daac3d181..f3b9534b6 100644 --- a/rules/awsrules/models/aws_ecr_lifecycle_policy_invalid_repository_test.go +++ b/rules/awsrules/models/aws_ecr_lifecycle_policy_invalid_repository_test.go @@ -84,7 +84,10 @@ resource "aws_ecr_lifecycle_policy" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsEcrLifecyclePolicyInvalidRepositoryRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_ecs_service_invalid_launch_type_test.go b/rules/awsrules/models/aws_ecs_service_invalid_launch_type_test.go index 45d24effe..5b3513797 100644 --- a/rules/awsrules/models/aws_ecs_service_invalid_launch_type_test.go +++ b/rules/awsrules/models/aws_ecs_service_invalid_launch_type_test.go @@ -84,7 +84,10 @@ resource "aws_ecs_service" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsEcsServiceInvalidLaunchTypeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_ecs_service_invalid_propagate_tags_test.go b/rules/awsrules/models/aws_ecs_service_invalid_propagate_tags_test.go index 16ce82885..914dd7809 100644 --- a/rules/awsrules/models/aws_ecs_service_invalid_propagate_tags_test.go +++ b/rules/awsrules/models/aws_ecs_service_invalid_propagate_tags_test.go @@ -84,7 +84,10 @@ resource "aws_ecs_service" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsEcsServiceInvalidPropagateTagsRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_ecs_service_invalid_scheduling_strategy_test.go b/rules/awsrules/models/aws_ecs_service_invalid_scheduling_strategy_test.go index f83c1008e..d9bffcaef 100644 --- a/rules/awsrules/models/aws_ecs_service_invalid_scheduling_strategy_test.go +++ b/rules/awsrules/models/aws_ecs_service_invalid_scheduling_strategy_test.go @@ -84,7 +84,10 @@ resource "aws_ecs_service" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsEcsServiceInvalidSchedulingStrategyRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_ecs_task_definition_invalid_ipc_mode_test.go b/rules/awsrules/models/aws_ecs_task_definition_invalid_ipc_mode_test.go index 4911e2a81..5da047bb3 100644 --- a/rules/awsrules/models/aws_ecs_task_definition_invalid_ipc_mode_test.go +++ b/rules/awsrules/models/aws_ecs_task_definition_invalid_ipc_mode_test.go @@ -84,7 +84,10 @@ resource "aws_ecs_task_definition" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsEcsTaskDefinitionInvalidIpcModeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_ecs_task_definition_invalid_network_mode_test.go b/rules/awsrules/models/aws_ecs_task_definition_invalid_network_mode_test.go index 0f40cd092..a4db94339 100644 --- a/rules/awsrules/models/aws_ecs_task_definition_invalid_network_mode_test.go +++ b/rules/awsrules/models/aws_ecs_task_definition_invalid_network_mode_test.go @@ -84,7 +84,10 @@ resource "aws_ecs_task_definition" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsEcsTaskDefinitionInvalidNetworkModeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_ecs_task_definition_invalid_pid_mode_test.go b/rules/awsrules/models/aws_ecs_task_definition_invalid_pid_mode_test.go index 6aff3e59d..283d9e59b 100644 --- a/rules/awsrules/models/aws_ecs_task_definition_invalid_pid_mode_test.go +++ b/rules/awsrules/models/aws_ecs_task_definition_invalid_pid_mode_test.go @@ -84,7 +84,10 @@ resource "aws_ecs_task_definition" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsEcsTaskDefinitionInvalidPidModeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_efs_file_system_invalid_performance_mode_test.go b/rules/awsrules/models/aws_efs_file_system_invalid_performance_mode_test.go index 39b433b0d..6ecb73b3a 100644 --- a/rules/awsrules/models/aws_efs_file_system_invalid_performance_mode_test.go +++ b/rules/awsrules/models/aws_efs_file_system_invalid_performance_mode_test.go @@ -84,7 +84,10 @@ resource "aws_efs_file_system" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsEfsFileSystemInvalidPerformanceModeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_efs_file_system_invalid_throughput_mode_test.go b/rules/awsrules/models/aws_efs_file_system_invalid_throughput_mode_test.go index 1ac7add08..e3dbb76cf 100644 --- a/rules/awsrules/models/aws_efs_file_system_invalid_throughput_mode_test.go +++ b/rules/awsrules/models/aws_efs_file_system_invalid_throughput_mode_test.go @@ -84,7 +84,10 @@ resource "aws_efs_file_system" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsEfsFileSystemInvalidThroughputModeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_eks_cluster_invalid_name_test.go b/rules/awsrules/models/aws_eks_cluster_invalid_name_test.go index 93e7cdfeb..d4e54c60a 100644 --- a/rules/awsrules/models/aws_eks_cluster_invalid_name_test.go +++ b/rules/awsrules/models/aws_eks_cluster_invalid_name_test.go @@ -84,7 +84,10 @@ resource "aws_eks_cluster" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsEksClusterInvalidNameRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_elasticache_cluster_invalid_az_mode_test.go b/rules/awsrules/models/aws_elasticache_cluster_invalid_az_mode_test.go index f8f49941c..ff07981a4 100644 --- a/rules/awsrules/models/aws_elasticache_cluster_invalid_az_mode_test.go +++ b/rules/awsrules/models/aws_elasticache_cluster_invalid_az_mode_test.go @@ -84,7 +84,10 @@ resource "aws_elasticache_cluster" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsElastiCacheClusterInvalidAzModeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_elastictranscoder_preset_invalid_container_test.go b/rules/awsrules/models/aws_elastictranscoder_preset_invalid_container_test.go index a5ccc26ff..b3460615a 100644 --- a/rules/awsrules/models/aws_elastictranscoder_preset_invalid_container_test.go +++ b/rules/awsrules/models/aws_elastictranscoder_preset_invalid_container_test.go @@ -84,7 +84,10 @@ resource "aws_elastictranscoder_preset" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsElastictranscoderPresetInvalidContainerRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_instance_invalid_instance_initiated_shutdown_behavior_test.go b/rules/awsrules/models/aws_instance_invalid_instance_initiated_shutdown_behavior_test.go index c2982ba85..98105263f 100644 --- a/rules/awsrules/models/aws_instance_invalid_instance_initiated_shutdown_behavior_test.go +++ b/rules/awsrules/models/aws_instance_invalid_instance_initiated_shutdown_behavior_test.go @@ -84,7 +84,10 @@ resource "aws_instance" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsInstanceInvalidInstanceInitiatedShutdownBehaviorRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_instance_invalid_tenancy_test.go b/rules/awsrules/models/aws_instance_invalid_tenancy_test.go index 316f830c3..a42f43416 100644 --- a/rules/awsrules/models/aws_instance_invalid_tenancy_test.go +++ b/rules/awsrules/models/aws_instance_invalid_tenancy_test.go @@ -84,7 +84,10 @@ resource "aws_instance" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsInstanceInvalidTenancyRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_launch_template_invalid_instance_type_test.go b/rules/awsrules/models/aws_launch_template_invalid_instance_type_test.go index 5f93400da..82469cce5 100644 --- a/rules/awsrules/models/aws_launch_template_invalid_instance_type_test.go +++ b/rules/awsrules/models/aws_launch_template_invalid_instance_type_test.go @@ -84,7 +84,10 @@ resource "aws_launch_template" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsLaunchTemplateInvalidInstanceTypeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_launch_template_invalid_name_test.go b/rules/awsrules/models/aws_launch_template_invalid_name_test.go index e45b783cd..0d25acc87 100644 --- a/rules/awsrules/models/aws_launch_template_invalid_name_test.go +++ b/rules/awsrules/models/aws_launch_template_invalid_name_test.go @@ -84,7 +84,10 @@ resource "aws_launch_template" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsLaunchTemplateInvalidNameRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_lb_invalid_ip_address_type_test.go b/rules/awsrules/models/aws_lb_invalid_ip_address_type_test.go index 8fa8c511b..6b819bf0b 100644 --- a/rules/awsrules/models/aws_lb_invalid_ip_address_type_test.go +++ b/rules/awsrules/models/aws_lb_invalid_ip_address_type_test.go @@ -84,7 +84,10 @@ resource "aws_lb" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsLbInvalidIPAddressTypeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_lb_invalid_load_balancer_type_test.go b/rules/awsrules/models/aws_lb_invalid_load_balancer_type_test.go index 61c25c606..17226b3c6 100644 --- a/rules/awsrules/models/aws_lb_invalid_load_balancer_type_test.go +++ b/rules/awsrules/models/aws_lb_invalid_load_balancer_type_test.go @@ -84,7 +84,10 @@ resource "aws_lb" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsLbInvalidLoadBalancerTypeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_lb_listener_invalid_protocol_test.go b/rules/awsrules/models/aws_lb_listener_invalid_protocol_test.go index 7c7530a07..70b8fd879 100644 --- a/rules/awsrules/models/aws_lb_listener_invalid_protocol_test.go +++ b/rules/awsrules/models/aws_lb_listener_invalid_protocol_test.go @@ -84,7 +84,10 @@ resource "aws_lb_listener" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsLbListenerInvalidProtocolRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_lb_target_group_invalid_target_type_test.go b/rules/awsrules/models/aws_lb_target_group_invalid_target_type_test.go index ac6da508c..1bbb2e64d 100644 --- a/rules/awsrules/models/aws_lb_target_group_invalid_target_type_test.go +++ b/rules/awsrules/models/aws_lb_target_group_invalid_target_type_test.go @@ -84,7 +84,10 @@ resource "aws_lb_target_group" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsLbTargetGroupInvalidTargetTypeRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_placement_group_invalid_strategy_test.go b/rules/awsrules/models/aws_placement_group_invalid_strategy_test.go index a0150398d..03d518a11 100644 --- a/rules/awsrules/models/aws_placement_group_invalid_strategy_test.go +++ b/rules/awsrules/models/aws_placement_group_invalid_strategy_test.go @@ -84,7 +84,10 @@ resource "aws_placement_group" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsPlacementGroupInvalidStrategyRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_spot_fleet_request_invalid_allocation_strategy_test.go b/rules/awsrules/models/aws_spot_fleet_request_invalid_allocation_strategy_test.go index 6a5bfe0e1..423f93995 100644 --- a/rules/awsrules/models/aws_spot_fleet_request_invalid_allocation_strategy_test.go +++ b/rules/awsrules/models/aws_spot_fleet_request_invalid_allocation_strategy_test.go @@ -84,7 +84,10 @@ resource "aws_spot_fleet_request" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsSpotFleetRequestInvalidAllocationStrategyRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/aws_spot_fleet_request_invalid_instance_interruption_behaviour_test.go b/rules/awsrules/models/aws_spot_fleet_request_invalid_instance_interruption_behaviour_test.go index e6720c408..f9349a72c 100644 --- a/rules/awsrules/models/aws_spot_fleet_request_invalid_instance_interruption_behaviour_test.go +++ b/rules/awsrules/models/aws_spot_fleet_request_invalid_instance_interruption_behaviour_test.go @@ -84,7 +84,10 @@ resource "aws_spot_fleet_request" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsSpotFleetRequestInvalidInstanceInterruptionBehaviourRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/models_test.go b/rules/awsrules/models/models_test.go index 7136a9c80..d858e3414 100644 --- a/rules/awsrules/models/models_test.go +++ b/rules/awsrules/models/models_test.go @@ -106,7 +106,10 @@ resource "aws_launch_template" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewAwsLaunchTemplateInvalidNameRule() if err = rule.Check(runner); err != nil { diff --git a/rules/awsrules/models/pattern_rule_test.go.tmpl b/rules/awsrules/models/pattern_rule_test.go.tmpl index afdb30c5f..e3f342d78 100644 --- a/rules/awsrules/models/pattern_rule_test.go.tmpl +++ b/rules/awsrules/models/pattern_rule_test.go.tmpl @@ -89,7 +89,10 @@ resource "{{ .ResourceType }}" "foo" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := New{{ .RuleNameCC }}Rule() if err = rule.Check(runner); err != nil { diff --git a/rules/rule_test.go.tmpl b/rules/rule_test.go.tmpl index 406b1ee8c..cefdffafa 100644 --- a/rules/rule_test.go.tmpl +++ b/rules/rule_test.go.tmpl @@ -76,7 +76,10 @@ resource "null_resource" "null" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := New{{ .RuleNameCC }}Rule() mock := mock.NewMockAPI(ctrl) diff --git a/rules/terraformrules/terraform_documented_outputs_test.go b/rules/terraformrules/terraform_documented_outputs_test.go index d14f06e72..7cea08a39 100644 --- a/rules/terraformrules/terraform_documented_outputs_test.go +++ b/rules/terraformrules/terraform_documented_outputs_test.go @@ -103,7 +103,10 @@ output "endpoint" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewTerraformDocumentedOutputsRule() if err = rule.Check(runner); err != nil { diff --git a/rules/terraformrules/terraform_documented_variables_test.go b/rules/terraformrules/terraform_documented_variables_test.go index 9e819889a..80e6a5b81 100644 --- a/rules/terraformrules/terraform_documented_variables_test.go +++ b/rules/terraformrules/terraform_documented_variables_test.go @@ -101,7 +101,10 @@ variable "with_description" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewTerraformDocumentedVariablesRule() if err = rule.Check(runner); err != nil { diff --git a/rules/terraformrules/terraform_module_pinned_source_test.go b/rules/terraformrules/terraform_module_pinned_source_test.go index e70c58a97..ebb897172 100644 --- a/rules/terraformrules/terraform_module_pinned_source_test.go +++ b/rules/terraformrules/terraform_module_pinned_source_test.go @@ -321,7 +321,10 @@ module "pinned_mercurial" { t.Fatal(tfdiags) } - runner := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + runner, err := tflint.NewRunner(tflint.EmptyConfig(), map[string]tflint.Annotations{}, cfg, map[string]*terraform.InputValue{}) + if err != nil { + t.Fatal(err) + } rule := NewTerraformModulePinnedSourceRule() if err = rule.Check(runner); err != nil {