awspec 0.37.3 → 0.37.4
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/doc/_resource_types/iam_group.md +18 -0
- data/doc/_resource_types/iam_role.md +18 -0
- data/doc/_resource_types/iam_user.md +18 -0
- data/doc/resource_types.md +56 -0
- data/lib/awspec/resource_reader.rb +1 -1
- data/lib/awspec/stub/iam_group.rb +18 -0
- data/lib/awspec/stub/iam_role.rb +9 -0
- data/lib/awspec/stub/iam_user.rb +9 -0
- data/lib/awspec/type/iam_group.rb +2 -0
- data/lib/awspec/type/iam_role.rb +2 -0
- data/lib/awspec/type/iam_user.rb +2 -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: a5e9062836e38b2498b16c1103ab9cc77126f800
|
4
|
+
data.tar.gz: 991c2cbf5e1b66054dbf6ea626f8f8f85a32e11f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99fbd99d5126440bdd4597b6991885243253ac23b9a4d8dc517d63ac49b9114a90f50ed2497a0f16cf895895d498dd39a3aa73ade8a989df2e3556951bfeb0e9
|
7
|
+
data.tar.gz: 288330a150d1e1c20ba3928058b9261be9294f5f94d64dffcba0103bdc1f330e250b3647f237a0f51f6110593bb01d7247f0723abdc628eb7f3dd7aaaf47a8bb
|
@@ -66,3 +66,21 @@ DOC
|
|
66
66
|
end
|
67
67
|
end
|
68
68
|
```
|
69
|
+
|
70
|
+
### advanced
|
71
|
+
|
72
|
+
`iam_group` can use `Aws::IAM::Group` resource (see http://docs.aws.amazon.com/sdkforruby/api/Aws/IAM/Group.html).
|
73
|
+
|
74
|
+
```ruby
|
75
|
+
describe iam_group('my-iam-group') do
|
76
|
+
its('users.count) { should eq 5 }
|
77
|
+
end
|
78
|
+
```
|
79
|
+
|
80
|
+
or
|
81
|
+
|
82
|
+
```ruby
|
83
|
+
describe iam_group('my-iam-group') do
|
84
|
+
its('resource.users.count') { should eq 5 }
|
85
|
+
end
|
86
|
+
```
|
@@ -50,3 +50,21 @@ DOC
|
|
50
50
|
end
|
51
51
|
end
|
52
52
|
```
|
53
|
+
|
54
|
+
### advanced
|
55
|
+
|
56
|
+
`iam_role` can use `Aws::IAM::Role` resource (see http://docs.aws.amazon.com/sdkforruby/api/Aws/IAM/Role.html).
|
57
|
+
|
58
|
+
```ruby
|
59
|
+
describe iam_role('my-iam-role') do
|
60
|
+
its('attached_policies.count') { should eq 5 }
|
61
|
+
end
|
62
|
+
```
|
63
|
+
|
64
|
+
or
|
65
|
+
|
66
|
+
```ruby
|
67
|
+
describe iam_role('my-iam-role') do
|
68
|
+
its('resource.attached_policies.count') { should eq 5 }
|
69
|
+
end
|
70
|
+
```
|
@@ -58,3 +58,21 @@ describe iam_user('my-iam-user') do
|
|
58
58
|
it { should belong_to_iam_group('my-iam-group') }
|
59
59
|
end
|
60
60
|
```
|
61
|
+
|
62
|
+
### advanced
|
63
|
+
|
64
|
+
`iam_user` can use `Aws::IAM::User` resource (see http://docs.aws.amazon.com/sdkforruby/api/Aws/IAM/User.html).
|
65
|
+
|
66
|
+
```ruby
|
67
|
+
describe iam_user('my-iam-user') do
|
68
|
+
its('login_profile.password_reset_required') { should eq false }
|
69
|
+
end
|
70
|
+
```
|
71
|
+
|
72
|
+
or
|
73
|
+
|
74
|
+
```ruby
|
75
|
+
describe iam_user('my-iam-user') do
|
76
|
+
its('resource.login_profile.password_reset_required') { should eq false }
|
77
|
+
end
|
78
|
+
```
|
data/doc/resource_types.md
CHANGED
@@ -531,6 +531,24 @@ end
|
|
531
531
|
### have_inline_policy
|
532
532
|
|
533
533
|
### its(:path), its(:group_name), its(:group_id), its(:arn), its(:create_date)
|
534
|
+
### :unlock: Advanced use
|
535
|
+
|
536
|
+
`iam_group` can use `Aws::IAM::Group` resource (see http://docs.aws.amazon.com/sdkforruby/api/Aws/IAM/Group.html).
|
537
|
+
|
538
|
+
```ruby
|
539
|
+
describe iam_group('my-iam-group') do
|
540
|
+
its('users.count) { should eq 5 }
|
541
|
+
end
|
542
|
+
```
|
543
|
+
|
544
|
+
or
|
545
|
+
|
546
|
+
```ruby
|
547
|
+
describe iam_group('my-iam-group') do
|
548
|
+
its('resource.users.count') { should eq 5 }
|
549
|
+
end
|
550
|
+
```
|
551
|
+
|
534
552
|
## <a name="iam_policy">iam_policy</a>
|
535
553
|
|
536
554
|
IamPolicy resource type.
|
@@ -640,7 +658,26 @@ DOC
|
|
640
658
|
end
|
641
659
|
```
|
642
660
|
|
661
|
+
|
643
662
|
### its(:path), its(:role_name), its(:role_id), its(:arn), its(:create_date), its(:assume_role_policy_document)
|
663
|
+
### :unlock: Advanced use
|
664
|
+
|
665
|
+
`iam_role` can use `Aws::IAM::Role` resource (see http://docs.aws.amazon.com/sdkforruby/api/Aws/IAM/Role.html).
|
666
|
+
|
667
|
+
```ruby
|
668
|
+
describe iam_role('my-iam-role') do
|
669
|
+
its('attached_policies.count') { should eq 5 }
|
670
|
+
end
|
671
|
+
```
|
672
|
+
|
673
|
+
or
|
674
|
+
|
675
|
+
```ruby
|
676
|
+
describe iam_role('my-iam-role') do
|
677
|
+
its('resource.attached_policies.count') { should eq 5 }
|
678
|
+
end
|
679
|
+
```
|
680
|
+
|
644
681
|
## <a name="iam_user">iam_user</a>
|
645
682
|
|
646
683
|
IamUser resource type.
|
@@ -710,7 +747,26 @@ describe iam_user('my-iam-user') do
|
|
710
747
|
end
|
711
748
|
```
|
712
749
|
|
750
|
+
|
713
751
|
### its(:path), its(:user_name), its(:user_id), its(:arn), its(:create_date), its(:password_last_used)
|
752
|
+
### :unlock: Advanced use
|
753
|
+
|
754
|
+
`iam_user` can use `Aws::IAM::User` resource (see http://docs.aws.amazon.com/sdkforruby/api/Aws/IAM/User.html).
|
755
|
+
|
756
|
+
```ruby
|
757
|
+
describe iam_user('my-iam-user') do
|
758
|
+
its('login_profile.password_reset_required') { should eq false }
|
759
|
+
end
|
760
|
+
```
|
761
|
+
|
762
|
+
or
|
763
|
+
|
764
|
+
```ruby
|
765
|
+
describe iam_user('my-iam-user') do
|
766
|
+
its('resource.login_profile.password_reset_required') { should eq false }
|
767
|
+
end
|
768
|
+
```
|
769
|
+
|
714
770
|
## <a name="lambda">lambda</a>
|
715
771
|
|
716
772
|
Lambda resource type.
|
@@ -46,6 +46,24 @@ Aws.config[:iam] = {
|
|
46
46
|
is_truncated: false,
|
47
47
|
marker: nil
|
48
48
|
},
|
49
|
+
get_group: {
|
50
|
+
group: {
|
51
|
+
path: '/',
|
52
|
+
group_name: 'my-iam-group',
|
53
|
+
group_id: 'GABCDEFGHI123455689',
|
54
|
+
arn: 'arn:aws:iam::123456789012:group/my-iam-group',
|
55
|
+
create_date: Time.new(2015, 1, 2, 10, 00, 00, '+00:00')
|
56
|
+
},
|
57
|
+
users: [
|
58
|
+
{
|
59
|
+
path: '/',
|
60
|
+
user_name: 'my-iam-user',
|
61
|
+
user_id: 'ABCDEFGHI1234556890',
|
62
|
+
arn: 'arn:aws:iam::123456789012:user/my-iam-user',
|
63
|
+
create_date: Time.new(2015, 1, 2, 10, 00, 00, '+00:00')
|
64
|
+
}
|
65
|
+
]
|
66
|
+
},
|
49
67
|
get_group_policy: {
|
50
68
|
group_name: 'my-iam-group',
|
51
69
|
policy_name: 'InlineEC2FullAccess',
|
data/lib/awspec/stub/iam_role.rb
CHANGED
@@ -26,6 +26,15 @@ Aws.config[:iam] = {
|
|
26
26
|
is_truncated: false,
|
27
27
|
marker: nil
|
28
28
|
},
|
29
|
+
get_role: {
|
30
|
+
role: {
|
31
|
+
path: '/',
|
32
|
+
role_name: 'my-iam-role',
|
33
|
+
role_id: 'RABCDEFGHI123455689',
|
34
|
+
arn: 'arn:aws:iam::123456789012:role/my-iam-role',
|
35
|
+
create_date: Time.new(2015, 1, 2, 9, 00, 00, '+00:00')
|
36
|
+
}
|
37
|
+
},
|
29
38
|
get_role_policy: {
|
30
39
|
role_name: 'my-iam-role',
|
31
40
|
policy_name: 'AllowS3BucketAccess',
|
data/lib/awspec/stub/iam_user.rb
CHANGED
@@ -37,6 +37,15 @@ Aws.config[:iam] = {
|
|
37
37
|
is_truncated: false,
|
38
38
|
marker: nil
|
39
39
|
},
|
40
|
+
get_user: {
|
41
|
+
user: {
|
42
|
+
path: '/',
|
43
|
+
user_name: 'my-iam-user',
|
44
|
+
user_id: 'ABCDEFGHI1234556890',
|
45
|
+
arn: 'arn:aws:iam::123456789012:user/my-iam-user',
|
46
|
+
create_date: Time.new(2015, 1, 2, 10, 00, 00, '+00:00')
|
47
|
+
}
|
48
|
+
},
|
40
49
|
get_user_policy: {
|
41
50
|
user_name: 'my-iam-user',
|
42
51
|
policy_name: 'AllowS3BucketAccess',
|
data/lib/awspec/type/iam_role.rb
CHANGED
data/lib/awspec/type/iam_user.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.37.
|
4
|
+
version: 0.37.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- k1LoW
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|