bin/check-vpc-vpn.rb in sensu-plugins-aws-2.1.0 vs bin/check-vpc-vpn.rb in sensu-plugins-aws-2.1.1

- old
+ new

@@ -11,11 +11,11 @@ # PLATFORMS: # all # # DEPENDENCIES: # gem: sensu-plugin -# gem: aws-sdk +# gem: aws-sdk-v1 # # USAGE: # ./check-vpc-vpn.rb --aws-region us-east-1 --vpn-connection-id vpn-abc1234 # # NOTES: @@ -26,11 +26,11 @@ # Released under the same terms as Sensu (the MIT license); see LICENSE # for details. # require 'sensu-plugin/check/cli' -require 'aws-sdk' +require 'aws-sdk-v1' class CheckAwsVpcVpnConnections < Sensu::Plugin::Check::CLI @aws_config = {} # rubocop:disable Style/AlignParameters option :access_key, @@ -63,13 +63,11 @@ default: 'us-east-1' def aws_config aws_connection_config = { region: config[:aws_region] } if config[:use_iam_role].nil? - aws_connection_config.merge!( - access_key_id: config[:access_key], - secret_access_key: config[:secret_key] - ) + aws_connection_config[:access_key_id] = config[:access_key] + aws_connection_config[:secret_access_key] = config[:secret_key] end aws_connection_config end def fetch_connection_data