cfn-model 0.1.4 → 0.1.5

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
  SHA1:
3
- metadata.gz: c6f43d459260c77c433451c5c1a628635631278e
4
- data.tar.gz: 8360ce0a0f41b79465d7a3092498297a19f57cad
3
+ metadata.gz: 72d56b09820fe1162cab8076742508761beac8a8
4
+ data.tar.gz: 0ffc66c92af7e17c1e1f2ce5fd20335300c07061
5
5
  SHA512:
6
- metadata.gz: 6b09b830b77f9ad0174577bdae445de909f2b8de493f376f3b6885fd71da8ad108bb84d0989600e7a163f022d2258bf9a754d747838a68d99ed33068123debd0
7
- data.tar.gz: f14587733fdd326dc524d3603f998b4334821358a3c2654e02a13be6b04193cc1831310cd37f7b2cc72b4f20640b7ae7cdfa5060bfac6e7dce75545621df042e
6
+ metadata.gz: b37801ff727875e6fa48663ec067e744c8a5b3d8585ca8509319838701cc338b18ecf0eaa7aa0cbc95495b6ad92e19df884494282cd5ef184bac449a817a3bcb
7
+ data.tar.gz: 4da9b8ac69066b816094cc601b48d21318f77a5d95a4595dd08ca7c3b6c29358e8b296de2e9e14dfcec8af747c783e63d8e133e80f78d79bf3b005c9179f5952
@@ -2,8 +2,15 @@ class Ec2InstanceParser
2
2
  def parse(cfn_model:, resource:)
3
3
  ec2_instance = resource
4
4
 
5
- ec2_instance.security_groups = ec2_instance.securityGroupIds.map do |security_group_reference|
6
- cfn_model.find_security_group_by_group_id(security_group_reference)
5
+ if ec2_instance.securityGroupIds.is_a? Array
6
+ ec2_instance.security_groups = ec2_instance.securityGroupIds.map do |security_group_reference|
7
+ cfn_model.find_security_group_by_group_id(security_group_reference)
8
+ end
9
+ else
10
+ # could be a Ref to a List<AWS::EC2::SecurityGroup::Id> which we can't
11
+ # do much with at the level of static analysis before knowing the parameter passed in
12
+ # worth checking defaults?
13
+ ec2_instance.security_groups = []
7
14
  end
8
15
  ec2_instance
9
16
  end
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.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Kascic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-27 00:00:00.000000000 Z
11
+ date: 2017-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kwalify