train-aws 0.1.11 → 0.1.17

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
  SHA256:
3
- metadata.gz: 6d2eedb07a382f6f5d0cae903e265844b5a8023d4f707a6960aeba9e0957c430
4
- data.tar.gz: 700b012c62061f357d18e51b57d2ac2abba6dbf4b3f27c3870d8a74144e7c108
3
+ metadata.gz: 6ef3cd745db76d2e06826320755bd9cf50febdf9eac451f55489f238d8bc5cf9
4
+ data.tar.gz: c3ea691eb9bdbac39c0064bc4f041d47de545d81a1b330146cdbf935c8bd5140
5
5
  SHA512:
6
- metadata.gz: 6128d376a815570d4317f866d220dac7722cbf90635f42622b9a3882cdd8259918e4a846d160dd0d7e3c232dfe42a7558e57bca3ab88fd012a2aeade8f443df4
7
- data.tar.gz: 23a5577ad1573158eedfba73a3c65169dcfaf67ead3b036b02a9328ff0eb92fdc9271ca1a20c8e570d96d89738b1a9c4d972392699451304c22849941a09820d
6
+ metadata.gz: c61401fc16d37044b8b2e31a8d4a0aca594e93f27a3b583571f3e1bdbc3d7c3885d5b88d997a37f37f65c4ee21ccc663352f0b977b17c1a4471423cb9e434ad1
7
+ data.tar.gz: 3af2d13f7506ba2724c8de2828910c871a36e63a3bb871f7e57d00d80735e27f54825a7c8ba4e29ebeeeefc5b08453dfc76ff08098ebbc62dcef6c9a39663706
data/LICENSE ADDED
@@ -0,0 +1,13 @@
1
+ Copyright (c) 2018 Chef Software Inc.
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
@@ -12,10 +12,10 @@ libdir = File.dirname(__FILE__)
12
12
  $LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
13
13
 
14
14
  # It's traditonal to keep your gem version in a separate file, so CI can find it easier.
15
- require "train-aws/version"
15
+ require_relative "train-aws/version"
16
16
 
17
17
  # A train plugin has three components: Transport, Connection, and Platform.
18
18
  # Transport acts as the glue.
19
- require "train-aws/transport"
20
- require "train-aws/platform"
21
- require "train-aws/connection"
19
+ require_relative "train-aws/transport"
20
+ require_relative "train-aws/platform"
21
+ require_relative "train-aws/connection"
@@ -14,7 +14,7 @@
14
14
 
15
15
  # Push platform detection out to a mixin, as it tends
16
16
  # to develop at a different cadence than the rest
17
- require "train-aws/platform"
17
+ require_relative "platform"
18
18
  require "train"
19
19
  require "train/plugins"
20
20
 
@@ -76,6 +76,7 @@ module TrainPlugins
76
76
  # We support caching on the aws_client call, but not the aws_resource call
77
77
  def aws_client(klass)
78
78
  return klass.new unless cache_enabled?(:api_call)
79
+
79
80
  @cache[:api_call][klass.to_s.to_sym] ||= klass.new
80
81
  end
81
82
 
@@ -1,4 +1,4 @@
1
- require "train-aws/version"
1
+ require_relative "version"
2
2
 
3
3
  # Platform definition file. This is a good place to separate out any
4
4
  # logic regarding the identification of the OS or API at the far end
@@ -6,7 +6,7 @@ require "aws-sdk-core"
6
6
  # Train Plugins v1 are usually declared under the TrainPlugins namespace.
7
7
  # Each plugin has three components: Transport, Connection, and Platform.
8
8
  # We'll only define the Transport here, but we'll refer to the others.
9
- require "train-aws/connection"
9
+ require_relative "connection"
10
10
 
11
11
  module TrainPlugins
12
12
  module Aws
@@ -5,6 +5,6 @@
5
5
 
6
6
  module TrainPlugins
7
7
  module Aws
8
- VERSION = "0.1.11".freeze
8
+ VERSION = "0.1.17".freeze
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: train-aws
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.11
4
+ version: 0.1.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chef InSpec Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-15 00:00:00.000000000 Z
11
+ date: 2020-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-apigateway
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1'
19
+ version: '1.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1'
26
+ version: '1.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: aws-sdk-apigatewayv2
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1'
33
+ version: '1.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1'
40
+ version: '1.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: aws-sdk-athena
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1'
47
+ version: '1.0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '1'
54
+ version: '1.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: aws-sdk-autoscaling
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -72,56 +72,70 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '1'
75
+ version: '1.0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '1'
82
+ version: '1.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: aws-sdk-cloudformation
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '1'
89
+ version: '1.0'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '1'
96
+ version: '1.0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: aws-sdk-cloudfront
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '1.0'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '1.0'
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: aws-sdk-cloudhsm
99
113
  requirement: !ruby/object:Gem::Requirement
100
114
  requirements:
101
115
  - - "~>"
102
116
  - !ruby/object:Gem::Version
103
- version: '1'
117
+ version: '1.0'
104
118
  type: :runtime
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
107
121
  requirements:
108
122
  - - "~>"
109
123
  - !ruby/object:Gem::Version
110
- version: '1'
124
+ version: '1.0'
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: aws-sdk-cloudhsmv2
113
127
  requirement: !ruby/object:Gem::Requirement
114
128
  requirements:
115
129
  - - "~>"
116
130
  - !ruby/object:Gem::Version
117
- version: '1'
131
+ version: '1.0'
118
132
  type: :runtime
119
133
  prerelease: false
120
134
  version_requirements: !ruby/object:Gem::Requirement
121
135
  requirements:
122
136
  - - "~>"
123
137
  - !ruby/object:Gem::Version
124
- version: '1'
138
+ version: '1.0'
125
139
  - !ruby/object:Gem::Dependency
126
140
  name: aws-sdk-cloudtrail
127
141
  requirement: !ruby/object:Gem::Requirement
@@ -170,42 +184,42 @@ dependencies:
170
184
  requirements:
171
185
  - - "~>"
172
186
  - !ruby/object:Gem::Version
173
- version: '1'
187
+ version: '1.0'
174
188
  type: :runtime
175
189
  prerelease: false
176
190
  version_requirements: !ruby/object:Gem::Requirement
177
191
  requirements:
178
192
  - - "~>"
179
193
  - !ruby/object:Gem::Version
180
- version: '1'
194
+ version: '1.0'
181
195
  - !ruby/object:Gem::Dependency
182
196
  name: aws-sdk-codedeploy
183
197
  requirement: !ruby/object:Gem::Requirement
184
198
  requirements:
185
199
  - - "~>"
186
200
  - !ruby/object:Gem::Version
187
- version: '1'
201
+ version: '1.0'
188
202
  type: :runtime
189
203
  prerelease: false
190
204
  version_requirements: !ruby/object:Gem::Requirement
191
205
  requirements:
192
206
  - - "~>"
193
207
  - !ruby/object:Gem::Version
194
- version: '1'
208
+ version: '1.0'
195
209
  - !ruby/object:Gem::Dependency
196
210
  name: aws-sdk-codepipeline
197
211
  requirement: !ruby/object:Gem::Requirement
198
212
  requirements:
199
213
  - - "~>"
200
214
  - !ruby/object:Gem::Version
201
- version: '1'
215
+ version: '1.0'
202
216
  type: :runtime
203
217
  prerelease: false
204
218
  version_requirements: !ruby/object:Gem::Requirement
205
219
  requirements:
206
220
  - - "~>"
207
221
  - !ruby/object:Gem::Version
208
- version: '1'
222
+ version: '1.0'
209
223
  - !ruby/object:Gem::Dependency
210
224
  name: aws-sdk-configservice
211
225
  requirement: !ruby/object:Gem::Requirement
@@ -304,6 +318,20 @@ dependencies:
304
318
  - - "~>"
305
319
  - !ruby/object:Gem::Version
306
320
  version: '1.30'
321
+ - !ruby/object:Gem::Dependency
322
+ name: aws-sdk-efs
323
+ requirement: !ruby/object:Gem::Requirement
324
+ requirements:
325
+ - - "~>"
326
+ - !ruby/object:Gem::Version
327
+ version: '1.0'
328
+ type: :runtime
329
+ prerelease: false
330
+ version_requirements: !ruby/object:Gem::Requirement
331
+ requirements:
332
+ - - "~>"
333
+ - !ruby/object:Gem::Version
334
+ version: '1.0'
307
335
  - !ruby/object:Gem::Dependency
308
336
  name: aws-sdk-eks
309
337
  requirement: !ruby/object:Gem::Requirement
@@ -324,28 +352,28 @@ dependencies:
324
352
  requirements:
325
353
  - - "~>"
326
354
  - !ruby/object:Gem::Version
327
- version: '1'
355
+ version: '1.0'
328
356
  type: :runtime
329
357
  prerelease: false
330
358
  version_requirements: !ruby/object:Gem::Requirement
331
359
  requirements:
332
360
  - - "~>"
333
361
  - !ruby/object:Gem::Version
334
- version: '1'
362
+ version: '1.0'
335
363
  - !ruby/object:Gem::Dependency
336
364
  name: aws-sdk-elasticbeanstalk
337
365
  requirement: !ruby/object:Gem::Requirement
338
366
  requirements:
339
367
  - - "~>"
340
368
  - !ruby/object:Gem::Version
341
- version: '1'
369
+ version: '1.0'
342
370
  type: :runtime
343
371
  prerelease: false
344
372
  version_requirements: !ruby/object:Gem::Requirement
345
373
  requirements:
346
374
  - - "~>"
347
375
  - !ruby/object:Gem::Version
348
- version: '1'
376
+ version: '1.0'
349
377
  - !ruby/object:Gem::Dependency
350
378
  name: aws-sdk-elasticloadbalancing
351
379
  requirement: !ruby/object:Gem::Requirement
@@ -366,42 +394,42 @@ dependencies:
366
394
  requirements:
367
395
  - - "~>"
368
396
  - !ruby/object:Gem::Version
369
- version: '1'
397
+ version: '1.0'
370
398
  type: :runtime
371
399
  prerelease: false
372
400
  version_requirements: !ruby/object:Gem::Requirement
373
401
  requirements:
374
402
  - - "~>"
375
403
  - !ruby/object:Gem::Version
376
- version: '1'
404
+ version: '1.0'
377
405
  - !ruby/object:Gem::Dependency
378
406
  name: aws-sdk-elasticsearchservice
379
407
  requirement: !ruby/object:Gem::Requirement
380
408
  requirements:
381
409
  - - "~>"
382
410
  - !ruby/object:Gem::Version
383
- version: '1'
411
+ version: '1.0'
384
412
  type: :runtime
385
413
  prerelease: false
386
414
  version_requirements: !ruby/object:Gem::Requirement
387
415
  requirements:
388
416
  - - "~>"
389
417
  - !ruby/object:Gem::Version
390
- version: '1'
418
+ version: '1.0'
391
419
  - !ruby/object:Gem::Dependency
392
420
  name: aws-sdk-firehose
393
421
  requirement: !ruby/object:Gem::Requirement
394
422
  requirements:
395
423
  - - "~>"
396
424
  - !ruby/object:Gem::Version
397
- version: '1'
425
+ version: '1.0'
398
426
  type: :runtime
399
427
  prerelease: false
400
428
  version_requirements: !ruby/object:Gem::Requirement
401
429
  requirements:
402
430
  - - "~>"
403
431
  - !ruby/object:Gem::Version
404
- version: '1'
432
+ version: '1.0'
405
433
  - !ruby/object:Gem::Dependency
406
434
  name: aws-sdk-iam
407
435
  requirement: !ruby/object:Gem::Requirement
@@ -422,28 +450,28 @@ dependencies:
422
450
  requirements:
423
451
  - - "~>"
424
452
  - !ruby/object:Gem::Version
425
- version: '1'
453
+ version: '1.0'
426
454
  type: :runtime
427
455
  prerelease: false
428
456
  version_requirements: !ruby/object:Gem::Requirement
429
457
  requirements:
430
458
  - - "~>"
431
459
  - !ruby/object:Gem::Version
432
- version: '1'
460
+ version: '1.0'
433
461
  - !ruby/object:Gem::Dependency
434
462
  name: aws-sdk-kinesis
435
463
  requirement: !ruby/object:Gem::Requirement
436
464
  requirements:
437
465
  - - "~>"
438
466
  - !ruby/object:Gem::Version
439
- version: '1'
467
+ version: '1.0'
440
468
  type: :runtime
441
469
  prerelease: false
442
470
  version_requirements: !ruby/object:Gem::Requirement
443
471
  requirements:
444
472
  - - "~>"
445
473
  - !ruby/object:Gem::Version
446
- version: '1'
474
+ version: '1.0'
447
475
  - !ruby/object:Gem::Dependency
448
476
  name: aws-sdk-kms
449
477
  requirement: !ruby/object:Gem::Requirement
@@ -464,14 +492,14 @@ dependencies:
464
492
  requirements:
465
493
  - - "~>"
466
494
  - !ruby/object:Gem::Version
467
- version: '1'
495
+ version: '1.0'
468
496
  type: :runtime
469
497
  prerelease: false
470
498
  version_requirements: !ruby/object:Gem::Requirement
471
499
  requirements:
472
500
  - - "~>"
473
501
  - !ruby/object:Gem::Version
474
- version: '1'
502
+ version: '1.0'
475
503
  - !ruby/object:Gem::Dependency
476
504
  name: aws-sdk-organizations
477
505
  requirement: !ruby/object:Gem::Requirement
@@ -506,56 +534,56 @@ dependencies:
506
534
  requirements:
507
535
  - - "~>"
508
536
  - !ruby/object:Gem::Version
509
- version: '1'
537
+ version: '1.0'
510
538
  type: :runtime
511
539
  prerelease: false
512
540
  version_requirements: !ruby/object:Gem::Requirement
513
541
  requirements:
514
542
  - - "~>"
515
543
  - !ruby/object:Gem::Version
516
- version: '1'
544
+ version: '1.0'
517
545
  - !ruby/object:Gem::Dependency
518
546
  name: aws-sdk-route53
519
547
  requirement: !ruby/object:Gem::Requirement
520
548
  requirements:
521
549
  - - "~>"
522
550
  - !ruby/object:Gem::Version
523
- version: '1'
551
+ version: '1.0'
524
552
  type: :runtime
525
553
  prerelease: false
526
554
  version_requirements: !ruby/object:Gem::Requirement
527
555
  requirements:
528
556
  - - "~>"
529
557
  - !ruby/object:Gem::Version
530
- version: '1'
558
+ version: '1.0'
531
559
  - !ruby/object:Gem::Dependency
532
560
  name: aws-sdk-route53domains
533
561
  requirement: !ruby/object:Gem::Requirement
534
562
  requirements:
535
563
  - - "~>"
536
564
  - !ruby/object:Gem::Version
537
- version: '1'
565
+ version: '1.0'
538
566
  type: :runtime
539
567
  prerelease: false
540
568
  version_requirements: !ruby/object:Gem::Requirement
541
569
  requirements:
542
570
  - - "~>"
543
571
  - !ruby/object:Gem::Version
544
- version: '1'
572
+ version: '1.0'
545
573
  - !ruby/object:Gem::Dependency
546
574
  name: aws-sdk-route53resolver
547
575
  requirement: !ruby/object:Gem::Requirement
548
576
  requirements:
549
577
  - - "~>"
550
578
  - !ruby/object:Gem::Version
551
- version: '1'
579
+ version: '1.0'
552
580
  type: :runtime
553
581
  prerelease: false
554
582
  version_requirements: !ruby/object:Gem::Requirement
555
583
  requirements:
556
584
  - - "~>"
557
585
  - !ruby/object:Gem::Version
558
- version: '1'
586
+ version: '1.0'
559
587
  - !ruby/object:Gem::Dependency
560
588
  name: aws-sdk-s3
561
589
  requirement: !ruby/object:Gem::Requirement
@@ -576,42 +604,42 @@ dependencies:
576
604
  requirements:
577
605
  - - "~>"
578
606
  - !ruby/object:Gem::Version
579
- version: '1'
607
+ version: '1.0'
580
608
  type: :runtime
581
609
  prerelease: false
582
610
  version_requirements: !ruby/object:Gem::Requirement
583
611
  requirements:
584
612
  - - "~>"
585
613
  - !ruby/object:Gem::Version
586
- version: '1'
614
+ version: '1.0'
587
615
  - !ruby/object:Gem::Dependency
588
616
  name: aws-sdk-ses
589
617
  requirement: !ruby/object:Gem::Requirement
590
618
  requirements:
591
619
  - - "~>"
592
620
  - !ruby/object:Gem::Version
593
- version: '1'
621
+ version: '1.0'
594
622
  type: :runtime
595
623
  prerelease: false
596
624
  version_requirements: !ruby/object:Gem::Requirement
597
625
  requirements:
598
626
  - - "~>"
599
627
  - !ruby/object:Gem::Version
600
- version: '1'
628
+ version: '1.0'
601
629
  - !ruby/object:Gem::Dependency
602
630
  name: aws-sdk-sms
603
631
  requirement: !ruby/object:Gem::Requirement
604
632
  requirements:
605
633
  - - "~>"
606
634
  - !ruby/object:Gem::Version
607
- version: '1'
635
+ version: '1.0'
608
636
  type: :runtime
609
637
  prerelease: false
610
638
  version_requirements: !ruby/object:Gem::Requirement
611
639
  requirements:
612
640
  - - "~>"
613
641
  - !ruby/object:Gem::Version
614
- version: '1'
642
+ version: '1.0'
615
643
  - !ruby/object:Gem::Dependency
616
644
  name: aws-sdk-sns
617
645
  requirement: !ruby/object:Gem::Requirement
@@ -646,15 +674,15 @@ dependencies:
646
674
  requirements:
647
675
  - - "~>"
648
676
  - !ruby/object:Gem::Version
649
- version: '1'
677
+ version: '1.0'
650
678
  type: :runtime
651
679
  prerelease: false
652
680
  version_requirements: !ruby/object:Gem::Requirement
653
681
  requirements:
654
682
  - - "~>"
655
683
  - !ruby/object:Gem::Version
656
- version: '1'
657
- description: Allows applictaions using Train to speak to AWS; handles authentication,
684
+ version: '1.0'
685
+ description: Allows applications using Train to speak to AWS; handles authentication,
658
686
  cacheing, and SDK dependency management.
659
687
  email:
660
688
  - inspec@chef.io
@@ -662,14 +690,12 @@ executables: []
662
690
  extensions: []
663
691
  extra_rdoc_files: []
664
692
  files:
665
- - Gemfile
666
- - README.md
693
+ - LICENSE
667
694
  - lib/train-aws.rb
668
695
  - lib/train-aws/connection.rb
669
696
  - lib/train-aws/platform.rb
670
697
  - lib/train-aws/transport.rb
671
698
  - lib/train-aws/version.rb
672
- - train-aws.gemspec
673
699
  homepage: https://github.com/inspec/train-aws
674
700
  licenses:
675
701
  - Apache-2.0
data/Gemfile DELETED
@@ -1,16 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem "train-core", "~> 3.0"
6
-
7
- group :development do
8
- gem "pry"
9
- gem "bundler"
10
- gem "byebug"
11
- gem "minitest"
12
- gem "mocha"
13
- gem "m"
14
- gem "rake"
15
- gem "chefstyle"
16
- end
data/README.md DELETED
@@ -1,109 +0,0 @@
1
- # train-aws - Train Plugin for connecting to AWS
2
-
3
- * **Project State: Active**
4
- * **Issues Response SLA: 3 business days**
5
- * **Pull Request Response SLA: 3 business days**
6
-
7
- For more information on project states and SLAs, see [this documentation](https://github.com/chef/chef-oss-practices/blob/master/repo-management/repo-states.md).
8
-
9
- This plugin allows applications that rely on Train to communicate with the Amazon Web Services API. For example, InSpec uses this to perform compliance checks against AWS infrastructure components.
10
-
11
- The plugin is a wrapper around `aws-sdk-core` version 3, with additional service-specific gems added where needed by the `inspec-aws` resource pack.
12
-
13
- Train itself has no CLI, nor a sophisticated test harness. InSpec does have such facilities, so installing Train plugins will require an InSpec installation. You do not need to use or understand InSpec.
14
-
15
- Train plugins may be developed without an InSpec installation.
16
-
17
- ## To Install this as a User
18
-
19
- Train plugins are distributed as gems. You may choose to manage the gem yourself, but if you are an InSpec user, InSPec can handle it for you.
20
-
21
- You will need InSpec v2.3 or later.
22
-
23
- Simply run:
24
-
25
- ```
26
- $ inspec plugin install train-aws
27
- ```
28
-
29
- You can then run:
30
-
31
- ```
32
- $ inspec detect -t aws://
33
- == Platform Details
34
-
35
- Name: aws
36
- Families: cloud, api
37
- Release: train-aws: v0.1.0, aws-sdk-core: 3.30.0
38
- Arch: -
39
- ```
40
-
41
- ## Authenticating to AWS
42
-
43
- These instructions assume you are using InSpec.
44
-
45
- ### Setting up AWS credentials for InSpec
46
-
47
- InSpec uses the standard AWS authentication mechanisms. Typically, you will create an IAM user specifically for auditing activities.
48
-
49
- * 1 Create an IAM user in the AWS console, with your choice of username. Check the box marked "Programmatic Access."
50
- * 2 On the Permissions screen, choose Direct Attach. Select the AWS-managed IAM Profile named "ReadOnlyAccess." If you wish to restrict the user further, you may do so; see individual InSpec resources to identify which permissions are required.
51
- * 3 After generating the key, record the Access Key ID and Secret Key.
52
-
53
- #### Using Environment Variables to provide credentials
54
-
55
- You may provide the credentials to InSpec by setting the following environment variables: `AWS_REGION`, `AWS_ACCESS_KEY_ID`, and `AWS_SECRET_KEY_ID`. You may also use `AWS_PROFILE`, or if you are using MFA, `AWS_SESSION_TOKEN`. See the [AWS Command Line Interface Docs](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html) for details.
56
-
57
- Once you have your environment variables set, you can verify your credentials by running:
58
-
59
- ```bash
60
- you$ inspec detect -t aws://
61
-
62
- == Platform Details
63
- Name: aws
64
- Families: cloud, api
65
- Release: aws-sdk-v2.10.125
66
- ```
67
-
68
- #### Using the InSpec target option to provide credentials on AWS
69
-
70
- Look for a file in your home directory named `~/.aws/credentials`. If it does not exist, create it. Choose a name for your profile; here, we're using the name 'auditing'. Add your credentials as a new profile, in INI format:
71
-
72
- ```bash
73
- [auditing]
74
- aws_access_key_id = AKIA....
75
- aws_secret_access_key = 1234....abcd
76
- ```
77
-
78
- You may now run InSpec using the `--target` / `-t` option, using the format `-t aws://region/profile`. For example, to connect to the Ohio region using a profile named 'auditing', use `-t aws://us-east-2/auditing`. Any omitted portion will use teh environment variables.
79
-
80
- To verify your credentials,
81
-
82
- ```bash
83
- you$ inspec detect -t aws://
84
-
85
- == Platform Details
86
- Name: aws
87
- Families: cloud, api
88
- Release: aws-sdk-v2.10.125
89
- ```
90
-
91
- ## Reporting Issues
92
-
93
- Bugs, typos, limitations, and frustrations are welcome to be reported through the [GitHub issues page for the train-aws project](https://github.com/inspec/train-aws/issues).
94
-
95
- You may also ask questions in the #inspec channel of the CHef Community Slack team. However, for an issue to get traction, please report it as a github issue.
96
-
97
- ## Development on this Plugin
98
-
99
- ### Development Process
100
-
101
- If you wish to contribute to this plugin, please use the usual fork-branch-push-PR cycle. All functional changes need new tests, and bugfixes are expected to include a new test that demonstrates the bug.
102
-
103
- ### Reference Information
104
-
105
- [Plugin Development](https://github.com/inspec/train/blob/master/docs/dev/plugins.md) is documented on the `train` project on GitHub.
106
-
107
- ### Testing changes against AWS
108
-
109
- Live-fire testing against AWS may be performed by the `integration` set of tests. To run the integration tests, you will need to have a set of AWS credentials exported to your environment. See test/integration/live_connect_test.rb .
@@ -1,226 +0,0 @@
1
- # As plugins are usually packaged and distributed as a RubyGem,
2
- # we have to provide a .gemspec file, which controls the gembuild
3
- # and publish process. This is a fairly generic gemspec.
4
-
5
- # It is traditional in a gemspec to dynamically load the current version
6
- # from a file in the source tree. The next three lines make that happen.
7
- lib = File.expand_path("../lib", __FILE__)
8
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
9
- require "train-aws/version"
10
-
11
- Gem::Specification.new do |spec|
12
- # Importantly, all Train plugins must be prefixed with `train-`
13
- spec.name = "train-aws"
14
-
15
- # It is polite to namespace your plugin under InspecPlugins::YourPluginInCamelCase
16
- spec.version = TrainPlugins::Aws::VERSION
17
- spec.authors = ["Chef InSpec Team"]
18
- spec.email = ["inspec@chef.io"]
19
- spec.summary = "AWS API Transport for Train"
20
- spec.description = "Allows applictaions using Train to speak to AWS; handles authentication, cacheing, and SDK dependency management."
21
- spec.homepage = "https://github.com/inspec/train-aws"
22
- spec.license = "Apache-2.0"
23
-
24
- # Though complicated-looking, this is pretty standard for a gemspec.
25
- # It just filters what will actually be packaged in the gem (leaving
26
- # out tests, etc)
27
- spec.files = %w{
28
- README.md train-aws.gemspec Gemfile
29
- } + Dir.glob(
30
- "lib/**/*", File::FNM_DOTMATCH
31
- ).reject { |f| File.directory?(f) }
32
- spec.require_paths = ["lib"]
33
-
34
- # If you rely on any other gems, list them here with any constraints.
35
- # This is how `inspec plugin install` is able to manage your dependencies.
36
-
37
- # If you only need certain gems during development or testing, list
38
- # them in Gemfile, not here.
39
-
40
- # Do not list inspec as a dependency of a train plugin.
41
- # Do not list train as a dependency of a train plugin.
42
-
43
- # spec.add_dependency "aws-sdk-acm", "~> 1"
44
- # spec.add_dependency "aws-sdk-acmpca", "~> 1"
45
- # spec.add_dependency "aws-sdk-alexaforbusiness", "~> 1"
46
- # spec.add_dependency "aws-sdk-amplify", "~> 1"
47
- spec.add_dependency "aws-sdk-apigateway", "~> 1"
48
- # spec.add_dependency "aws-sdk-apigatewaymanagementapi", "~> 1"
49
- spec.add_dependency "aws-sdk-apigatewayv2", "~> 1"
50
- # spec.add_dependency "aws-sdk-applicationautoscaling", "~> 1"
51
- # spec.add_dependency "aws-sdk-applicationdiscoveryservice", "~> 1"
52
- # spec.add_dependency "aws-sdk-applicationinsights", "~> 1"
53
- # spec.add_dependency "aws-sdk-appmesh", "~> 1"
54
- # spec.add_dependency "aws-sdk-appstream", "~> 1"
55
- # spec.add_dependency "aws-sdk-appsync", "~> 1"
56
- spec.add_dependency "aws-sdk-athena", "~> 1"
57
- spec.add_dependency "aws-sdk-autoscaling", "~> 1.22.0"
58
- # spec.add_dependency "aws-sdk-autoscalingplans", "~> 1"
59
- # spec.add_dependency "aws-sdk-backup", "~> 1"
60
- # spec.add_dependency "aws-sdk-batch", "~> 1"
61
- spec.add_dependency "aws-sdk-budgets", "~> 1"
62
- # spec.add_dependency "aws-sdk-chime", "~> 1"
63
- # spec.add_dependency "aws-sdk-cloud9", "~> 1"
64
- # spec.add_dependency "aws-sdk-clouddirectory", "~> 1"
65
- spec.add_dependency "aws-sdk-cloudformation", "~> 1"
66
- # spec.add_dependency "aws-sdk-cloudfront", "~> 1"
67
- spec.add_dependency "aws-sdk-cloudhsm", "~> 1"
68
- spec.add_dependency "aws-sdk-cloudhsmv2", "~> 1"
69
- # spec.add_dependency "aws-sdk-cloudsearch", "~> 1"
70
- # spec.add_dependency "aws-sdk-cloudsearchdomain", "~> 1"
71
- spec.add_dependency "aws-sdk-cloudtrail", "~> 1.8"
72
- spec.add_dependency "aws-sdk-cloudwatch", "~> 1.13"
73
- # spec.add_dependency "aws-sdk-cloudwatchevents", "~> 1"
74
- spec.add_dependency "aws-sdk-cloudwatchlogs", "~> 1.13"
75
- # spec.add_dependency "aws-sdk-codebuild", "~> 1"
76
- spec.add_dependency "aws-sdk-codecommit", "~> 1"
77
- spec.add_dependency "aws-sdk-codedeploy", "~> 1"
78
- spec.add_dependency "aws-sdk-codepipeline", "~> 1"
79
- # spec.add_dependency "aws-sdk-codestar", "~> 1"
80
- # spec.add_dependency "aws-sdk-cognitoidentity", "~> 1"
81
- # spec.add_dependency "aws-sdk-cognitoidentityprovider", "~> 1"
82
- # spec.add_dependency "aws-sdk-cognitosync", "~> 1"
83
- # spec.add_dependency "aws-sdk-comprehend", "~> 1"
84
- # spec.add_dependency "aws-sdk-comprehendmedical", "~> 1"
85
- spec.add_dependency "aws-sdk-configservice", "~> 1.21"
86
- spec.add_dependency "aws-sdk-core", "~> 3.0"
87
- spec.add_dependency "aws-sdk-costandusagereportservice", "~> 1.6"
88
- # spec.add_dependency "aws-sdk-costexplorer", "~> 1"
89
- # spec.add_dependency "aws-sdk-databasemigrationservice", "~> 1"
90
- # spec.add_dependency "aws-sdk-datapipeline", "~> 1"
91
- # spec.add_dependency "aws-sdk-datasync", "~> 1"
92
- # spec.add_dependency "aws-sdk-dax", "~> 1"
93
- # spec.add_dependency "aws-sdk-devicefarm", "~> 1"
94
- # spec.add_dependency "aws-sdk-directconnect", "~> 1"
95
- # spec.add_dependency "aws-sdk-directoryservice", "~> 1"
96
- # spec.add_dependency "aws-sdk-dlm", "~> 1"
97
- # spec.add_dependency "aws-sdk-docdb", "~> 1"
98
- spec.add_dependency "aws-sdk-dynamodb", "~> 1.31"
99
- # spec.add_dependency "aws-sdk-dynamodbstreams", "~> 1"
100
- spec.add_dependency "aws-sdk-ec2", "~> 1.70"
101
- # spec.add_dependency "aws-sdk-ec2instanceconnect", "~> 1"
102
- spec.add_dependency "aws-sdk-ecr", "~> 1.18"
103
- spec.add_dependency "aws-sdk-ecs", "~> 1.30"
104
- # spec.add_dependency "aws-sdk-efs", "~> 1"
105
- spec.add_dependency "aws-sdk-eks", "~> 1.9"
106
- spec.add_dependency "aws-sdk-elasticache", "~> 1"
107
- spec.add_dependency "aws-sdk-elasticbeanstalk", "~> 1"
108
- spec.add_dependency "aws-sdk-elasticloadbalancing", "~> 1.8"
109
- spec.add_dependency "aws-sdk-elasticloadbalancingv2", "~> 1"
110
- spec.add_dependency "aws-sdk-elasticsearchservice", "~> 1"
111
- # spec.add_dependency "aws-sdk-elastictranscoder", "~> 1"
112
- # spec.add_dependency "aws-sdk-emr", "~> 1"
113
- spec.add_dependency "aws-sdk-firehose", "~> 1"
114
- # spec.add_dependency "aws-sdk-fms", "~> 1"
115
- # spec.add_dependency "aws-sdk-fsx", "~> 1"
116
- # spec.add_dependency "aws-sdk-gamelift", "~> 1"
117
- # spec.add_dependency "aws-sdk-glacier", "~> 1"
118
- # spec.add_dependency "aws-sdk-globalaccelerator", "~> 1"
119
- # spec.add_dependency "aws-sdk-glue", "~> 1"
120
- # spec.add_dependency "aws-sdk-greengrass", "~> 1"
121
- # spec.add_dependency "aws-sdk-groundstation", "~> 1"
122
- # spec.add_dependency "aws-sdk-guardduty", "~> 1"
123
- # spec.add_dependency "aws-sdk-health", "~> 1"
124
- spec.add_dependency "aws-sdk-iam", "~> 1.13"
125
- # spec.add_dependency "aws-sdk-importexport", "~> 1"
126
- # spec.add_dependency "aws-sdk-inspector", "~> 1"
127
- # spec.add_dependency "aws-sdk-iot", "~> 1"
128
- # spec.add_dependency "aws-sdk-iot1clickdevicesservice", "~> 1"
129
- # spec.add_dependency "aws-sdk-iot1clickprojects", "~> 1"
130
- # spec.add_dependency "aws-sdk-iotanalytics", "~> 1"
131
- # spec.add_dependency "aws-sdk-iotdataplane", "~> 1"
132
- # spec.add_dependency "aws-sdk-iotevents", "~> 1"
133
- # spec.add_dependency "aws-sdk-ioteventsdata", "~> 1"
134
- # spec.add_dependency "aws-sdk-iotjobsdataplane", "~> 1"
135
- # spec.add_dependency "aws-sdk-iotthingsgraph", "~> 1"
136
- spec.add_dependency "aws-sdk-kafka", "~> 1"
137
- spec.add_dependency "aws-sdk-kinesis", "~> 1"
138
- # spec.add_dependency "aws-sdk-kinesisanalytics", "~> 1"
139
- # spec.add_dependency "aws-sdk-kinesisanalyticsv2", "~> 1"
140
- # spec.add_dependency "aws-sdk-kinesisvideo", "~> 1"
141
- # spec.add_dependency "aws-sdk-kinesisvideoarchivedmedia", "~> 1"
142
- # spec.add_dependency "aws-sdk-kinesisvideomedia", "~> 1"
143
- spec.add_dependency "aws-sdk-kms", "~> 1.13"
144
- spec.add_dependency "aws-sdk-lambda", "~> 1"
145
- # spec.add_dependency "aws-sdk-lambdapreview", "~> 1"
146
- # spec.add_dependency "aws-sdk-lex", "~> 1"
147
- # spec.add_dependency "aws-sdk-lexmodelbuildingservice", "~> 1"
148
- # spec.add_dependency "aws-sdk-licensemanager", "~> 1"
149
- # spec.add_dependency "aws-sdk-lightsail", "~> 1"
150
- # spec.add_dependency "aws-sdk-machinelearning", "~> 1"
151
- # spec.add_dependency "aws-sdk-macie", "~> 1"
152
- # spec.add_dependency "aws-sdk-managedblockchain", "~> 1"
153
- # spec.add_dependency "aws-sdk-marketplacecommerceanalytics", "~> 1"
154
- # spec.add_dependency "aws-sdk-marketplaceentitlementservice", "~> 1"
155
- # spec.add_dependency "aws-sdk-marketplacemetering", "~> 1"
156
- # spec.add_dependency "aws-sdk-mediaconnect", "~> 1"
157
- # spec.add_dependency "aws-sdk-mediaconvert", "~> 1"
158
- # spec.add_dependency "aws-sdk-medialive", "~> 1"
159
- # spec.add_dependency "aws-sdk-mediapackage", "~> 1"
160
- # spec.add_dependency "aws-sdk-mediapackagevod", "~> 1"
161
- # spec.add_dependency "aws-sdk-mediastore", "~> 1"
162
- # spec.add_dependency "aws-sdk-mediastoredata", "~> 1"
163
- # spec.add_dependency "aws-sdk-mediatailor", "~> 1"
164
- # spec.add_dependency "aws-sdk-migrationhub", "~> 1"
165
- # spec.add_dependency "aws-sdk-mobile", "~> 1"
166
- # spec.add_dependency "aws-sdk-mq", "~> 1"
167
- # spec.add_dependency "aws-sdk-mturk", "~> 1"
168
- # spec.add_dependency "aws-sdk-neptune", "~> 1"
169
- # spec.add_dependency "aws-sdk-opsworks", "~> 1"
170
- # spec.add_dependency "aws-sdk-opsworkscm", "~> 1"
171
- spec.add_dependency "aws-sdk-organizations", "~> 1.17.0"
172
- # spec.add_dependency "aws-sdk-personalize", "~> 1"
173
- # spec.add_dependency "aws-sdk-personalizeevents", "~> 1"
174
- # spec.add_dependency "aws-sdk-personalizeruntime", "~> 1"
175
- # spec.add_dependency "aws-sdk-pi", "~> 1"
176
- # spec.add_dependency "aws-sdk-pinpoint", "~> 1"
177
- # spec.add_dependency "aws-sdk-pinpointemail", "~> 1"
178
- # spec.add_dependency "aws-sdk-pinpointsmsvoice", "~> 1"
179
- # spec.add_dependency "aws-sdk-polly", "~> 1"
180
- # spec.add_dependency "aws-sdk-pricing", "~> 1"
181
- # spec.add_dependency "aws-sdk-quicksight", "~> 1"
182
- # spec.add_dependency "aws-sdk-ram", "~> 1"
183
- spec.add_dependency "aws-sdk-rds", "~> 1.43"
184
- # spec.add_dependency "aws-sdk-rdsdataservice", "~> 1"
185
- spec.add_dependency "aws-sdk-redshift", "~> 1"
186
- # spec.add_dependency "aws-sdk-rekognition", "~> 1"
187
- # spec.add_dependency "aws-sdk-resourcegroups", "~> 1"
188
- # spec.add_dependency "aws-sdk-resourcegroupstaggingapi", "~> 1"
189
- # spec.add_dependency "aws-sdk-robomaker", "~> 1"
190
- spec.add_dependency "aws-sdk-route53", "~> 1"
191
- spec.add_dependency "aws-sdk-route53domains", "~> 1"
192
- spec.add_dependency "aws-sdk-route53resolver", "~> 1"
193
- spec.add_dependency "aws-sdk-s3", "~> 1.30"
194
- # spec.add_dependency "aws-sdk-s3control", "~> 1"
195
- # spec.add_dependency "aws-sdk-sagemaker", "~> 1"
196
- # spec.add_dependency "aws-sdk-sagemakerruntime", "~> 1"
197
- # spec.add_dependency "aws-sdk-secretsmanager", "~> 1"
198
- spec.add_dependency "aws-sdk-securityhub", "~> 1"
199
- # spec.add_dependency "aws-sdk-serverlessapplicationrepository", "~> 1"
200
- # spec.add_dependency "aws-sdk-servicecatalog", "~> 1"
201
- # spec.add_dependency "aws-sdk-servicediscovery", "~> 1"
202
- # spec.add_dependency "aws-sdk-servicequotas", "~> 1"
203
- spec.add_dependency "aws-sdk-ses", "~> 1"
204
- # spec.add_dependency "aws-sdk-shield", "~> 1"
205
- # spec.add_dependency "aws-sdk-signer", "~> 1"
206
- # spec.add_dependency "aws-sdk-simpledb", "~> 1"
207
- spec.add_dependency "aws-sdk-sms", "~> 1"
208
- # spec.add_dependency "aws-sdk-snowball", "~> 1"
209
- spec.add_dependency "aws-sdk-sns", "~> 1.9"
210
- spec.add_dependency "aws-sdk-sqs", "~> 1.10"
211
- spec.add_dependency "aws-sdk-ssm", "~> 1"
212
- # spec.add_dependency "aws-sdk-states", "~> 1"
213
- # spec.add_dependency "aws-sdk-storagegateway", "~> 1"
214
- # spec.add_dependency "aws-sdk-support", "~> 1"
215
- # spec.add_dependency "aws-sdk-swf", "~> 1"
216
- # spec.add_dependency "aws-sdk-textract", "~> 1"
217
- # spec.add_dependency "aws-sdk-transcribeservice", "~> 1"
218
- # spec.add_dependency "aws-sdk-transcribestreamingservice", "~> 1"
219
- # spec.add_dependency "aws-sdk-transfer", "~> 1"
220
- # spec.add_dependency "aws-sdk-translate", "~> 1"
221
- # spec.add_dependency "aws-sdk-waf", "~> 1"
222
- # spec.add_dependency "aws-sdk-wafregional", "~> 1"
223
- # spec.add_dependency "aws-sdk-workdocs", "~> 1"
224
- # spec.add_dependency "aws-sdk-worklink", "~> 1"
225
- # spec.add_dependency "aws-sdk-workmail", "~> 1"
226
- end