awspec 0.72.0 → 0.73.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/_resource_types/elasticache.md +10 -0
- data/doc/resource_types.md +297 -286
- data/lib/awspec/generator/doc/type.rb +1 -1
- data/lib/awspec/stub/elasticache.rb +14 -0
- data/lib/awspec/type/elasticache.rb +30 -0
- data/lib/awspec/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b63c6ae1004887511da7b71db6b226bfc8b55384
|
4
|
+
data.tar.gz: baf3261617e9ee47f143e0d2402c5dc11c1e6315
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3535d850d90d8f32043534a98d1ae93add81511706fd1f7ea6d5f011c59c5ca9f6a498cee5db1d1ea7a268d2e5350713db3b3e082182db460aaf608079dee70
|
7
|
+
data.tar.gz: 6c099c0ff5b7a44af4c6c0cf8bf400706c29f1b841e998b821e49f2e91023283447681383a46c2245b8874e1242162dc89377f27586e7c1f48558e769c23cde4
|
@@ -22,6 +22,16 @@ describe elasticache('my-rep-group-001') do
|
|
22
22
|
end
|
23
23
|
```
|
24
24
|
|
25
|
+
### have_security_group
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
describe elasticache('my-rep-group-001') do
|
29
|
+
it { should have_security_group('sg-da1bc2ef') }
|
30
|
+
it { should have_security_group('group-name-sg') }
|
31
|
+
it { should have_security_group('my-cache-sg') }
|
32
|
+
end
|
33
|
+
```
|
34
|
+
|
25
35
|
### belong_to_cache_subnet_group
|
26
36
|
|
27
37
|
```ruby
|
data/doc/resource_types.md
CHANGED
@@ -51,6 +51,22 @@
|
|
51
51
|
| [waf_web_acl](#waf_web_acl)
|
52
52
|
| [account](#account)
|
53
53
|
|
54
|
+
## <a name="acm">acm</a>
|
55
|
+
|
56
|
+
Acm resource type.
|
57
|
+
|
58
|
+
### exist
|
59
|
+
|
60
|
+
```ruby
|
61
|
+
describe acm('example.com') do
|
62
|
+
it { should exist }
|
63
|
+
end
|
64
|
+
```
|
65
|
+
|
66
|
+
|
67
|
+
### be_pending_validation, be_issued, be_inactive, be_expired, be_validation_timed_out, be_revoked, be_failed
|
68
|
+
|
69
|
+
### its(:certificate_arn), its(:domain_name), its(:subject_alternative_names), its(:domain_validation_options), its(:serial), its(:subject), its(:issuer), its(:created_at), its(:issued_at), its(:imported_at), its(:status), its(:revoked_at), its(:revocation_reason), its(:not_before), its(:not_after), its(:key_algorithm), its(:signature_algorithm), its(:in_use_by), its(:failure_reason), its(:type), its(:renewal_summary)
|
54
70
|
## <a name="alb">alb</a>
|
55
71
|
|
56
72
|
ALB resource type.
|
@@ -125,6 +141,60 @@ end
|
|
125
141
|
```
|
126
142
|
|
127
143
|
### its(:auto_scaling_group_name), its(:auto_scaling_group_arn), its(:launch_configuration_name), 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(:suspended_processes), its(:placement_group), its(:vpc_zone_identifier), its(:enabled_metrics), its(:status), its(:termination_policies), its(:new_instances_protected_from_scale_in)
|
144
|
+
## <a name="cloudfront_distribution">cloudfront_distribution</a>
|
145
|
+
|
146
|
+
CloudfrontDistribution resource type.
|
147
|
+
|
148
|
+
### exist
|
149
|
+
|
150
|
+
```ruby
|
151
|
+
describe cloudfront_distribution('123456789zyxw.cloudfront.net') do
|
152
|
+
it { should exist }
|
153
|
+
end
|
154
|
+
```
|
155
|
+
|
156
|
+
|
157
|
+
### be_in_progress, be_deployed
|
158
|
+
|
159
|
+
```ruby
|
160
|
+
describe cloudfront_distribution('123456789zyxw.cloudfront.net') do
|
161
|
+
it { should be_deployed }
|
162
|
+
end
|
163
|
+
```
|
164
|
+
|
165
|
+
|
166
|
+
### have_origin
|
167
|
+
|
168
|
+
```ruby
|
169
|
+
describe cloudfront_distribution('E2CLOUDFRONTXX') do
|
170
|
+
it do
|
171
|
+
should have_origin('cf-s3-origin-hosting.dev.example.com')
|
172
|
+
.domain_name('cf-s3-origin-hosting.dev.example.com.s3.amazonaws.com')
|
173
|
+
.origin_path('/img')
|
174
|
+
.origin_access_identity('origin-access-identity/cloudfront/E2VVVVVVVVVVVV')
|
175
|
+
end
|
176
|
+
end
|
177
|
+
```
|
178
|
+
|
179
|
+
|
180
|
+
### have_origin_domain_name
|
181
|
+
|
182
|
+
```ruby
|
183
|
+
describe cloudfront_distribution('123456789zyxw.cloudfront.net') do
|
184
|
+
it { should have_origin_domain_name('cf-s3-origin-hosting.dev.example.com.s3.amazonaws.com') }
|
185
|
+
end
|
186
|
+
```
|
187
|
+
|
188
|
+
|
189
|
+
### have_origin_domain_name_and_path
|
190
|
+
|
191
|
+
```ruby
|
192
|
+
describe cloudfront_distribution('123456789zyxw.cloudfront.net') do
|
193
|
+
it { should have_origin_domain_name_and_path('cf-s3-origin-hosting.dev.example.com.s3.amazonaws.com/img') }
|
194
|
+
end
|
195
|
+
```
|
196
|
+
|
197
|
+
### its(:id), its(:arn), its(:status), its(:last_modified_time), its(:domain_name), its(:comment), its(:price_class), its(:enabled), its(:web_acl_id), its(:http_version), its(:is_ipv6_enabled)
|
128
198
|
## <a name="cloudtrail">cloudtrail</a>
|
129
199
|
|
130
200
|
Cloudtrail resource type.
|
@@ -234,6 +304,87 @@ CloudwatchEvent resource type.
|
|
234
304
|
### be_scheduled
|
235
305
|
|
236
306
|
### its(:name), its(:arn), its(:event_pattern), its(:state), its(:description), its(:schedule_expression), its(:role_arn)
|
307
|
+
## <a name="cloudwatch_logs">cloudwatch_logs</a>
|
308
|
+
|
309
|
+
CloudwatchLogs resource type.
|
310
|
+
|
311
|
+
### exist
|
312
|
+
|
313
|
+
```ruby
|
314
|
+
describe cloudwatch_logs('my-cloudwatch-logs-group') do
|
315
|
+
it { should exist }
|
316
|
+
end
|
317
|
+
```
|
318
|
+
|
319
|
+
|
320
|
+
### have_log_stream
|
321
|
+
|
322
|
+
```ruby
|
323
|
+
describe cloudwatch_logs('my-cloudwatch-logs-group') do
|
324
|
+
it { should have_log_stream('my-cloudwatch-logs-stream') }
|
325
|
+
end
|
326
|
+
```
|
327
|
+
|
328
|
+
|
329
|
+
### have_metric_filter
|
330
|
+
|
331
|
+
```ruby
|
332
|
+
describe cloudwatch_logs('my-cloudwatch-logs-group') do
|
333
|
+
it { should have_metric_filter('my-cloudwatch-logs-metric-filter') }
|
334
|
+
end
|
335
|
+
```
|
336
|
+
|
337
|
+
|
338
|
+
### have_subscription_filter
|
339
|
+
|
340
|
+
```ruby
|
341
|
+
describe cloudwatch_logs('my-cloudwatch-logs-group') do
|
342
|
+
it { should have_subscription_filter('my-cloudwatch-logs-subscription-filter') }
|
343
|
+
end
|
344
|
+
```
|
345
|
+
or
|
346
|
+
```ruby
|
347
|
+
describe cloudwatch_logs('my-cloudwatch-logs-group') do
|
348
|
+
it do
|
349
|
+
should have_subscription_filter('my-cloudwatch-logs-subscription-filter')\
|
350
|
+
.filter_pattern('[host, ident, authuser, date, request, status, bytes]')
|
351
|
+
end
|
352
|
+
end
|
353
|
+
```
|
354
|
+
|
355
|
+
### its(:log_group_name), its(:creation_time), its(:retention_in_days), its(:metric_filter_count), its(:arn), its(:stored_bytes)
|
356
|
+
## <a name="customer_gateway">customer_gateway</a>
|
357
|
+
|
358
|
+
CustomerGateway resource type.
|
359
|
+
|
360
|
+
### exist
|
361
|
+
|
362
|
+
```ruby
|
363
|
+
describe customer_gateway('my-customer-gateway') do
|
364
|
+
it { should exist }
|
365
|
+
end
|
366
|
+
```
|
367
|
+
|
368
|
+
|
369
|
+
### be_pending, be_available, be_deleting, be_deleted
|
370
|
+
|
371
|
+
```ruby
|
372
|
+
describe customer_gateway('my-customer-gateway') do
|
373
|
+
it { should be_running }
|
374
|
+
end
|
375
|
+
```
|
376
|
+
|
377
|
+
|
378
|
+
### have_tag
|
379
|
+
|
380
|
+
```ruby
|
381
|
+
describe customer_gateway('my-customer-gateway') do
|
382
|
+
it { should have_tag('Name').value('my-customer-gateway') }
|
383
|
+
end
|
384
|
+
```
|
385
|
+
|
386
|
+
|
387
|
+
### its(:customer_gateway_id), its(:state), its(:type), its(:ip_address), its(:bgp_asn), its(:tags)
|
237
388
|
## <a name="directconnect_virtual_interface">directconnect_virtual_interface</a>
|
238
389
|
|
239
390
|
DirectconnectVirtualInterface resource type.
|
@@ -270,6 +421,61 @@ end
|
|
270
421
|
```
|
271
422
|
|
272
423
|
### 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(:auth_key), its(:amazon_address), its(:customer_address), its(:address_family), its(:virtual_interface_state), its(:customer_router_config), its(:virtual_gateway_id), its(:route_filter_prefixes), its(:bgp_peers)
|
424
|
+
## <a name="dynamodb_table">dynamodb_table</a>
|
425
|
+
|
426
|
+
DynamodbTable resource type.
|
427
|
+
|
428
|
+
### exist
|
429
|
+
|
430
|
+
```ruby
|
431
|
+
describe dynamodb_table('my-dynamodb-table') do
|
432
|
+
it { should exist }
|
433
|
+
end
|
434
|
+
```
|
435
|
+
|
436
|
+
|
437
|
+
### be_creating, be_updating, be_deleting, be_active
|
438
|
+
|
439
|
+
### have_attribute_definition
|
440
|
+
|
441
|
+
```ruby
|
442
|
+
describe dynamodb_table('my-dynamodb-table') do
|
443
|
+
it { should have_attribute_definition('my-dynamodb-table-attaribute1').attribute_type('S') }
|
444
|
+
it { should have_attribute_definition('my-dynamodb-table-attaribute2').attribute_type('N') }
|
445
|
+
end
|
446
|
+
```
|
447
|
+
|
448
|
+
|
449
|
+
### have_key_schema
|
450
|
+
|
451
|
+
```ruby
|
452
|
+
describe dynamodb_table('my-dynamodb-table') do
|
453
|
+
it { should have_key_schema('my-dynamodb-table-key_schema1').key_type('HASH') }
|
454
|
+
it { should have_key_schema('my-dynamodb-table-key_schema2').key_type('RANGE') }
|
455
|
+
end
|
456
|
+
```
|
457
|
+
|
458
|
+
|
459
|
+
### its(:table_name), its(:table_status), its(:creation_date_time), its(:table_size_bytes), its(:item_count), its(:table_arn), its(:local_secondary_indexes), its(:global_secondary_indexes), its(:stream_specification), its(:latest_stream_label), its(:latest_stream_arn)
|
460
|
+
### :unlock: Advanced use
|
461
|
+
|
462
|
+
`dynamodb_table` can use `Aws::DynamoDB::Table` resource (see http://docs.aws.amazon.com/sdkforruby/api/Aws/DynamoDB/Table.html).
|
463
|
+
|
464
|
+
```ruby
|
465
|
+
describe dynamodb_table('my-dynamodb-table') do
|
466
|
+
its('key_schema.first.key_type') { should eq 'HASH' }
|
467
|
+
end
|
468
|
+
```
|
469
|
+
|
470
|
+
or
|
471
|
+
|
472
|
+
```ruby
|
473
|
+
describe dynamodb_table('my-dynamodb-table') do
|
474
|
+
its('resource.key_schema.first.key_type') { should eq 'HASH' }
|
475
|
+
end
|
476
|
+
```
|
477
|
+
|
478
|
+
|
273
479
|
## <a name="ebs">ebs</a>
|
274
480
|
|
275
481
|
EBS resource type.
|
@@ -664,6 +870,17 @@ end
|
|
664
870
|
```
|
665
871
|
|
666
872
|
|
873
|
+
### have_security_group
|
874
|
+
|
875
|
+
```ruby
|
876
|
+
describe elasticache('my-rep-group-001') do
|
877
|
+
it { should have_security_group('sg-da1bc2ef') }
|
878
|
+
it { should have_security_group('group-name-sg') }
|
879
|
+
it { should have_security_group('my-cache-sg') }
|
880
|
+
end
|
881
|
+
```
|
882
|
+
|
883
|
+
|
667
884
|
### belong_to_cache_subnet_group
|
668
885
|
|
669
886
|
```ruby
|
@@ -770,6 +987,21 @@ end
|
|
770
987
|
|
771
988
|
|
772
989
|
### its(:domain_id), its(:domain_name), its(:arn), its(:created), its(:deleted), its(:endpoint), its(:processing), its(:elasticsearch_version), its(:access_policies), its(:snapshot_options), its(:advanced_options)
|
990
|
+
## <a name="elastictranscoder_pipeline">elastictranscoder_pipeline</a>
|
991
|
+
|
992
|
+
ElastictranscoderPipeline resource type.
|
993
|
+
|
994
|
+
### exist
|
995
|
+
|
996
|
+
### be_active, be_paused
|
997
|
+
|
998
|
+
```ruby
|
999
|
+
describe elastictranscoder_pipeline('my-elastictranscoder-pipeline') do
|
1000
|
+
it { should be_active }
|
1001
|
+
end
|
1002
|
+
```
|
1003
|
+
|
1004
|
+
|
773
1005
|
## <a name="elb">elb</a>
|
774
1006
|
|
775
1007
|
ELB resource type.
|
@@ -1110,36 +1342,75 @@ describe iam_user('my-iam-user') do
|
|
1110
1342
|
end
|
1111
1343
|
```
|
1112
1344
|
|
1113
|
-
## <a name="
|
1345
|
+
## <a name="internet_gateway">internet_gateway</a>
|
1114
1346
|
|
1115
|
-
|
1347
|
+
InternetGateway resource type.
|
1116
1348
|
|
1117
1349
|
### exist
|
1118
1350
|
|
1119
1351
|
```ruby
|
1120
|
-
describe
|
1352
|
+
describe internet_gateway('igw-1ab2cd3e') do
|
1353
|
+
it { should exist }
|
1354
|
+
end
|
1355
|
+
|
1356
|
+
describe internet_gateway('my-internet-gateway') do
|
1121
1357
|
it { should exist }
|
1122
1358
|
end
|
1123
1359
|
```
|
1124
1360
|
|
1125
1361
|
|
1126
|
-
###
|
1362
|
+
### be_attached_to
|
1127
1363
|
|
1128
1364
|
```ruby
|
1129
|
-
describe
|
1130
|
-
it { should
|
1365
|
+
describe internet_gateway('igw-1ab2cd3e') do
|
1366
|
+
it { should be_attached_to('vpc-ab123cde') }
|
1367
|
+
end
|
1368
|
+
|
1369
|
+
describe internet_gateway('igw-1ab2cd3e') do
|
1370
|
+
it { should be_attached_to('my-vpc') }
|
1131
1371
|
end
|
1132
1372
|
```
|
1133
1373
|
|
1134
1374
|
|
1135
|
-
###
|
1375
|
+
### have_tag
|
1136
1376
|
|
1137
1377
|
```ruby
|
1138
|
-
describe
|
1139
|
-
it { should
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1378
|
+
describe internet_gateway('igw-1ab2cd3e') do
|
1379
|
+
it { should have_tag('Name').value('my-internet-gateway') }
|
1380
|
+
end
|
1381
|
+
```
|
1382
|
+
|
1383
|
+
### its(:internet_gateway_id)
|
1384
|
+
## <a name="kms">kms</a>
|
1385
|
+
|
1386
|
+
Kms resource type.
|
1387
|
+
|
1388
|
+
### exist
|
1389
|
+
|
1390
|
+
```ruby
|
1391
|
+
describe kms('my-kms-key') do
|
1392
|
+
it { should exist }
|
1393
|
+
end
|
1394
|
+
```
|
1395
|
+
|
1396
|
+
|
1397
|
+
### be_enabled
|
1398
|
+
|
1399
|
+
```ruby
|
1400
|
+
describe kms('my-kms-key') do
|
1401
|
+
it { should be_enabled }
|
1402
|
+
end
|
1403
|
+
```
|
1404
|
+
|
1405
|
+
|
1406
|
+
### have_key_policy
|
1407
|
+
|
1408
|
+
```ruby
|
1409
|
+
describe kms('my-kms-key') do
|
1410
|
+
it { should exist }
|
1411
|
+
it { should be_enabled }
|
1412
|
+
it do
|
1413
|
+
should have_key_policy('default').policy_document(<<-'DOC')
|
1143
1414
|
{
|
1144
1415
|
"Version" : "2012-10-17",
|
1145
1416
|
"Id" : "key-consolepolicy-2",
|
@@ -2009,100 +2280,14 @@ describe vpc('my-vpc') do
|
|
2009
2280
|
end
|
2010
2281
|
```
|
2011
2282
|
|
2012
|
-
## <a name="
|
2013
|
-
|
2014
|
-
CloudfrontDistribution resource type.
|
2015
|
-
|
2016
|
-
### exist
|
2017
|
-
|
2018
|
-
```ruby
|
2019
|
-
describe cloudfront_distribution('123456789zyxw.cloudfront.net') do
|
2020
|
-
it { should exist }
|
2021
|
-
end
|
2022
|
-
```
|
2023
|
-
|
2024
|
-
|
2025
|
-
### be_in_progress, be_deployed
|
2026
|
-
|
2027
|
-
```ruby
|
2028
|
-
describe cloudfront_distribution('123456789zyxw.cloudfront.net') do
|
2029
|
-
it { should be_deployed }
|
2030
|
-
end
|
2031
|
-
```
|
2032
|
-
|
2033
|
-
|
2034
|
-
### have_origin
|
2035
|
-
|
2036
|
-
```ruby
|
2037
|
-
describe cloudfront_distribution('E2CLOUDFRONTXX') do
|
2038
|
-
it do
|
2039
|
-
should have_origin('cf-s3-origin-hosting.dev.example.com')
|
2040
|
-
.domain_name('cf-s3-origin-hosting.dev.example.com.s3.amazonaws.com')
|
2041
|
-
.origin_path('/img')
|
2042
|
-
.origin_access_identity('origin-access-identity/cloudfront/E2VVVVVVVVVVVV')
|
2043
|
-
end
|
2044
|
-
end
|
2045
|
-
```
|
2046
|
-
|
2047
|
-
|
2048
|
-
### have_origin_domain_name
|
2049
|
-
|
2050
|
-
```ruby
|
2051
|
-
describe cloudfront_distribution('123456789zyxw.cloudfront.net') do
|
2052
|
-
it { should have_origin_domain_name('cf-s3-origin-hosting.dev.example.com.s3.amazonaws.com') }
|
2053
|
-
end
|
2054
|
-
```
|
2055
|
-
|
2056
|
-
|
2057
|
-
### have_origin_domain_name_and_path
|
2058
|
-
|
2059
|
-
```ruby
|
2060
|
-
describe cloudfront_distribution('123456789zyxw.cloudfront.net') do
|
2061
|
-
it { should have_origin_domain_name_and_path('cf-s3-origin-hosting.dev.example.com.s3.amazonaws.com/img') }
|
2062
|
-
end
|
2063
|
-
```
|
2064
|
-
|
2065
|
-
### its(:id), its(:arn), its(:status), its(:last_modified_time), its(:domain_name), its(:comment), its(:price_class), its(:enabled), its(:web_acl_id), its(:http_version), its(:is_ipv6_enabled)
|
2066
|
-
## <a name="elastictranscoder_pipeline">elastictranscoder_pipeline</a>
|
2067
|
-
|
2068
|
-
ElastictranscoderPipeline resource type.
|
2069
|
-
|
2070
|
-
### exist
|
2071
|
-
|
2072
|
-
### be_active, be_paused
|
2073
|
-
|
2074
|
-
```ruby
|
2075
|
-
describe elastictranscoder_pipeline('my-elastictranscoder-pipeline') do
|
2076
|
-
it { should be_active }
|
2077
|
-
end
|
2078
|
-
```
|
2079
|
-
|
2080
|
-
|
2081
|
-
## <a name="waf_web_acl">waf_web_acl</a>
|
2082
|
-
|
2083
|
-
WafWebAcl resource type.
|
2084
|
-
|
2085
|
-
### exist
|
2086
|
-
|
2087
|
-
### have_rule
|
2088
|
-
|
2089
|
-
```ruby
|
2090
|
-
describe waf_web_acl('my-waf-web-acl') do
|
2091
|
-
it { should have_rule('my-waf-web-acl-allowed-ips') }
|
2092
|
-
it { should have_rule('my-waf-web-acl-allowed-ips').order(2).action('BLOCK') }
|
2093
|
-
end
|
2094
|
-
```
|
2095
|
-
|
2096
|
-
|
2097
|
-
### its(:default_action), its(:web_acl_id), its(:name), its(:metric_name)
|
2098
|
-
## <a name="customer_gateway">customer_gateway</a>
|
2283
|
+
## <a name="vpn_connection">vpn_connection</a>
|
2099
2284
|
|
2100
|
-
|
2285
|
+
VpnConnection resource type.
|
2101
2286
|
|
2102
2287
|
### exist
|
2103
2288
|
|
2104
2289
|
```ruby
|
2105
|
-
describe
|
2290
|
+
describe vpn_connection('my-vpn-connection') do
|
2106
2291
|
it { should exist }
|
2107
2292
|
end
|
2108
2293
|
```
|
@@ -2111,7 +2296,7 @@ end
|
|
2111
2296
|
### be_pending, be_available, be_deleting, be_deleted
|
2112
2297
|
|
2113
2298
|
```ruby
|
2114
|
-
describe
|
2299
|
+
describe vpn_connection('my-vpn-connection') do
|
2115
2300
|
it { should be_running }
|
2116
2301
|
end
|
2117
2302
|
```
|
@@ -2120,13 +2305,13 @@ end
|
|
2120
2305
|
### have_tag
|
2121
2306
|
|
2122
2307
|
```ruby
|
2123
|
-
describe
|
2124
|
-
it { should have_tag('Name').value('my-
|
2308
|
+
describe vpn_connection('my-vpn-connection') do
|
2309
|
+
it { should have_tag('Name').value('my-vpn-connection') }
|
2125
2310
|
end
|
2126
2311
|
```
|
2127
2312
|
|
2128
2313
|
|
2129
|
-
### its(:
|
2314
|
+
### its(:vpn_connection_id), its(:state), its(:customer_gateway_configuration), its(:type), its(:customer_gateway_id), its(:vpn_gateway_id), its(:tags), its(:vgw_telemetry), its(:options), its(:routes)
|
2130
2315
|
## <a name="vpn_gateway">vpn_gateway</a>
|
2131
2316
|
|
2132
2317
|
VpnGateway resource type.
|
@@ -2159,197 +2344,23 @@ end
|
|
2159
2344
|
|
2160
2345
|
|
2161
2346
|
### its(:vpn_gateway_id), its(:state), its(:type), its(:availability_zone), its(:vpc_attachments), its(:tags)
|
2162
|
-
## <a name="
|
2163
|
-
|
2164
|
-
VpnConnection resource type.
|
2165
|
-
|
2166
|
-
### exist
|
2167
|
-
|
2168
|
-
```ruby
|
2169
|
-
describe vpn_connection('my-vpn-connection') do
|
2170
|
-
it { should exist }
|
2171
|
-
end
|
2172
|
-
```
|
2173
|
-
|
2174
|
-
|
2175
|
-
### be_pending, be_available, be_deleting, be_deleted
|
2176
|
-
|
2177
|
-
```ruby
|
2178
|
-
describe vpn_connection('my-vpn-connection') do
|
2179
|
-
it { should be_running }
|
2180
|
-
end
|
2181
|
-
```
|
2182
|
-
|
2183
|
-
|
2184
|
-
### have_tag
|
2185
|
-
|
2186
|
-
```ruby
|
2187
|
-
describe vpn_connection('my-vpn-connection') do
|
2188
|
-
it { should have_tag('Name').value('my-vpn-connection') }
|
2189
|
-
end
|
2190
|
-
```
|
2191
|
-
|
2192
|
-
|
2193
|
-
### its(:vpn_connection_id), its(:state), its(:customer_gateway_configuration), its(:type), its(:customer_gateway_id), its(:vpn_gateway_id), its(:tags), its(:vgw_telemetry), its(:options), its(:routes)
|
2194
|
-
## <a name="internet_gateway">internet_gateway</a>
|
2195
|
-
|
2196
|
-
InternetGateway resource type.
|
2197
|
-
|
2198
|
-
### exist
|
2199
|
-
|
2200
|
-
```ruby
|
2201
|
-
describe internet_gateway('igw-1ab2cd3e') do
|
2202
|
-
it { should exist }
|
2203
|
-
end
|
2204
|
-
|
2205
|
-
describe internet_gateway('my-internet-gateway') do
|
2206
|
-
it { should exist }
|
2207
|
-
end
|
2208
|
-
```
|
2209
|
-
|
2210
|
-
|
2211
|
-
### be_attached_to
|
2212
|
-
|
2213
|
-
```ruby
|
2214
|
-
describe internet_gateway('igw-1ab2cd3e') do
|
2215
|
-
it { should be_attached_to('vpc-ab123cde') }
|
2216
|
-
end
|
2217
|
-
|
2218
|
-
describe internet_gateway('igw-1ab2cd3e') do
|
2219
|
-
it { should be_attached_to('my-vpc') }
|
2220
|
-
end
|
2221
|
-
```
|
2222
|
-
|
2223
|
-
|
2224
|
-
### have_tag
|
2225
|
-
|
2226
|
-
```ruby
|
2227
|
-
describe internet_gateway('igw-1ab2cd3e') do
|
2228
|
-
it { should have_tag('Name').value('my-internet-gateway') }
|
2229
|
-
end
|
2230
|
-
```
|
2231
|
-
|
2232
|
-
### its(:internet_gateway_id)
|
2233
|
-
## <a name="acm">acm</a>
|
2234
|
-
|
2235
|
-
Acm resource type.
|
2236
|
-
|
2237
|
-
### exist
|
2238
|
-
|
2239
|
-
```ruby
|
2240
|
-
describe acm('example.com') do
|
2241
|
-
it { should exist }
|
2242
|
-
end
|
2243
|
-
```
|
2244
|
-
|
2245
|
-
|
2246
|
-
### be_pending_validation, be_issued, be_inactive, be_expired, be_validation_timed_out, be_revoked, be_failed
|
2247
|
-
|
2248
|
-
### its(:certificate_arn), its(:domain_name), its(:subject_alternative_names), its(:domain_validation_options), its(:serial), its(:subject), its(:issuer), its(:created_at), its(:issued_at), its(:imported_at), its(:status), its(:revoked_at), its(:revocation_reason), its(:not_before), its(:not_after), its(:key_algorithm), its(:signature_algorithm), its(:in_use_by), its(:failure_reason), its(:type), its(:renewal_summary)
|
2249
|
-
## <a name="cloudwatch_logs">cloudwatch_logs</a>
|
2250
|
-
|
2251
|
-
CloudwatchLogs resource type.
|
2252
|
-
|
2253
|
-
### exist
|
2254
|
-
|
2255
|
-
```ruby
|
2256
|
-
describe cloudwatch_logs('my-cloudwatch-logs-group') do
|
2257
|
-
it { should exist }
|
2258
|
-
end
|
2259
|
-
```
|
2260
|
-
|
2261
|
-
|
2262
|
-
### have_log_stream
|
2263
|
-
|
2264
|
-
```ruby
|
2265
|
-
describe cloudwatch_logs('my-cloudwatch-logs-group') do
|
2266
|
-
it { should have_log_stream('my-cloudwatch-logs-stream') }
|
2267
|
-
end
|
2268
|
-
```
|
2269
|
-
|
2270
|
-
|
2271
|
-
### have_metric_filter
|
2272
|
-
|
2273
|
-
```ruby
|
2274
|
-
describe cloudwatch_logs('my-cloudwatch-logs-group') do
|
2275
|
-
it { should have_metric_filter('my-cloudwatch-logs-metric-filter') }
|
2276
|
-
end
|
2277
|
-
```
|
2278
|
-
|
2279
|
-
|
2280
|
-
### have_subscription_filter
|
2281
|
-
|
2282
|
-
```ruby
|
2283
|
-
describe cloudwatch_logs('my-cloudwatch-logs-group') do
|
2284
|
-
it { should have_subscription_filter('my-cloudwatch-logs-subscription-filter') }
|
2285
|
-
end
|
2286
|
-
```
|
2287
|
-
or
|
2288
|
-
```ruby
|
2289
|
-
describe cloudwatch_logs('my-cloudwatch-logs-group') do
|
2290
|
-
it do
|
2291
|
-
should have_subscription_filter('my-cloudwatch-logs-subscription-filter')\
|
2292
|
-
.filter_pattern('[host, ident, authuser, date, request, status, bytes]')
|
2293
|
-
end
|
2294
|
-
end
|
2295
|
-
```
|
2296
|
-
|
2297
|
-
### its(:log_group_name), its(:creation_time), its(:retention_in_days), its(:metric_filter_count), its(:arn), its(:stored_bytes)
|
2298
|
-
## <a name="dynamodb_table">dynamodb_table</a>
|
2347
|
+
## <a name="waf_web_acl">waf_web_acl</a>
|
2299
2348
|
|
2300
|
-
|
2349
|
+
WafWebAcl resource type.
|
2301
2350
|
|
2302
2351
|
### exist
|
2303
2352
|
|
2304
|
-
|
2305
|
-
describe dynamodb_table('my-dynamodb-table') do
|
2306
|
-
it { should exist }
|
2307
|
-
end
|
2308
|
-
```
|
2309
|
-
|
2310
|
-
|
2311
|
-
### be_creating, be_updating, be_deleting, be_active
|
2312
|
-
|
2313
|
-
### have_attribute_definition
|
2314
|
-
|
2315
|
-
```ruby
|
2316
|
-
describe dynamodb_table('my-dynamodb-table') do
|
2317
|
-
it { should have_attribute_definition('my-dynamodb-table-attaribute1').attribute_type('S') }
|
2318
|
-
it { should have_attribute_definition('my-dynamodb-table-attaribute2').attribute_type('N') }
|
2319
|
-
end
|
2320
|
-
```
|
2321
|
-
|
2322
|
-
|
2323
|
-
### have_key_schema
|
2324
|
-
|
2325
|
-
```ruby
|
2326
|
-
describe dynamodb_table('my-dynamodb-table') do
|
2327
|
-
it { should have_key_schema('my-dynamodb-table-key_schema1').key_type('HASH') }
|
2328
|
-
it { should have_key_schema('my-dynamodb-table-key_schema2').key_type('RANGE') }
|
2329
|
-
end
|
2330
|
-
```
|
2331
|
-
|
2332
|
-
|
2333
|
-
### its(:table_name), its(:table_status), its(:creation_date_time), its(:table_size_bytes), its(:item_count), its(:table_arn), its(:local_secondary_indexes), its(:global_secondary_indexes), its(:stream_specification), its(:latest_stream_label), its(:latest_stream_arn)
|
2334
|
-
### :unlock: Advanced use
|
2335
|
-
|
2336
|
-
`dynamodb_table` can use `Aws::DynamoDB::Table` resource (see http://docs.aws.amazon.com/sdkforruby/api/Aws/DynamoDB/Table.html).
|
2337
|
-
|
2338
|
-
```ruby
|
2339
|
-
describe dynamodb_table('my-dynamodb-table') do
|
2340
|
-
its('key_schema.first.key_type') { should eq 'HASH' }
|
2341
|
-
end
|
2342
|
-
```
|
2343
|
-
|
2344
|
-
or
|
2353
|
+
### have_rule
|
2345
2354
|
|
2346
2355
|
```ruby
|
2347
|
-
describe
|
2348
|
-
|
2356
|
+
describe waf_web_acl('my-waf-web-acl') do
|
2357
|
+
it { should have_rule('my-waf-web-acl-allowed-ips') }
|
2358
|
+
it { should have_rule('my-waf-web-acl-allowed-ips').order(2).action('BLOCK') }
|
2349
2359
|
end
|
2350
2360
|
```
|
2351
2361
|
|
2352
2362
|
|
2363
|
+
### its(:default_action), its(:web_acl_id), its(:name), its(:metric_name)
|
2353
2364
|
# Account and Attributes
|
2354
2365
|
|
2355
2366
|
## <a name="account">account</a>
|
@@ -72,6 +72,20 @@ Aws.config[:ec2] = {
|
|
72
72
|
]
|
73
73
|
}
|
74
74
|
]
|
75
|
+
},
|
76
|
+
describe_security_groups: {
|
77
|
+
security_groups: [
|
78
|
+
{
|
79
|
+
group_id: 'sg-da1bc2ef',
|
80
|
+
group_name: 'group-name-sg',
|
81
|
+
tags: [
|
82
|
+
{
|
83
|
+
key: 'Name',
|
84
|
+
value: 'my-cache-sg'
|
85
|
+
}
|
86
|
+
]
|
87
|
+
}
|
88
|
+
]
|
75
89
|
}
|
76
90
|
}
|
77
91
|
}
|
@@ -30,9 +30,39 @@ module Awspec::Type
|
|
30
30
|
resource_via_client.cache_parameter_group.cache_parameter_group_name == group_name
|
31
31
|
end
|
32
32
|
|
33
|
+
def has_security_group?(sg_id)
|
34
|
+
return true if has_vpc_security_group_id?(sg_id)
|
35
|
+
return true if has_vpc_security_group_name?(sg_id)
|
36
|
+
return true if has_vpc_security_group_tag_name?(sg_id)
|
37
|
+
end
|
38
|
+
|
33
39
|
def vpc_id
|
34
40
|
cache_subnet_group = find_cache_subnet_group(resource_via_client.cache_subnet_group_name)
|
35
41
|
cache_subnet_group.vpc_id if cache_subnet_group
|
36
42
|
end
|
43
|
+
|
44
|
+
private
|
45
|
+
|
46
|
+
def has_vpc_security_group_id?(sg_id)
|
47
|
+
resource_security_group_ids.include?(sg_id)
|
48
|
+
end
|
49
|
+
|
50
|
+
def has_vpc_security_group_name?(sg_id)
|
51
|
+
res = select_security_group_by_group_name([sg_id])
|
52
|
+
|
53
|
+
return false unless res.count == 1
|
54
|
+
has_vpc_security_group_id?(res.first.group_id)
|
55
|
+
end
|
56
|
+
|
57
|
+
def has_vpc_security_group_tag_name?(sg_id)
|
58
|
+
res = select_security_group_by_tag_name([sg_id])
|
59
|
+
|
60
|
+
return false unless res.count == 1
|
61
|
+
has_vpc_security_group_id?(res.first.group_id)
|
62
|
+
end
|
63
|
+
|
64
|
+
def resource_security_group_ids
|
65
|
+
resource_via_client.security_groups.map(&:security_group_id)
|
66
|
+
end
|
37
67
|
end
|
38
68
|
end
|
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.
|
4
|
+
version: 0.73.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- k1LoW
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|