awspec 0.85.1 → 0.85.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/awspec.gemspec +2 -2
- data/doc/resource_types.md +8 -8
- data/lib/awspec/helper/finder/alb.rb +7 -3
- data/lib/awspec/stub/alb.rb +30 -0
- data/lib/awspec/type/iam_role.rb +1 -1
- data/lib/awspec/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f43977b6fe553f6f95f026e1b6ecc40180c679bf
|
|
4
|
+
data.tar.gz: '092d004657351167eac59fc5abbadceed11dd60f'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 80f20a55a065271036cd4b0d1adbf2d1830bbae6d9f64915f376714f1935ccb4f9c394118db4914cd90de8a092ddfd4307f53f428b53f671cfb3e4aa49dcd8be
|
|
7
|
+
data.tar.gz: c67449ea70a81ea54234c9c364f409f3d2c95932ddbd8a47814e80ef046c94d23edcb54868e29c8f1701b5c2ddd0edc2a87fb0cf6ee84621763a991a92a15590
|
data/awspec.gemspec
CHANGED
|
@@ -22,8 +22,8 @@ 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.
|
|
26
|
-
spec.add_runtime_dependency 'awsecrets', '~> 1.
|
|
25
|
+
spec.add_runtime_dependency 'aws-sdk', '>= 2.2', '< 2.11'
|
|
26
|
+
spec.add_runtime_dependency 'awsecrets', '~> 1.12'
|
|
27
27
|
spec.add_runtime_dependency 'thor'
|
|
28
28
|
spec.add_runtime_dependency 'activesupport', '~> 4.0'
|
|
29
29
|
spec.add_runtime_dependency 'term-ansicolor'
|
data/doc/resource_types.md
CHANGED
|
@@ -200,7 +200,7 @@ end
|
|
|
200
200
|
```
|
|
201
201
|
|
|
202
202
|
|
|
203
|
-
### its(:target_group_arn), its(:target_group_name), its(:protocol), its(:port), its(:vpc_id), its(:health_check_protocol), its(:health_check_port), its(:health_check_interval_seconds), its(:health_check_timeout_seconds), its(:healthy_threshold_count), its(:unhealthy_threshold_count), its(:health_check_path), its(:load_balancer_arns)
|
|
203
|
+
### its(:target_group_arn), its(:target_group_name), its(:protocol), its(:port), its(:vpc_id), its(:health_check_protocol), its(:health_check_port), its(:health_check_interval_seconds), its(:health_check_timeout_seconds), its(:healthy_threshold_count), its(:unhealthy_threshold_count), its(:health_check_path), its(:load_balancer_arns), its(:target_type)
|
|
204
204
|
## <a name="ami">ami</a>
|
|
205
205
|
|
|
206
206
|
AMI resource type.
|
|
@@ -303,7 +303,7 @@ describe cloudformation_stack('my-cloudformation-stack') do
|
|
|
303
303
|
end
|
|
304
304
|
```
|
|
305
305
|
|
|
306
|
-
### its(:stack_id), its(:stack_name), its(:change_set_id), its(:description), its(:parameters), its(:creation_time), its(:last_updated_time), its(:stack_status), its(:stack_status_reason), its(:disable_rollback), its(:notification_arns), its(:timeout_in_minutes), its(:capabilities), its(:role_arn)
|
|
306
|
+
### its(:stack_id), its(:stack_name), its(:change_set_id), its(:description), its(:parameters), its(:creation_time), its(:last_updated_time), its(:rollback_configuration), its(:stack_status), its(:stack_status_reason), its(:disable_rollback), its(:notification_arns), its(:timeout_in_minutes), its(:capabilities), its(:role_arn)
|
|
307
307
|
## <a name="cloudfront_distribution">cloudfront_distribution</a>
|
|
308
308
|
|
|
309
309
|
CloudfrontDistribution resource type.
|
|
@@ -854,7 +854,7 @@ end
|
|
|
854
854
|
```
|
|
855
855
|
|
|
856
856
|
|
|
857
|
-
### its(:ami_launch_index), its(:image_id), its(:instance_id), its(:instance_type), its(:kernel_id), its(:key_name), its(:launch_time), its(:monitoring), its(:placement), its(:platform), its(:private_dns_name), its(:private_ip_address), its(:product_codes), its(:public_dns_name), its(:public_ip_address), its(:ramdisk_id), its(:state_transition_reason), its(:subnet_id), its(:vpc_id), its(:architecture), its(:client_token), its(:ebs_optimized), its(:ena_support), its(:hypervisor), its(:instance_lifecycle), its(:root_device_name), its(:root_device_type), its(:source_dest_check), its(:spot_instance_request_id), its(:sriov_net_support), its(:state_reason), its(:virtualization_type)
|
|
857
|
+
### its(:ami_launch_index), its(:image_id), its(:instance_id), its(:instance_type), its(:kernel_id), its(:key_name), its(:launch_time), its(:monitoring), its(:placement), its(:platform), its(:private_dns_name), its(:private_ip_address), its(:product_codes), its(:public_dns_name), its(:public_ip_address), its(:ramdisk_id), its(:state_transition_reason), its(:subnet_id), its(:vpc_id), its(:architecture), its(:client_token), its(:ebs_optimized), its(:ena_support), its(:hypervisor), its(:instance_lifecycle), its(:elastic_gpu_associations), its(:root_device_name), its(:root_device_type), its(:source_dest_check), its(:spot_instance_request_id), its(:sriov_net_support), its(:state_reason), its(:virtualization_type)
|
|
858
858
|
### :unlock: Advanced use
|
|
859
859
|
|
|
860
860
|
`ec2` can use `Aws::EC2::Instance` resource (see http://docs.aws.amazon.com/sdkforruby/api/Aws/EC2/Instance.html).
|
|
@@ -1001,7 +1001,7 @@ describe efs('my-efs') do
|
|
|
1001
1001
|
end
|
|
1002
1002
|
```
|
|
1003
1003
|
|
|
1004
|
-
### its(:owner_id), its(:creation_token), its(:file_system_id), its(:creation_time), its(:life_cycle_state), its(:name), its(:number_of_mount_targets), its(:performance_mode)
|
|
1004
|
+
### its(:owner_id), its(:creation_token), its(:file_system_id), its(:creation_time), its(:life_cycle_state), its(:name), its(:number_of_mount_targets), its(:performance_mode), its(:encrypted), its(:kms_key_id)
|
|
1005
1005
|
## <a name="elastic_ip">elastic_ip</a>
|
|
1006
1006
|
|
|
1007
1007
|
Elastic IP resource type.
|
|
@@ -1652,7 +1652,7 @@ DOC
|
|
|
1652
1652
|
end
|
|
1653
1653
|
```
|
|
1654
1654
|
|
|
1655
|
-
### its(:aws_account_id), its(:key_id), its(:arn), its(:creation_date), its(:enabled), its(:description), its(:key_usage), its(:key_state), its(:deletion_date), its(:valid_to), its(:origin), its(:expiration_model)
|
|
1655
|
+
### its(:aws_account_id), its(:key_id), its(:arn), its(:creation_date), its(:enabled), its(:description), its(:key_usage), its(:key_state), its(:deletion_date), its(:valid_to), its(:origin), its(:expiration_model), its(:key_manager)
|
|
1656
1656
|
## <a name="lambda">lambda</a>
|
|
1657
1657
|
|
|
1658
1658
|
Lambda resource type.
|
|
@@ -1670,7 +1670,7 @@ end
|
|
|
1670
1670
|
|
|
1671
1671
|
This matcher does not support Amazon S3 event sources. ( [See SDK doc](http://docs.aws.amazon.com/sdkforruby/api/Aws/Lambda/Client.html#list_event_source_mappings-instance_method) )
|
|
1672
1672
|
|
|
1673
|
-
### its(:function_name), its(:function_arn), its(:runtime), its(:role), its(:handler), its(:code_size), its(:description), its(:timeout), its(:memory_size), its(:last_modified), its(:code_sha_256), its(:version), its(:vpc_config), its(:dead_letter_config), its(:environment), its(:kms_key_arn), its(:tracing_config)
|
|
1673
|
+
### its(:function_name), its(:function_arn), its(:runtime), its(:role), its(:handler), its(:code_size), its(:description), its(:timeout), its(:memory_size), its(:last_modified), its(:code_sha_256), its(:version), its(:vpc_config), its(:dead_letter_config), its(:environment), its(:kms_key_arn), its(:tracing_config), its(:master_arn)
|
|
1674
1674
|
## <a name="launch_configuration">launch_configuration</a>
|
|
1675
1675
|
|
|
1676
1676
|
LaunchConfiguration resource type.
|
|
@@ -1734,7 +1734,7 @@ describe nat_gateway('nat-7ff7777f') do
|
|
|
1734
1734
|
end
|
|
1735
1735
|
```
|
|
1736
1736
|
|
|
1737
|
-
### its(:create_time), its(:delete_time), its(:failure_code), its(:failure_message), its(:nat_gateway_id), its(:provisioned_bandwidth), its(:state), its(:subnet_id), its(:vpc_id)
|
|
1737
|
+
### its(:create_time), its(:delete_time), its(:failure_code), its(:failure_message), its(:nat_gateway_id), its(:provisioned_bandwidth), its(:state), its(:subnet_id), its(:vpc_id), its(:tags)
|
|
1738
1738
|
## <a name="network_acl">network_acl</a>
|
|
1739
1739
|
|
|
1740
1740
|
NetworkAcl resource type.
|
|
@@ -2483,7 +2483,7 @@ end
|
|
|
2483
2483
|
```
|
|
2484
2484
|
|
|
2485
2485
|
|
|
2486
|
-
### its(:cidr_block), its(:dhcp_options_id), its(:state), its(:vpc_id), its(:instance_tenancy), its(:ipv_6_cidr_block_association_set), its(:is_default)
|
|
2486
|
+
### its(:cidr_block), its(:dhcp_options_id), its(:state), its(:vpc_id), its(:instance_tenancy), its(:ipv_6_cidr_block_association_set), its(:cidr_block_association_set), its(:is_default)
|
|
2487
2487
|
### :unlock: Advanced use
|
|
2488
2488
|
|
|
2489
2489
|
`vpc` can use `Aws::EC2::Vpc` resource (see http://docs.aws.amazon.com/sdkforruby/api/Aws/EC2/Vpc.html).
|
|
@@ -3,7 +3,9 @@ module Awspec::Helper
|
|
|
3
3
|
module Alb
|
|
4
4
|
def find_alb(id)
|
|
5
5
|
res = elbv2_client.describe_load_balancers({ names: [id] })
|
|
6
|
-
res.load_balancers.
|
|
6
|
+
res.load_balancers.select do |lb|
|
|
7
|
+
lb.type == 'application'
|
|
8
|
+
end.single_resource(id)
|
|
7
9
|
rescue
|
|
8
10
|
return nil
|
|
9
11
|
end
|
|
@@ -11,7 +13,7 @@ module Awspec::Helper
|
|
|
11
13
|
def select_alb_by_vpc_id(vpc_id)
|
|
12
14
|
res = elbv2_client.describe_load_balancers
|
|
13
15
|
res.load_balancers.select do |lb|
|
|
14
|
-
lb.vpc_id == vpc_id
|
|
16
|
+
lb.vpc_id == vpc_id && lb.type == 'application'
|
|
15
17
|
end
|
|
16
18
|
end
|
|
17
19
|
|
|
@@ -24,7 +26,9 @@ module Awspec::Helper
|
|
|
24
26
|
|
|
25
27
|
def find_alb_target_group(id)
|
|
26
28
|
res = elbv2_client.describe_target_groups({ names: [id] })
|
|
27
|
-
res.target_groups.
|
|
29
|
+
res.target_groups.select do |tg|
|
|
30
|
+
%w(HTTP HTTPS).include?(tg.protocol)
|
|
31
|
+
end.single_resource(id)
|
|
28
32
|
rescue
|
|
29
33
|
return nil
|
|
30
34
|
end
|
data/lib/awspec/stub/alb.rb
CHANGED
|
@@ -32,6 +32,36 @@ Aws.config[:elasticloadbalancingv2] = {
|
|
|
32
32
|
],
|
|
33
33
|
security_groups: ['sg-1a2b3cd4'],
|
|
34
34
|
ip_address_type: 'ipv4'
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
load_balancer_arn:
|
|
38
|
+
'arn:aws:elasticloadbalancing:ap-northeast-1:1234567890:loadbalancer/net/my-nlb/2aa2bb2cc2ddee22',
|
|
39
|
+
dns_name:
|
|
40
|
+
'my-nlb-2aa2bb2cc2ddee22.elb.ap-northeast-1.amazonaws.com',
|
|
41
|
+
canonical_hosted_zone_id: 'N12BCDEDCBN34BC',
|
|
42
|
+
created_time: Time.new(2017, 4, 4, 9, 00, 00, '+00:00'),
|
|
43
|
+
load_balancer_name: 'my-nlb',
|
|
44
|
+
scheme: 'internet-facing',
|
|
45
|
+
vpc_id: 'vpc-ab123cde',
|
|
46
|
+
state:
|
|
47
|
+
{
|
|
48
|
+
code: 'active',
|
|
49
|
+
reason: nil
|
|
50
|
+
},
|
|
51
|
+
type: 'network',
|
|
52
|
+
availability_zones:
|
|
53
|
+
[
|
|
54
|
+
{
|
|
55
|
+
zone_name: 'ap-northeast-1a',
|
|
56
|
+
subnet_id: 'subnet-7890ne12'
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
zone_name: 'ap-northeast-1c',
|
|
60
|
+
subnet_id: 'subnet-nnnd1234'
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
security_groups: ['sg-5n6b7c89'],
|
|
64
|
+
ip_address_type: 'ipv4'
|
|
35
65
|
}
|
|
36
66
|
],
|
|
37
67
|
next_marker: nil
|
data/lib/awspec/type/iam_role.rb
CHANGED
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.85.
|
|
4
|
+
version: 0.85.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- k1LoW
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-09-11 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.11'
|
|
51
51
|
type: :runtime
|
|
52
52
|
prerelease: false
|
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -57,21 +57,21 @@ dependencies:
|
|
|
57
57
|
version: '2.2'
|
|
58
58
|
- - "<"
|
|
59
59
|
- !ruby/object:Gem::Version
|
|
60
|
-
version: '2.
|
|
60
|
+
version: '2.11'
|
|
61
61
|
- !ruby/object:Gem::Dependency
|
|
62
62
|
name: awsecrets
|
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
|
64
64
|
requirements:
|
|
65
65
|
- - "~>"
|
|
66
66
|
- !ruby/object:Gem::Version
|
|
67
|
-
version: '1.
|
|
67
|
+
version: '1.12'
|
|
68
68
|
type: :runtime
|
|
69
69
|
prerelease: false
|
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
|
71
71
|
requirements:
|
|
72
72
|
- - "~>"
|
|
73
73
|
- !ruby/object:Gem::Version
|
|
74
|
-
version: '1.
|
|
74
|
+
version: '1.12'
|
|
75
75
|
- !ruby/object:Gem::Dependency
|
|
76
76
|
name: thor
|
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -580,7 +580,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
580
580
|
version: '0'
|
|
581
581
|
requirements: []
|
|
582
582
|
rubyforge_project:
|
|
583
|
-
rubygems_version: 2.6.
|
|
583
|
+
rubygems_version: 2.6.13
|
|
584
584
|
signing_key:
|
|
585
585
|
specification_version: 4
|
|
586
586
|
summary: RSpec tests for your AWS resources.
|