chef-provisioning-aws 1.5.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1ac3b4009283033918629bde10eae733c25b8a73
4
- data.tar.gz: 486f831a4168454ad62c9b5ebccd48e7f57249d5
3
+ metadata.gz: 6fa67263316335a4b0a9df876a8156ee8623bd18
4
+ data.tar.gz: 5c09a23f932d5f566d64ba9db95254551549742a
5
5
  SHA512:
6
- metadata.gz: 83fc3ef810c239b52c0c00246f08ba97fa5f4b4af3ab116324a7cdf52929815e9006ecc89e92837f1311510b0b9960ca43c41a50385e856bcc12a022a602efa6
7
- data.tar.gz: 2dd1b0c595deccae3767740d0abe2d6058c2322ef214a16640dc4386c8586b09efcd39ad667ec29f21aadedbb835aba29b37556b67fb84e0d5bbf661946d5afd
6
+ metadata.gz: fdbebb79eaad90ed4eb4d850e45351936336f3ad885ec50e83a79fb966f7737b9bea623c40e42eaf461dfce690084cd221077f19abe3faeeade8ac228df984f6
7
+ data.tar.gz: 10d6a33fc7a463ffd31b0f0efb70cd32433a6814e32fe7a7187757fac2bf530fcd612e7c90866f4a77e8c7f8840a3bc717e0e40bdbd1a45e7e780d05ced668c1
data/Rakefile CHANGED
@@ -39,7 +39,7 @@ end
39
39
 
40
40
  desc "travis specific task - runs CI integration tests (regular and super_slow in parallel) and sets up travis specific ENV variables"
41
41
  task :travis, [:sub_task] do |t, args|
42
- pattern = "load_balancer_spec.rb,machine_image_spec.rb" # This is a comma seperated list
42
+ pattern = "load_balancer_spec.rb,machine_image_spec.rb,aws_iam_instance_profile_spec.rb" # This is a comma seperated list
43
43
  pattern = pattern.split(",").map {|p| "spec/integration/**/*#{p}"}.join(",")
44
44
  Rake::Task[args[:sub_task]].invoke(pattern)
45
45
  end
@@ -752,15 +752,12 @@ EOD
752
752
  if bootstrap_options[:subnet]
753
753
  bootstrap_options[:subnet_id] = bootstrap_options.delete(:subnet)
754
754
  end
755
-
756
- bootstrap_options = AWSResource.lookup_options(bootstrap_options, managed_entry_store: machine_spec.managed_entry_store, driver: self)
757
-
758
- # We do this after the lookup_options because we need the aws_iam_instance_profile resource to
759
- # only be passed a String during resource lookup, not `{name: ...}`
760
755
  if bootstrap_options[:iam_instance_profile] && bootstrap_options[:iam_instance_profile].is_a?(String)
761
756
  bootstrap_options[:iam_instance_profile] = {name: bootstrap_options[:iam_instance_profile]}
762
757
  end
763
758
 
759
+ bootstrap_options = AWSResource.lookup_options(bootstrap_options, managed_entry_store: machine_spec.managed_entry_store, driver: self)
760
+
764
761
  # In the migration from V1 to V2 we still support associate_public_ip_address at the top level
765
762
  # we do this after the lookup because we have to copy any present subnets, etc. into the
766
763
  # network interfaces block
@@ -1,7 +1,7 @@
1
1
  class Chef
2
2
  module Provisioning
3
3
  module AWSDriver
4
- VERSION = '1.5.0'
4
+ VERSION = '1.5.1'
5
5
  end
6
6
  end
7
7
  end
@@ -11,7 +11,9 @@ require 'chef/provisioning/aws_driver/aws_resource'
11
11
  # - http://docs.aws.amazon.com/sdkforruby/api/Aws/IAM/InstanceProfile.html
12
12
  #
13
13
  class Chef::Resource::AwsIamInstanceProfile < Chef::Provisioning::AWSDriver::AWSResource
14
- aws_sdk_type ::Aws::IAM::InstanceProfile
14
+ # We don't want any lookup_options to try and build a resource from a :iam_instance_profile string,
15
+ # its either a name or an ARN
16
+ aws_sdk_type ::Aws::IAM::InstanceProfile, :option_names => []
15
17
 
16
18
  #
17
19
  # The name of the instance profile to create.
@@ -251,6 +251,21 @@ describe Chef::Resource::Machine do
251
251
  iam_instance_profile: {arn: /machine_test_instance_profile/}
252
252
  ).and be_idempotent
253
253
  end
254
+
255
+ it "looks up the iam_instance_profile from the arn", :super_slow do
256
+ expect_recipe {
257
+ machine 'test_machine' do
258
+ machine_options bootstrap_options: {
259
+ subnet_id: 'test_public_subnet',
260
+ key_name: 'test_key_pair',
261
+ iam_instance_profile: {arn: machine_test_instance_profile.aws_object.arn}
262
+ }
263
+ action :allocate
264
+ end
265
+ }.to create_an_aws_instance('test_machine',
266
+ iam_instance_profile: {arn: /machine_test_instance_profile/}
267
+ ).and be_idempotent
268
+ end
254
269
  end
255
270
 
256
271
  it "machine with from_image option is created from correct image", :super_slow do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-provisioning-aws
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Ewart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-08 00:00:00.000000000 Z
11
+ date: 2015-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef-provisioning