convection 0.2.11 → 0.2.12
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1076761e16a97104ae559f9b56201d1cbb76287a
|
4
|
+
data.tar.gz: 6f85f6950fb4e34863fcee35f6b8ffc1e2779fec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 574c6935f6220ee9f93b82d31278d7380f3f9e966a9cfa4e22b9731325d954449e2248a619b6057c0e2387ac3b71ca7e1b1356ee43a5bba0b41d3c8d023f335e
|
7
|
+
data.tar.gz: d6834e569ba8d687b612cdb0765885f2a7738c7c7392640aacc9e0d8ce3c54db8bab14179450dbe2782e07ac7bc2f2b3730ba93c2808a505883542f25549da0e
|
data/.gitignore
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'securerandom'
|
2
|
+
|
1
3
|
module Convection
|
2
4
|
module Model
|
3
5
|
module Mixin
|
@@ -61,6 +63,7 @@ module Convection
|
|
61
63
|
attribute :sid
|
62
64
|
attribute :effect
|
63
65
|
attribute :principal
|
66
|
+
attribute :not_principal
|
64
67
|
attribute :condition
|
65
68
|
list :action
|
66
69
|
list :resource
|
@@ -90,12 +93,13 @@ module Convection
|
|
90
93
|
def render
|
91
94
|
{
|
92
95
|
'Effect' => effect,
|
93
|
-
'Action' => action
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
96
|
+
'Action' => action
|
97
|
+
}.tap do |statement|
|
98
|
+
statement['Sid'] = sid unless sid.nil?
|
99
|
+
statement['Condition'] = condition unless condition.nil?
|
100
|
+
statement['Principal'] = principal unless principal.nil?
|
101
|
+
statement['NotPrincipal'] = not_principal unless not_principal.nil?
|
102
|
+
statement['Resource'] = resource unless resource.empty? # Avoid failure in CF if empty Resources array is passed
|
99
103
|
end
|
100
104
|
end
|
101
105
|
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require_relative '../resource'
|
2
|
+
|
3
|
+
module Convection
|
4
|
+
module Model
|
5
|
+
class Template
|
6
|
+
class Resource
|
7
|
+
##
|
8
|
+
# AWS::IAM::ManagedPolicy
|
9
|
+
##
|
10
|
+
class IAMManagedPolicy < Resource
|
11
|
+
extend Forwardable
|
12
|
+
|
13
|
+
type 'AWS::IAM::ManagedPolicy'
|
14
|
+
property :path, 'Path'
|
15
|
+
property :group, 'Groups', :type => :list
|
16
|
+
property :role, 'Roles', :type => :list
|
17
|
+
property :user, 'Users', :type => :list
|
18
|
+
|
19
|
+
attr_reader :document
|
20
|
+
def_delegators :@document, :allow, :deny, :id, :version, :statement
|
21
|
+
|
22
|
+
def initialize(*args)
|
23
|
+
super
|
24
|
+
@document = Model::Mixin::Policy.new(:template => @template)
|
25
|
+
end
|
26
|
+
|
27
|
+
def render
|
28
|
+
super.tap do |r|
|
29
|
+
document.render(r['Properties'])
|
30
|
+
r['Properties'].delete('PolicyName')
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: convection
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Manero
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|
@@ -402,6 +402,7 @@ files:
|
|
402
402
|
- lib/convection/model/template/resource/aws_iam_access_key.rb
|
403
403
|
- lib/convection/model/template/resource/aws_iam_group.rb
|
404
404
|
- lib/convection/model/template/resource/aws_iam_instance_profile.rb
|
405
|
+
- lib/convection/model/template/resource/aws_iam_managed_policy.rb
|
405
406
|
- lib/convection/model/template/resource/aws_iam_policy.rb
|
406
407
|
- lib/convection/model/template/resource/aws_iam_role.rb
|
407
408
|
- lib/convection/model/template/resource/aws_iam_user.rb
|