From e5dd14154e294a09827124db7ac3f500fb4d4330 Mon Sep 17 00:00:00 2001 From: Jaymz Julian Date: Fri, 13 Jul 2018 13:23:01 +1000 Subject: [PATCH] move to aws v3 api, and fix travis tests to work again Signed-off-by: Jaymz Julian --- .travis.yml | 8 ++++---- chef-provisioning-aws.gemspec | 2 +- lib/chef/provisioning/aws_driver/version.rb | 2 +- lib/chef/resource/aws_nat_gateway.rb | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5d7208fa..79ba5a83 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ sudo: false language: ruby rvm: - - 2.3.1 + - 2.4.2 env: global: # encrypted with `travis encrypt "AWS_ACCESS_KEY_ID=... AWS_SECRET_ACCESS_KEY=..."` @@ -10,10 +10,10 @@ env: - RAKE_TASK=spec # We run the tests in different environments so they don't try to overwrite each other (deleting, creating the same VPC) # If we need to we can get rid of this but its nice for speed - - RAKE_TASK="travis[integration]" AWS_TRAVIS_DRIVER=aws::us-west-2 - - RAKE_TASK="travis[super_slow]" AWS_TRAVIS_DRIVER=aws::us-west-1 + - RAKE_TASK="travis[integration]" AWS_TEST_DRIVER=aws::us-west-2 + - RAKE_TASK="travis[super_slow]" AWS_TEST_DRIVER=aws::us-west-1 # machine_image is a special snowflake - they take so long to run we need to give them their own builder - - RAKE_TASK="machine_image" AWS_TRAVIS_DRIVER=aws::eu-west-1 + - RAKE_TASK="machine_image" AWS_TEST_DRIVER=aws::eu-west-1 before_script: - mkdir -p /home/travis/.chef diff --git a/chef-provisioning-aws.gemspec b/chef-provisioning-aws.gemspec index ed3f2408..b3f6fb90 100644 --- a/chef-provisioning-aws.gemspec +++ b/chef-provisioning-aws.gemspec @@ -17,7 +17,7 @@ Gem::Specification.new do |s| s.add_dependency 'chef-provisioning', '>= 1.0', '< 3.0' - s.add_dependency 'aws-sdk', ['>= 2.2.18', '< 3.0'] + s.add_dependency 'aws-sdk', ['>= 2.2.18', '< 4.0'] s.add_dependency 'retryable', '~> 2.0', '>= 2.0.1' s.add_dependency 'ubuntu_ami', '~> 0.4', '>= 0.4.1' diff --git a/lib/chef/provisioning/aws_driver/version.rb b/lib/chef/provisioning/aws_driver/version.rb index 450f4b26..9fedd24c 100644 --- a/lib/chef/provisioning/aws_driver/version.rb +++ b/lib/chef/provisioning/aws_driver/version.rb @@ -1,7 +1,7 @@ class Chef module Provisioning module AWSDriver - VERSION = '3.0.2' + VERSION = '4.0.0' end end end diff --git a/lib/chef/resource/aws_nat_gateway.rb b/lib/chef/resource/aws_nat_gateway.rb index 400ad7cb..219c4a7d 100644 --- a/lib/chef/resource/aws_nat_gateway.rb +++ b/lib/chef/resource/aws_nat_gateway.rb @@ -15,7 +15,7 @@ # We provide this class because the AWS SDK V2 does not provide it (as of # May 2016). We copied the pattern in their SDK so when they do add a real # resource there shouldn't be a need for much translation. -class Aws::EC2::NatGateway < ::Aws::Resources::Resource +class Aws::EC2::NatGateway # < ::Aws::Resources::Resource attr_reader :resource, :id, :nat_gateway_id, :vpc_id, :subnet_id, :nat_gateway_addresses def initialize(id, options = {})