cfn-model 0.5.2 → 0.6.2

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: '0912463527f6c2239a20d71bd81ce4d7bd8915d44ffb4dd975d684bc57f36555'
4
- data.tar.gz: e0943893a06458b5b49b3cc92a73c5570ebae24a1e5b5458b52e456043f401d4
3
+ metadata.gz: 36ad8068b8a22556bbcfa227568544fe045f809e5d3fc32be33bd87682de8e44
4
+ data.tar.gz: 067332f14d8ff714fcff7161871f1b4d7198efdfda05f5462c0e6558e8c2d587
5
5
  SHA512:
6
- metadata.gz: e56dff8cbc449c62012d268e470500ae4bd946cfb45b8292e86a6ff50375659f76caafe5c9043ccb3727a5d59ca51c90efb80407c3bc065aeb922ed5909b8900
7
- data.tar.gz: 3547645ee5d45b27a7679c805f9f57492174245f15782a6d6abf59d7f67dec8f8ba22305ec31c3412bda6605cac728f6ea3bb75cc80affb0e52ac998acdcd259
6
+ metadata.gz: e28bedd978945aa74ad25947c792b4e851b4902165b7cee05bd8b0109ad73470b48cb374eca11106c56063ff0b5e1b50432e7d6a80d4a07cf03e4ed0d7076f38
7
+ data.tar.gz: 46951dafa2d6927b240d23309dc25a7f26914ed9b15b5d59908517738fc3c1b5fbafd3a6cbc42d150e84895e1fb483556d9c0ebf8991d7c8a63c97a21602e4d0
@@ -93,6 +93,7 @@ class CfnModel
93
93
  handler: serverless_function_property(serverless_function, cfn_hash, 'Handler'),
94
94
  role: format_function_role(serverless_function, fn_name),
95
95
  runtime: serverless_function_property(serverless_function, cfn_hash, 'Runtime'),
96
+ reserved_concurrent_executions: serverless_function_property(serverless_function, cfn_hash, 'ReservedConcurrentExecutions'),
96
97
  with_line_numbers: with_line_numbers
97
98
  }
98
99
 
@@ -118,6 +119,7 @@ class CfnModel
118
119
  code_key: lambda_fn_params[:code_key],
119
120
  role: lambda_fn_params[:role],
120
121
  runtime: lambda_fn_params[:runtime],
122
+ reserved_concurrent_executions: lambda_fn_params[:reserved_concurrent_executions],
121
123
  with_line_numbers: lambda_fn_params[:with_line_numbers]
122
124
  )
123
125
  unless serverless_function['Properties']['Role']
@@ -128,6 +130,15 @@ class CfnModel
128
130
 
129
131
  transform_function_events(cfn_hash, serverless_function, resource_name, with_line_numbers) if \
130
132
  serverless_function['Properties']['Events']
133
+
134
+ # Handle passing along cfn-nag specific metadata. SAM itself does not support metadata during transformation.
135
+ # https://github.com/aws/serverless-application-model/issues/264
136
+ if serverless_function.key?('Metadata') && serverless_function['Metadata'].key?('cfn_nag')
137
+ cfn_hash['Resources'][resource_name]['Metadata'] = serverless_function['Metadata']
138
+ unless serverless_function['Properties']['Role']
139
+ cfn_hash['Resources'][resource_name + 'Role']['Metadata'] = serverless_function['Metadata']
140
+ end
141
+ end
131
142
  end
132
143
 
133
144
  def lambda_service_can_assume_role
@@ -214,6 +225,7 @@ class CfnModel
214
225
  code_key: nil,
215
226
  role:,
216
227
  runtime:,
228
+ reserved_concurrent_executions:,
217
229
  with_line_numbers: false)
218
230
  fn_resource = {
219
231
  'Type' => format_resource_type('AWS::Lambda::Function', -1, with_line_numbers),
@@ -223,6 +235,8 @@ class CfnModel
223
235
  'Runtime' => runtime
224
236
  }
225
237
  }
238
+ fn_resource['Properties']['ReservedConcurrentExecutions'] = reserved_concurrent_executions unless reserved_concurrent_executions.nil?
239
+
226
240
  lambda_function_code(fn_resource, code_bucket, code_key)
227
241
  end
228
242
 
metadata CHANGED
@@ -1,15 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cfn-model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Kascic
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-12 00:00:00.000000000 Z
11
+ date: 2021-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '3.4'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '3.4'
13
41
  - !ruby/object:Gem::Dependency
14
42
  name: rubocop
15
43
  requirement: !ruby/object:Gem::Requirement
@@ -24,6 +52,20 @@ dependencies:
24
52
  - - ">="
25
53
  - !ruby/object:Gem::Version
26
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: simplecov
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.11'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '0.11'
27
69
  - !ruby/object:Gem::Dependency
28
70
  name: kwalify
29
71
  requirement: !ruby/object:Gem::Requirement
@@ -53,7 +95,7 @@ dependencies:
53
95
  - !ruby/object:Gem::Version
54
96
  version: '3'
55
97
  description: An object model for CloudFormation templates
56
- email:
98
+ email:
57
99
  executables:
58
100
  - cfn_parse
59
101
  extensions: []
@@ -148,25 +190,30 @@ files:
148
190
  homepage: https://github.com/stelligent/cfn-model
149
191
  licenses:
150
192
  - MIT
151
- metadata: {}
152
- post_install_message:
193
+ metadata:
194
+ bug_tracker_uri: https://github.com/stelligent/cfn-model/issues
195
+ changelog_uri: https://github.com/stelligent/cfn-model/releases
196
+ documentation_uri: https://www.rubydoc.info/gems/cfn-model/0.6.2
197
+ homepage_uri: https://github.com/stelligent/cfn-model
198
+ source_code_uri: https://github.com/stelligent/cfn-model/tree/v0.6.2
199
+ post_install_message:
153
200
  rdoc_options: []
154
201
  require_paths:
155
202
  - lib
156
203
  - lib
157
204
  required_ruby_version: !ruby/object:Gem::Requirement
158
205
  requirements:
159
- - - "~>"
206
+ - - ">="
160
207
  - !ruby/object:Gem::Version
161
- version: '2.2'
208
+ version: 2.5.0
162
209
  required_rubygems_version: !ruby/object:Gem::Requirement
163
210
  requirements:
164
211
  - - ">="
165
212
  - !ruby/object:Gem::Version
166
213
  version: '0'
167
214
  requirements: []
168
- rubygems_version: 3.1.4
169
- signing_key:
215
+ rubygems_version: 3.1.2
216
+ signing_key:
170
217
  specification_version: 4
171
218
  summary: cfn-model
172
219
  test_files: []