cfn-model 0.5.2 → 0.5.3

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: 527a99ce24b15e3dc115ecfc163034c4a01599632b0ef0afb94ae9a232058d35
4
+ data.tar.gz: 3b230f07cad2a3369745a60684acbca599b6241fced5cb8c2c986e24304af258
5
5
  SHA512:
6
- metadata.gz: e56dff8cbc449c62012d268e470500ae4bd946cfb45b8292e86a6ff50375659f76caafe5c9043ccb3727a5d59ca51c90efb80407c3bc065aeb922ed5909b8900
7
- data.tar.gz: 3547645ee5d45b27a7679c805f9f57492174245f15782a6d6abf59d7f67dec8f8ba22305ec31c3412bda6605cac728f6ea3bb75cc80affb0e52ac998acdcd259
6
+ metadata.gz: a4569f552dbc5c8776daa0f82277c25ec1d2af7c7e00814574b9031bf4daf318e956b40add9297e0a45c6dcb12401603c8b84260ef7d6fbdcd1d98bee31b9158
7
+ data.tar.gz: e8d001e530ccaeb57e05d9bcada2c914f7ef311e71912e9ac03bf5846c61389ed1d2b73c38a4ebdfb2e59a907b968b7d22d5f67b88c5dc7045bdd92b977fe0ec
@@ -128,6 +128,13 @@ class CfnModel
128
128
 
129
129
  transform_function_events(cfn_hash, serverless_function, resource_name, with_line_numbers) if \
130
130
  serverless_function['Properties']['Events']
131
+
132
+ # Handle passing along cfn-nag specific metadata. SAM itself does not support metadata during transformation.
133
+ # https://github.com/aws/serverless-application-model/issues/264
134
+ if serverless_function.key?('Metadata') && serverless_function['Metadata'].key?('cfn_nag')
135
+ cfn_hash['Resources'][resource_name]['Metadata'] = serverless_function['Metadata']
136
+ cfn_hash['Resources'][resource_name + 'Role']['Metadata'] = serverless_function['Metadata']
137
+ end
131
138
  end
132
139
 
133
140
  def lambda_service_can_assume_role
metadata CHANGED
@@ -1,14 +1,14 @@
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.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Kascic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-12 00:00:00.000000000 Z
11
+ date: 2020-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop