terrafying-components 1.10.7 → 1.10.8
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d88b66eb51f1fabbf40ece51e43eb9becd69c7982b1afbc7e4a633bb4674da3f
|
4
|
+
data.tar.gz: aea04f90cf38545faa3361fad63c1459a7a96ca1c217e9c994935da12586d100
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d95c569962c719f777ae09b18f08e863c3d69b1429c013657a564c3cd66374843c0a3ee09cdf396eef2196e390e9317926efcaf43f89014651035f82ff0da178
|
7
|
+
data.tar.gz: f6c75c2dd13fd192cb7ae7318437f9ba5fdd37a0037d8d1e563c1f18747c819d1af0e0e5b9eecfa05b845066e8fc183afb2752d70600149bc6d4b0043678860e
|
@@ -9,7 +9,7 @@ module Terrafying
|
|
9
9
|
|
10
10
|
class DynamicSet < Terrafying::Context
|
11
11
|
|
12
|
-
attr_reader :name, :asg
|
12
|
+
attr_reader :name, :asg, :stack_arn
|
13
13
|
|
14
14
|
include Usable
|
15
15
|
|
@@ -113,6 +113,7 @@ module Terrafying
|
|
113
113
|
}
|
114
114
|
|
115
115
|
@asg = output_of(:aws_cloudformation_stack, ident, 'outputs["AsgName"]')
|
116
|
+
@stack_arn = output_of(:aws_cloudformation_stack, ident, 'arn')
|
116
117
|
|
117
118
|
self
|
118
119
|
end
|
@@ -44,12 +44,16 @@ module Terrafying
|
|
44
44
|
)
|
45
45
|
}
|
46
46
|
|
47
|
-
resource :
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
47
|
+
@id = resource :aws_iam_instance_profile, name, {
|
48
|
+
name: name,
|
49
|
+
role: output_of(:aws_iam_role, name, :name),
|
50
|
+
}
|
51
|
+
@name = name
|
52
|
+
|
53
|
+
@role_arn = output_of(:aws_iam_role, name, :arn)
|
54
|
+
@role_resource = "aws_iam_role.#{name}"
|
55
|
+
|
56
|
+
@statements = [
|
53
57
|
{
|
54
58
|
Sid: "Stmt1442396947000",
|
55
59
|
Effect: "Allow",
|
@@ -63,22 +67,33 @@ module Terrafying
|
|
63
67
|
"arn:aws:iam::*"
|
64
68
|
]
|
65
69
|
}
|
66
|
-
|
67
|
-
}
|
68
|
-
),
|
69
|
-
role: output_of(:aws_iam_role, name, :name)
|
70
|
-
}
|
70
|
+
].push(*options[:statements])
|
71
71
|
|
72
|
-
@
|
73
|
-
|
74
|
-
|
75
|
-
|
72
|
+
@policy_config = {
|
73
|
+
name: @name,
|
74
|
+
policy: policy,
|
75
|
+
role: output_of(:aws_iam_role, @name, :name),
|
76
|
+
}
|
76
77
|
|
77
|
-
|
78
|
-
@role_resource = "aws_iam_role.#{name}"
|
78
|
+
resource :aws_iam_role_policy, @name, @policy_config
|
79
79
|
|
80
80
|
self
|
81
81
|
end
|
82
|
+
|
83
|
+
def policy
|
84
|
+
JSON.pretty_generate(
|
85
|
+
{
|
86
|
+
Version: "2012-10-17",
|
87
|
+
Statement: @statements,
|
88
|
+
}
|
89
|
+
)
|
90
|
+
end
|
91
|
+
|
92
|
+
def add_statement!(statement)
|
93
|
+
@statements << statement
|
94
|
+
@policy_config[:policy] = policy
|
95
|
+
end
|
96
|
+
|
82
97
|
end
|
83
98
|
end
|
84
99
|
end
|
@@ -148,7 +148,17 @@ module Terrafying
|
|
148
148
|
vpc.zone.add_record_in(self, i.name, [i.ip_address])
|
149
149
|
}
|
150
150
|
end
|
151
|
-
|
151
|
+
|
152
|
+
if set == DynamicSet && options[:rolling_update] == :signal
|
153
|
+
@instance_profile.add_statement!(
|
154
|
+
{
|
155
|
+
Effect: "Allow",
|
156
|
+
Action: [ "cloudformation:SignalResource" ],
|
157
|
+
Resource: [ @instance_set.stack_arn ],
|
158
|
+
}
|
159
|
+
)
|
160
|
+
end
|
161
|
+
|
152
162
|
self
|
153
163
|
end
|
154
164
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: terrafying-components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.10.
|
4
|
+
version: 1.10.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- uSwitch Limited
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -144,8 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
144
144
|
- !ruby/object:Gem::Version
|
145
145
|
version: '0'
|
146
146
|
requirements: []
|
147
|
-
|
148
|
-
rubygems_version: 2.7.8
|
147
|
+
rubygems_version: 3.0.1
|
149
148
|
signing_key:
|
150
149
|
specification_version: 4
|
151
150
|
summary: No.
|