awspec 0.67.0 → 0.67.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/awspec.gemspec +1 -1
- data/doc/_resource_types/ec2.md +8 -0
- data/doc/resource_types.md +11 -2
- data/lib/awspec/stub/ec2.rb +4 -0
- data/lib/awspec/type/ec2.rb +6 -0
- data/lib/awspec/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e3d08941e1f7e75af40c150e7e5a766c4bd67d4
|
4
|
+
data.tar.gz: 01e64e800817b7bf3c40efb13ff88165a66c0560
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbb426f7b9181430e93edcd167c8ff509f32743d7197ecd529bf50cb6f57746ccb497f3042fd35c9361328021e0a8e9d5ee12f7bf8dc77190336e4f6e2718435
|
7
|
+
data.tar.gz: 58573294c78251d5d4bdf30e6299d9f06fdaad62aed681a82451d8f1bf0be449e3d43a85d034718eb746cebf406e8d6834ce1df5ba8cf5a184d1634657f3e277
|
data/awspec.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.required_ruby_version = '>= 2.1'
|
23
23
|
spec.add_runtime_dependency 'rspec', '~> 3.0'
|
24
24
|
spec.add_runtime_dependency 'rspec-its'
|
25
|
-
spec.add_runtime_dependency 'aws-sdk', '>= 2.2', '< 2.
|
25
|
+
spec.add_runtime_dependency 'aws-sdk', '>= 2.2', '< 2.8'
|
26
26
|
spec.add_runtime_dependency 'awsecrets', '~> 1.8'
|
27
27
|
spec.add_runtime_dependency 'thor'
|
28
28
|
spec.add_runtime_dependency 'activesupport', '~> 4.0'
|
data/doc/_resource_types/ec2.md
CHANGED
@@ -117,6 +117,14 @@ describe ec2('my-ec2') do
|
|
117
117
|
end
|
118
118
|
```
|
119
119
|
|
120
|
+
### have_iam_instance_profile
|
121
|
+
|
122
|
+
```ruby
|
123
|
+
describe ec2('my-ec2') do
|
124
|
+
it { should have_iam_instance_profile('Ec2IamProfileName') }
|
125
|
+
end
|
126
|
+
```
|
127
|
+
|
120
128
|
### advanced
|
121
129
|
|
122
130
|
`ec2` can use `Aws::EC2::Instance` resource (see http://docs.aws.amazon.com/sdkforruby/api/Aws/EC2/Instance.html).
|
data/doc/resource_types.md
CHANGED
@@ -52,7 +52,7 @@ ALB resource type.
|
|
52
52
|
|
53
53
|
### exist
|
54
54
|
|
55
|
-
### its(:load_balancer_arn), its(:dns_name), its(:canonical_hosted_zone_id), its(:created_time), its(:load_balancer_name), its(:scheme), its(:vpc_id), its(:state), its(:type)
|
55
|
+
### its(:load_balancer_arn), its(:dns_name), its(:canonical_hosted_zone_id), its(:created_time), its(:load_balancer_name), its(:scheme), its(:vpc_id), its(:state), its(:type), its(:ip_address_type)
|
56
56
|
## <a name="ami">ami</a>
|
57
57
|
|
58
58
|
AMI resource type.
|
@@ -411,6 +411,15 @@ end
|
|
411
411
|
```
|
412
412
|
|
413
413
|
|
414
|
+
### have_iam_instance_profile
|
415
|
+
|
416
|
+
```ruby
|
417
|
+
describe ec2('my-ec2') do
|
418
|
+
it { should have_iam_instance_profile('Ec2IamProfileName') }
|
419
|
+
end
|
420
|
+
```
|
421
|
+
|
422
|
+
|
414
423
|
### have_network_interface
|
415
424
|
|
416
425
|
```ruby
|
@@ -461,7 +470,7 @@ end
|
|
461
470
|
```
|
462
471
|
|
463
472
|
|
464
|
-
### its(:instance_id), its(:image_id), its(:private_dns_name), its(:public_dns_name), its(:state_transition_reason), its(:key_name), its(:ami_launch_index), its(:instance_type), its(:launch_time), its(:placement), its(:kernel_id), its(:ramdisk_id), its(:platform), its(:monitoring), its(:subnet_id), its(:vpc_id), its(:private_ip_address), its(:public_ip_address), its(:state_reason), its(:architecture), its(:root_device_type), its(:root_device_name), its(:virtualization_type), its(:instance_lifecycle), its(:spot_instance_request_id), its(:client_token), its(:source_dest_check), its(:hypervisor), its(:
|
473
|
+
### its(:instance_id), its(:image_id), its(:private_dns_name), its(:public_dns_name), its(:state_transition_reason), its(:key_name), its(:ami_launch_index), its(:instance_type), its(:launch_time), its(:placement), its(:kernel_id), its(:ramdisk_id), its(:platform), its(:monitoring), its(:subnet_id), its(:vpc_id), its(:private_ip_address), its(:public_ip_address), its(:state_reason), its(:architecture), its(:root_device_type), its(:root_device_name), its(:virtualization_type), its(:instance_lifecycle), its(:spot_instance_request_id), its(:client_token), its(:source_dest_check), its(:hypervisor), its(:ebs_optimized), its(:sriov_net_support), its(:ena_support)
|
465
474
|
### :unlock: Advanced use
|
466
475
|
|
467
476
|
`ec2` can use `Aws::EC2::Instance` resource (see http://docs.aws.amazon.com/sdkforruby/api/Aws/EC2/Instance.html).
|
data/lib/awspec/stub/ec2.rb
CHANGED
@@ -21,6 +21,10 @@ Aws.config[:ec2] = {
|
|
21
21
|
group_name: 'my-security-group-name'
|
22
22
|
}
|
23
23
|
],
|
24
|
+
iam_instance_profile: {
|
25
|
+
arn: 'arn:aws:iam::123456789012:instance-profile/Ec2IamProfileName',
|
26
|
+
id: 'ABCDEFGHIJKLMNOPQRSTU'
|
27
|
+
},
|
24
28
|
block_device_mappings: [
|
25
29
|
{
|
26
30
|
device_name: '/dev/sda',
|
data/lib/awspec/type/ec2.rb
CHANGED
@@ -55,6 +55,12 @@ module Awspec::Type
|
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
58
|
+
def has_iam_instance_profile?(iam_instance_profile_name)
|
59
|
+
iam = resource_via_client.iam_instance_profile
|
60
|
+
ret = iam.arn.split('/').last == iam_instance_profile_name
|
61
|
+
return true if ret
|
62
|
+
end
|
63
|
+
|
58
64
|
def has_ebs?(volume_id)
|
59
65
|
blocks = resource_via_client.block_device_mappings
|
60
66
|
ret = blocks.find do |block|
|
data/lib/awspec/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: awspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.67.
|
4
|
+
version: 0.67.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- k1LoW
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -47,7 +47,7 @@ dependencies:
|
|
47
47
|
version: '2.2'
|
48
48
|
- - "<"
|
49
49
|
- !ruby/object:Gem::Version
|
50
|
-
version: '2.
|
50
|
+
version: '2.8'
|
51
51
|
type: :runtime
|
52
52
|
prerelease: false
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -57,7 +57,7 @@ dependencies:
|
|
57
57
|
version: '2.2'
|
58
58
|
- - "<"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '2.
|
60
|
+
version: '2.8'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: awsecrets
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|