awspec 1.24.1 → 1.25.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +69 -0
- data/.github/workflows/doc.yml +29 -0
- data/.rubocop.yml +47 -2
- data/Gemfile +2 -0
- data/README.md +2 -4
- data/Rakefile +0 -1
- data/awspec.gemspec +3 -5
- data/doc/_resource_types/cloudwatch_logs.md +9 -0
- data/doc/_resource_types/eks_nodegroup.md +53 -0
- data/doc/resource_types.md +62 -9
- data/lib/awspec/command/generate.rb +1 -1
- data/lib/awspec/generator/spec/cloudwatch_logs.rb +5 -1
- data/lib/awspec/generator/spec/elasticache.rb +43 -0
- data/lib/awspec/generator.rb +1 -0
- data/lib/awspec/helper/finder/ec2.rb +41 -16
- data/lib/awspec/helper/finder/ecs.rb +1 -1
- data/lib/awspec/helper/finder/subnet.rb +118 -20
- data/lib/awspec/helper/finder.rb +6 -0
- data/lib/awspec/helper/states.rb +16 -0
- data/lib/awspec/matcher/belong_to_subnets.rb +14 -0
- data/lib/awspec/matcher/have_metric_filter.rb +9 -0
- data/lib/awspec/matcher.rb +4 -0
- data/lib/awspec/setup.rb +1 -1
- data/lib/awspec/stub/cloudwatch_logs.rb +2 -1
- data/lib/awspec/stub/ec2_non_existing.rb +7 -0
- data/lib/awspec/stub/eks_nodegroup.rb +61 -1
- data/lib/awspec/stub/elasticsearch.rb +0 -1
- data/lib/awspec/stub/rds_db_parameter_group.rb +8 -0
- data/lib/awspec/stub/sns_topic.rb +15 -8
- data/lib/awspec/stub/sns_topic_error.rb +13 -0
- data/lib/awspec/type/cloudwatch_logs.rb +8 -3
- data/lib/awspec/type/ec2.rb +21 -16
- data/lib/awspec/type/eks_nodegroup.rb +105 -0
- data/lib/awspec/type/rds_db_parameter_group.rb +54 -0
- data/lib/awspec/type/s3_bucket.rb +1 -1
- data/lib/awspec/version.rb +1 -1
- metadata +26 -20
- data/.tachikoma.yml +0 -1
- data/.travis.yml +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5880815a36bbfbccb02df8a4977451509f8f44cbc641a844d07ac1b4d78b40d4
|
4
|
+
data.tar.gz: d85fa09ae26d042910cbb72faa602db6266dbe370af1e62b9fa06519ce77aa58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98528081727304b98a323c7469a79bd7876d185def31d3cfcf03b9ebc138df42d6126abe794cdaf00b138289209540b5a96a092ccd37c5482a579da95ae1a78c
|
7
|
+
data.tar.gz: 014e0bcfe3c67c4da754e2405e8545b0ed8d9544f1f9916f2adacb2c1cf7ec56b8f4d1227062d43ab4c44a942b9fcf1f6538930b84f694522ac2ad16e555a322
|
@@ -0,0 +1,69 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
lint:
|
10
|
+
name: Lint
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
|
13
|
+
steps:
|
14
|
+
- name: Checkout
|
15
|
+
uses: actions/checkout@v2
|
16
|
+
|
17
|
+
- name: Set up Ruby
|
18
|
+
uses: ruby/setup-ruby@v1
|
19
|
+
with:
|
20
|
+
ruby-version: 2.7
|
21
|
+
bundler-cache: true
|
22
|
+
|
23
|
+
- name: Run rubocop
|
24
|
+
uses: reviewdog/action-rubocop@v1
|
25
|
+
with:
|
26
|
+
rubocop_version: 0.57.2
|
27
|
+
rubocop_extensions: rubocop:0.57.2
|
28
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
29
|
+
reporter: github-pr-review
|
30
|
+
fail_on_error: true
|
31
|
+
|
32
|
+
test:
|
33
|
+
name: Test
|
34
|
+
needs: [ lint ]
|
35
|
+
strategy:
|
36
|
+
fail-fast: false
|
37
|
+
matrix:
|
38
|
+
ruby-version:
|
39
|
+
- '2.1'
|
40
|
+
- '2.2'
|
41
|
+
- '2.3'
|
42
|
+
- '2.4'
|
43
|
+
- '2.5'
|
44
|
+
- '2.6'
|
45
|
+
- '2.7'
|
46
|
+
# - '3.0'
|
47
|
+
runs-on: ubuntu-latest
|
48
|
+
env:
|
49
|
+
DISABLE_AWS_CLIENT_CHECK: true
|
50
|
+
|
51
|
+
steps:
|
52
|
+
- name: Checkout
|
53
|
+
uses: actions/checkout@v2
|
54
|
+
|
55
|
+
- name: Set up Ruby
|
56
|
+
uses: ruby/setup-ruby@v1
|
57
|
+
with:
|
58
|
+
ruby-version: ${{ matrix.ruby-version }}
|
59
|
+
bundler-cache: true
|
60
|
+
|
61
|
+
- name: Install xml lib
|
62
|
+
run: gem install ox
|
63
|
+
if: matrix.ruby-version == '3.0'
|
64
|
+
|
65
|
+
- name: Generate document
|
66
|
+
run: bundle exec bin/toolbox docgen > doc/resource_types.md
|
67
|
+
|
68
|
+
- name: Run tests
|
69
|
+
run: bundle exec rake spec
|
@@ -0,0 +1,29 @@
|
|
1
|
+
name: Doc
|
2
|
+
|
3
|
+
on:
|
4
|
+
schedule:
|
5
|
+
- cron: '0 0 * * 0'
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
doc:
|
9
|
+
name: Document
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
env:
|
12
|
+
DISABLE_AWS_CLIENT_CHECK: true
|
13
|
+
steps:
|
14
|
+
- name: Checkout
|
15
|
+
uses: actions/checkout@v2
|
16
|
+
|
17
|
+
- name: Set up Ruby
|
18
|
+
uses: ruby/setup-ruby@v1
|
19
|
+
with:
|
20
|
+
ruby-version: '2.7'
|
21
|
+
bundler-cache: true
|
22
|
+
|
23
|
+
- name: Generate document
|
24
|
+
run: bundle exec bin/toolbox docgen > doc/resource_types.md
|
25
|
+
|
26
|
+
- uses: EndBug/add-and-commit@v7
|
27
|
+
with:
|
28
|
+
default_author: github_actions
|
29
|
+
add: 'doc/resource_types.md'
|
data/.rubocop.yml
CHANGED
@@ -10,12 +10,24 @@ Layout/MultilineOperationIndentation:
|
|
10
10
|
Layout/MultilineMethodCallBraceLayout:
|
11
11
|
Enabled: false
|
12
12
|
|
13
|
+
Layout/ClosingHeredocIndentation:
|
14
|
+
Enabled: false
|
15
|
+
|
16
|
+
Layout/SpaceInsideArrayLiteralBrackets:
|
17
|
+
Enabled: false
|
18
|
+
|
13
19
|
Lint/HandleExceptions:
|
14
20
|
Enabled: false
|
15
21
|
|
16
22
|
Lint/UselessAssignment:
|
17
23
|
Enabled: false
|
18
24
|
|
25
|
+
Lint/DuplicateMethods:
|
26
|
+
Enabled: false
|
27
|
+
|
28
|
+
Lint/MissingCopEnableDirective:
|
29
|
+
Enabled: false
|
30
|
+
|
19
31
|
Metrics/AbcSize:
|
20
32
|
Max: 50
|
21
33
|
|
@@ -41,7 +53,13 @@ Metrics/ModuleLength:
|
|
41
53
|
Metrics/PerceivedComplexity:
|
42
54
|
Max: 15
|
43
55
|
|
44
|
-
|
56
|
+
Naming/UncommunicativeMethodParamName:
|
57
|
+
Enabled: false
|
58
|
+
|
59
|
+
Naming/PredicateName:
|
60
|
+
Enabled: false
|
61
|
+
|
62
|
+
Naming/HeredocDelimiterNaming:
|
45
63
|
Enabled: false
|
46
64
|
|
47
65
|
Performance/StringReplacement:
|
@@ -65,7 +83,10 @@ Style/ClassAndModuleChildren:
|
|
65
83
|
Style/Documentation:
|
66
84
|
Enabled: false
|
67
85
|
|
68
|
-
Style/
|
86
|
+
Style/MethodMissingSuper:
|
87
|
+
Enabled: false
|
88
|
+
|
89
|
+
Style/MissingRespondToMissing:
|
69
90
|
Enabled: false
|
70
91
|
|
71
92
|
Style/MutableConstant:
|
@@ -91,3 +112,27 @@ Style/SymbolProc:
|
|
91
112
|
|
92
113
|
Style/YodaCondition:
|
93
114
|
Enabled: false
|
115
|
+
|
116
|
+
Style/RescueStandardError:
|
117
|
+
Enabled: false
|
118
|
+
|
119
|
+
Style/RedundantReturn:
|
120
|
+
Enabled: false
|
121
|
+
|
122
|
+
Style/ConditionalAssignment:
|
123
|
+
Enabled: false
|
124
|
+
|
125
|
+
Style/EvalWithLocation:
|
126
|
+
Enabled: false
|
127
|
+
|
128
|
+
Style/MixinUsage:
|
129
|
+
Exclude:
|
130
|
+
- 'lib/awspec/helper.rb'
|
131
|
+
|
132
|
+
Style/StderrPuts:
|
133
|
+
Exclude:
|
134
|
+
- 'lib/awspec/generator/template.rb'
|
135
|
+
- 'lib/awspec/setup.rb'
|
136
|
+
|
137
|
+
Style/IfUnlessModifier:
|
138
|
+
Enabled: false
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,11 +1,9 @@
|
|
1
|
-
# awspec [![Gem](https://img.shields.io/gem/v/awspec.svg)](https://rubygems.org/gems/awspec) [![
|
1
|
+
# awspec [![Gem](https://img.shields.io/gem/v/awspec.svg)](https://rubygems.org/gems/awspec) [![CI](https://github.com/k1LoW/awspec/actions/workflows/ci.yml/badge.svg)](https://github.com/k1LoW/awspec/actions)
|
2
2
|
|
3
3
|
![Logo](./awspec-logo.png)
|
4
4
|
|
5
5
|
RSpec tests for your AWS resources.
|
6
6
|
|
7
|
-
[![Join the chat at https://gitter.im/k1LoW/awspec](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/k1LoW/awspec?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
8
|
-
|
9
7
|
[Resource Types](doc/resource_types.md) | [Contributing](doc/contributing.md)
|
10
8
|
|
11
9
|
## Installation
|
@@ -32,7 +30,7 @@ If you're starting on a fresh RSpec project, you can use awspec to generate your
|
|
32
30
|
|
33
31
|
$ awspec init
|
34
32
|
|
35
|
-
If you're working on an
|
33
|
+
If you're working on an existing RSpec project, you will need to add the following lines to your `spec_helper.rb` file:
|
36
34
|
|
37
35
|
```ruby
|
38
36
|
require 'awspec'
|
data/Rakefile
CHANGED
data/awspec.gemspec
CHANGED
@@ -1,6 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
lib = File.expand_path('../lib', __FILE__)
|
1
|
+
lib = File.expand_path('lib', __dir__)
|
4
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
3
|
require 'awspec/version'
|
6
4
|
|
@@ -21,6 +19,7 @@ Gem::Specification.new do |spec|
|
|
21
19
|
spec.require_paths = ['lib']
|
22
20
|
|
23
21
|
spec.required_ruby_version = '>= 2.1'
|
22
|
+
spec.add_runtime_dependency 'addressable'
|
24
23
|
spec.add_runtime_dependency 'aws-sdk', '~> 3'
|
25
24
|
spec.add_runtime_dependency 'awsecrets', '~> 1'
|
26
25
|
spec.add_runtime_dependency 'dry-inflector'
|
@@ -29,10 +28,9 @@ Gem::Specification.new do |spec|
|
|
29
28
|
spec.add_runtime_dependency 'rspec-its'
|
30
29
|
spec.add_runtime_dependency 'term-ansicolor'
|
31
30
|
spec.add_runtime_dependency 'thor'
|
32
|
-
spec.add_runtime_dependency 'addressable'
|
33
31
|
spec.add_development_dependency 'bundler', '>= 1.9', '< 3.0'
|
34
32
|
spec.add_development_dependency 'octorelease'
|
35
33
|
spec.add_development_dependency 'pry'
|
36
34
|
spec.add_development_dependency 'rake', '~> 12.0'
|
37
|
-
spec.add_development_dependency 'rubocop', '~> 0.
|
35
|
+
spec.add_development_dependency 'rubocop', '~> 0.57.0'
|
38
36
|
end
|
@@ -21,6 +21,15 @@ describe cloudwatch_logs('my-cloudwatch-logs-group') do
|
|
21
21
|
it { should have_metric_filter('my-cloudwatch-logs-metric-filter') }
|
22
22
|
end
|
23
23
|
```
|
24
|
+
or
|
25
|
+
```ruby
|
26
|
+
describe cloudwatch_logs('my-cloudwatch-logs-group') do
|
27
|
+
it do
|
28
|
+
should have_metric_filter('my-cloudwatch-logs-metric-filter')
|
29
|
+
.filter_pattern('[date, error]')
|
30
|
+
end
|
31
|
+
end
|
32
|
+
```
|
24
33
|
|
25
34
|
### have_subscription_filter
|
26
35
|
|
@@ -5,6 +5,25 @@ describe eks_nodegroup('my-eks-nodegroup'), cluster: 'my-cluster' do
|
|
5
5
|
it { should exist }
|
6
6
|
end
|
7
7
|
```
|
8
|
+
|
9
|
+
### have_security_group
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
describe eks_nodegroup('my-eks-nodegroup'), cluster: 'my-cluster' do
|
13
|
+
it { should have_security_group('sg-1a2b3cd4') }
|
14
|
+
end
|
15
|
+
```
|
16
|
+
|
17
|
+
### scaling_config
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
describe eks_nodegroup('my-eks-nodegroup'), cluster: 'my-cluster' do
|
21
|
+
its('scaling_config.min_size') { should eq 1 }
|
22
|
+
its('scaling_config.desired_size') { should eq 2 }
|
23
|
+
its('scaling_config.max_size') { should eq 3 }
|
24
|
+
end
|
25
|
+
```
|
26
|
+
|
8
27
|
### be_active, be_creating
|
9
28
|
|
10
29
|
```ruby
|
@@ -12,3 +31,37 @@ describe eks('my-eks-nodegroup'), cluster: 'my-cluster' do
|
|
12
31
|
it { should be_active }
|
13
32
|
end
|
14
33
|
```
|
34
|
+
|
35
|
+
### be_ready
|
36
|
+
|
37
|
+
This matcher *might* not be exactly you are expecting: it is different from what
|
38
|
+
you can see when looking at the AWS console at the Node Groups configuration
|
39
|
+
and check if the nodes Status is "Ready".
|
40
|
+
|
41
|
+
What you seeing over there is
|
42
|
+
[actually the same thing](https://aws.amazon.com/premiumsupport/knowledge-center/eks-node-status-ready/)
|
43
|
+
you would if using `kubectl`.
|
44
|
+
|
45
|
+
This matcher cannot do the same because it would involve using the Kubernetes
|
46
|
+
API: the AWS Ruby SDK currently doesn't expose this information.
|
47
|
+
|
48
|
+
What you can get from `be_ready` matcher is asserting that you have **at least**
|
49
|
+
the number of EC2 instances (the nodes in your EKS Node Group) are actually
|
50
|
+
in running state. It doesn't mean everything is fine, the node (EC2 instance)
|
51
|
+
can be running but without communication with the cluster or any order issue
|
52
|
+
regarding the Kubernetes configuration.
|
53
|
+
|
54
|
+
Although it might look an incomplete assertion, definitely the Node Group
|
55
|
+
"Status" won't be "Active" if the EC2 instances associated with it are not
|
56
|
+
running.
|
57
|
+
|
58
|
+
So, using this assertion like the sample below:
|
59
|
+
|
60
|
+
```ruby
|
61
|
+
describe eks('my-eks-nodegroup'), cluster: 'my-cluster' do
|
62
|
+
it { should be_ready }
|
63
|
+
end
|
64
|
+
```
|
65
|
+
|
66
|
+
Will pass if at least the minimum expected (see `scaling_config`) number of EC2
|
67
|
+
instances are running.
|
data/doc/resource_types.md
CHANGED
@@ -273,7 +273,7 @@ end
|
|
273
273
|
|
274
274
|
### have_tag
|
275
275
|
|
276
|
-
### its(:architecture), its(:creation_date), its(:image_id), its(:image_location), its(:image_type), its(:public), its(:kernel_id), its(:owner_id), its(:platform), its(:platform_details), its(:usage_operation), its(:ramdisk_id), its(:state), its(:description), its(:ena_support), its(:hypervisor), its(:image_owner_alias), its(:name), its(:root_device_name), its(:root_device_type), its(:sriov_net_support), its(:state_reason), its(:virtualization_type), its(:boot_mode)
|
276
|
+
### its(:architecture), its(:creation_date), its(:image_id), its(:image_location), its(:image_type), its(:public), its(:kernel_id), its(:owner_id), its(:platform), its(:platform_details), its(:usage_operation), its(:ramdisk_id), its(:state), its(:description), its(:ena_support), its(:hypervisor), its(:image_owner_alias), its(:name), its(:root_device_name), its(:root_device_type), its(:sriov_net_support), its(:state_reason), its(:virtualization_type), its(:boot_mode), its(:deprecation_time)
|
277
277
|
### :unlock: Advanced use
|
278
278
|
|
279
279
|
`ami` can use `Aws::EC2::Image` resource (see http://docs.aws.amazon.com/sdkforruby/api/Aws/EC2/Image.html).
|
@@ -360,7 +360,7 @@ describe autoscaling_group('my-auto-scaling-group') do
|
|
360
360
|
end
|
361
361
|
```
|
362
362
|
|
363
|
-
### its(:auto_scaling_group_name), its(:auto_scaling_group_arn), its(:launch_configuration_name), its(:launch_template), its(:mixed_instances_policy), its(:min_size), its(:max_size), its(:desired_capacity), its(:default_cooldown), its(:availability_zones), its(:load_balancer_names), its(:target_group_arns), its(:health_check_type), its(:health_check_grace_period), its(:created_time), its(:placement_group), its(:vpc_zone_identifier), its(:enabled_metrics), its(:status), its(:termination_policies), its(:new_instances_protected_from_scale_in), its(:service_linked_role_arn), its(:max_instance_lifetime), its(:capacity_rebalance), its(:warm_pool_configuration), its(:warm_pool_size)
|
363
|
+
### its(:auto_scaling_group_name), its(:auto_scaling_group_arn), its(:launch_configuration_name), its(:launch_template), its(:mixed_instances_policy), its(:min_size), its(:max_size), its(:desired_capacity), its(:predicted_capacity), its(:default_cooldown), its(:availability_zones), its(:load_balancer_names), its(:target_group_arns), its(:health_check_type), its(:health_check_grace_period), its(:created_time), its(:placement_group), its(:vpc_zone_identifier), its(:enabled_metrics), its(:status), its(:termination_policies), its(:new_instances_protected_from_scale_in), its(:service_linked_role_arn), its(:max_instance_lifetime), its(:capacity_rebalance), its(:warm_pool_configuration), its(:warm_pool_size), its(:context)
|
364
364
|
## <a name="batch_compute_environment">batch_compute_environment</a>
|
365
365
|
|
366
366
|
BatchComputeEnvironment resource type.
|
@@ -678,6 +678,15 @@ describe cloudwatch_logs('my-cloudwatch-logs-group') do
|
|
678
678
|
it { should have_metric_filter('my-cloudwatch-logs-metric-filter') }
|
679
679
|
end
|
680
680
|
```
|
681
|
+
or
|
682
|
+
```ruby
|
683
|
+
describe cloudwatch_logs('my-cloudwatch-logs-group') do
|
684
|
+
it do
|
685
|
+
should have_metric_filter('my-cloudwatch-logs-metric-filter')
|
686
|
+
.filter_pattern('[date, error]')
|
687
|
+
end
|
688
|
+
end
|
689
|
+
```
|
681
690
|
|
682
691
|
|
683
692
|
### have_subscription_filter
|
@@ -836,7 +845,7 @@ describe directconnect_virtual_interface('my-directconnect-virtual-interface') d
|
|
836
845
|
end
|
837
846
|
```
|
838
847
|
|
839
|
-
### its(:owner_account), its(:virtual_interface_id), its(:location), its(:connection_id), its(:virtual_interface_type), its(:virtual_interface_name), its(:vlan), its(:asn), its(:amazon_side_asn), its(:auth_key), its(:amazon_address), its(:customer_address), its(:address_family), its(:virtual_interface_state), its(:customer_router_config), its(:mtu), its(:jumbo_frame_capable), its(:virtual_gateway_id), its(:direct_connect_gateway_id), its(:route_filter_prefixes), its(:bgp_peers), its(:region), its(:aws_device_v2), its(:tags)
|
848
|
+
### its(:owner_account), its(:virtual_interface_id), its(:location), its(:connection_id), its(:virtual_interface_type), its(:virtual_interface_name), its(:vlan), its(:asn), its(:amazon_side_asn), its(:auth_key), its(:amazon_address), its(:customer_address), its(:address_family), its(:virtual_interface_state), its(:customer_router_config), its(:mtu), its(:jumbo_frame_capable), its(:virtual_gateway_id), its(:direct_connect_gateway_id), its(:route_filter_prefixes), its(:bgp_peers), its(:region), its(:aws_device_v2), its(:aws_logical_device_id), its(:tags)
|
840
849
|
## <a name="dynamodb_table">dynamodb_table</a>
|
841
850
|
|
842
851
|
DynamodbTable resource type.
|
@@ -1370,9 +1379,53 @@ describe eks_nodegroup('my-eks-nodegroup'), cluster: 'my-cluster' do
|
|
1370
1379
|
end
|
1371
1380
|
```
|
1372
1381
|
|
1382
|
+
|
1373
1383
|
### be_active, be_inactive
|
1374
1384
|
|
1375
|
-
###
|
1385
|
+
### be_ready
|
1386
|
+
|
1387
|
+
This matcher *might* not be exactly you are expecting: it is different from what
|
1388
|
+
you can see when looking at the AWS console at the Node Groups configuration
|
1389
|
+
and check if the nodes Status is "Ready".
|
1390
|
+
|
1391
|
+
What you seeing over there is
|
1392
|
+
[actually the same thing](https://aws.amazon.com/premiumsupport/knowledge-center/eks-node-status-ready/)
|
1393
|
+
you would if using `kubectl`.
|
1394
|
+
|
1395
|
+
This matcher cannot do the same because it would involve using the Kubernetes
|
1396
|
+
API: the AWS Ruby SDK currently doesn't expose this information.
|
1397
|
+
|
1398
|
+
What you can get from `be_ready` matcher is asserting that you have **at least**
|
1399
|
+
the number of EC2 instances (the nodes in your EKS Node Group) are actually
|
1400
|
+
in running state. It doesn't mean everything is fine, the node (EC2 instance)
|
1401
|
+
can be running but without communication with the cluster or any order issue
|
1402
|
+
regarding the Kubernetes configuration.
|
1403
|
+
|
1404
|
+
Although it might look an incomplete assertion, definitely the Node Group
|
1405
|
+
"Status" won't be "Active" if the EC2 instances associated with it are not
|
1406
|
+
running.
|
1407
|
+
|
1408
|
+
So, using this assertion like the sample below:
|
1409
|
+
|
1410
|
+
```ruby
|
1411
|
+
describe eks('my-eks-nodegroup'), cluster: 'my-cluster' do
|
1412
|
+
it { should be_ready }
|
1413
|
+
end
|
1414
|
+
```
|
1415
|
+
|
1416
|
+
Will pass if at least the minimum expected (see `scaling_config`) number of EC2
|
1417
|
+
instances are running.
|
1418
|
+
|
1419
|
+
### have_security_group
|
1420
|
+
|
1421
|
+
```ruby
|
1422
|
+
describe eks_nodegroup('my-eks-nodegroup'), cluster: 'my-cluster' do
|
1423
|
+
it { should have_security_group('sg-1a2b3cd4') }
|
1424
|
+
end
|
1425
|
+
```
|
1426
|
+
|
1427
|
+
|
1428
|
+
### its(:nodegroup_name), its(:nodegroup_arn), its(:cluster_name), its(:version), its(:release_version), its(:created_at), its(:modified_at), its(:status), its(:capacity_type), its(:instance_types), its(:subnets), its(:remote_access), its(:ami_type), its(:node_role), its(:labels), its(:taints), its(:resources), its(:disk_size), its(:health), its(:update_config), its(:launch_template), its(:tags)
|
1376
1429
|
## <a name="elasticache">elasticache</a>
|
1377
1430
|
|
1378
1431
|
Elasticache resource type.
|
@@ -2178,7 +2231,7 @@ DOC
|
|
2178
2231
|
end
|
2179
2232
|
```
|
2180
2233
|
|
2181
|
-
### 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(:custom_key_store_id), its(:cloud_hsm_cluster_id), its(:expiration_model), its(:key_manager), its(:customer_master_key_spec), its(:encryption_algorithms), its(:signing_algorithms)
|
2234
|
+
### 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(:custom_key_store_id), its(:cloud_hsm_cluster_id), its(:expiration_model), its(:key_manager), its(:customer_master_key_spec), its(:key_spec), its(:encryption_algorithms), its(:signing_algorithms), its(:multi_region), its(:multi_region_configuration), its(:pending_deletion_window_in_days)
|
2182
2235
|
## <a name="lambda">lambda</a>
|
2183
2236
|
|
2184
2237
|
Lambda resource type.
|
@@ -2422,7 +2475,7 @@ end
|
|
2422
2475
|
```
|
2423
2476
|
|
2424
2477
|
|
2425
|
-
### 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)
|
2478
|
+
### 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(:connectivity_type)
|
2426
2479
|
## <a name="network_acl">network_acl</a>
|
2427
2480
|
|
2428
2481
|
NetworkAcl resource type.
|
@@ -2573,7 +2626,7 @@ describe network_interface('eni-12ab3cde') do
|
|
2573
2626
|
end
|
2574
2627
|
```
|
2575
2628
|
|
2576
|
-
### its(:association), its(:availability_zone), its(:description), its(:interface_type), its(:ipv_6_addresses), its(:mac_address), its(:network_interface_id), its(:outpost_arn), its(:owner_id), its(:private_dns_name), its(:private_ip_address), its(:requester_id), its(:requester_managed), its(:source_dest_check), its(:status), its(:subnet_id), its(:vpc_id)
|
2629
|
+
### its(:association), its(:availability_zone), its(:description), its(:interface_type), its(:ipv_6_addresses), its(:mac_address), its(:network_interface_id), its(:outpost_arn), its(:owner_id), its(:private_dns_name), its(:private_ip_address), its(:ipv_4_prefixes), its(:ipv_6_prefixes), its(:requester_id), its(:requester_managed), its(:source_dest_check), its(:status), its(:subnet_id), its(:vpc_id)
|
2577
2630
|
## <a name="nlb">nlb</a>
|
2578
2631
|
|
2579
2632
|
NLB resource type.
|
@@ -2801,7 +2854,7 @@ end
|
|
2801
2854
|
```
|
2802
2855
|
|
2803
2856
|
|
2804
|
-
### its(:vpc_id), its(:db_instance_identifier), its(:db_instance_class), its(:engine), its(:db_instance_status), its(:master_username), its(:db_name), its(:endpoint), its(:allocated_storage), its(:instance_create_time), its(:preferred_backup_window), its(:backup_retention_period), its(:db_security_groups), its(:availability_zone), its(:preferred_maintenance_window), its(:pending_modified_values), its(:latest_restorable_time), its(:multi_az), its(:engine_version), its(:auto_minor_version_upgrade), its(:read_replica_source_db_instance_identifier), its(:read_replica_db_instance_identifiers), its(:read_replica_db_cluster_identifiers), its(:replica_mode), its(:license_model), its(:iops), its(:character_set_name), its(:nchar_character_set_name), its(:secondary_availability_zone), its(:publicly_accessible), its(:status_infos), its(:storage_type), its(:tde_credential_arn), its(:db_instance_port), its(:db_cluster_identifier), its(:storage_encrypted), its(:kms_key_id), its(:dbi_resource_id), its(:ca_certificate_identifier), its(:domain_memberships), its(:copy_tags_to_snapshot), its(:monitoring_interval), its(:enhanced_monitoring_resource_arn), its(:monitoring_role_arn), its(:promotion_tier), its(:db_instance_arn), its(:timezone), its(:iam_database_authentication_enabled), its(:performance_insights_enabled), its(:performance_insights_kms_key_id), its(:performance_insights_retention_period), its(:enabled_cloudwatch_logs_exports), its(:processor_features), its(:deletion_protection), its(:associated_roles), its(:listener_endpoint), its(:max_allocated_storage), its(:tag_list), its(:db_instance_automated_backups_replications), its(:customer_owned_ip_enabled), its(:aws_backup_recovery_point_arn)
|
2857
|
+
### its(:vpc_id), its(:db_instance_identifier), its(:db_instance_class), its(:engine), its(:db_instance_status), its(:automatic_restart_time), its(:master_username), its(:db_name), its(:endpoint), its(:allocated_storage), its(:instance_create_time), its(:preferred_backup_window), its(:backup_retention_period), its(:db_security_groups), its(:availability_zone), its(:preferred_maintenance_window), its(:pending_modified_values), its(:latest_restorable_time), its(:multi_az), its(:engine_version), its(:auto_minor_version_upgrade), its(:read_replica_source_db_instance_identifier), its(:read_replica_db_instance_identifiers), its(:read_replica_db_cluster_identifiers), its(:replica_mode), its(:license_model), its(:iops), its(:character_set_name), its(:nchar_character_set_name), its(:secondary_availability_zone), its(:publicly_accessible), its(:status_infos), its(:storage_type), its(:tde_credential_arn), its(:db_instance_port), its(:db_cluster_identifier), its(:storage_encrypted), its(:kms_key_id), its(:dbi_resource_id), its(:ca_certificate_identifier), its(:domain_memberships), its(:copy_tags_to_snapshot), its(:monitoring_interval), its(:enhanced_monitoring_resource_arn), its(:monitoring_role_arn), its(:promotion_tier), its(:db_instance_arn), its(:timezone), its(:iam_database_authentication_enabled), its(:performance_insights_enabled), its(:performance_insights_kms_key_id), its(:performance_insights_retention_period), its(:enabled_cloudwatch_logs_exports), its(:processor_features), its(:deletion_protection), its(:associated_roles), its(:listener_endpoint), its(:max_allocated_storage), its(:tag_list), its(:db_instance_automated_backups_replications), its(:customer_owned_ip_enabled), its(:aws_backup_recovery_point_arn), its(:activity_stream_status), its(:activity_stream_kms_key_id), its(:activity_stream_kinesis_stream_name), its(:activity_stream_mode), its(:activity_stream_engine_native_audit_fields_included)
|
2805
2858
|
### :unlock: Advanced use
|
2806
2859
|
|
2807
2860
|
`rds` can use `Aws::RDS::DBInstance` resource (see http://docs.aws.amazon.com/sdkforruby/api/Aws/RDS/DBInstance.html).
|
@@ -3515,7 +3568,7 @@ end
|
|
3515
3568
|
```
|
3516
3569
|
|
3517
3570
|
|
3518
|
-
|
3571
|
+
|
3519
3572
|
### :unlock: Advanced use
|
3520
3573
|
|
3521
3574
|
`subnet` can use `Aws::EC2::Subnet` resource (see http://docs.aws.amazon.com/sdkforruby/api/Aws/EC2/Subnet.html).
|