cfn-model 0.1.11 → 0.1.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: 770753ddd59a7c579afe0287762722fb20095ac8
4
- data.tar.gz: 6814f56faedeb9fb7e8f8f6edd814f1406e48e90
3
+ metadata.gz: b0cbaafa5aae88b900b524e178ee2e5bec99731b
4
+ data.tar.gz: a1164ab6d3ae88048d64947cbb93525ca91428b2
5
5
  SHA512:
6
- metadata.gz: 5c478c5364ca9cd08905af9d99d6ca065c263e42e7b17bdaedc6fac59305b1ffce6432dc9d931eecd3c7c6925744e0af16a7cbf2082645dea07de58caafdf337
7
- data.tar.gz: c5379871ba8a1f78fa687082d59cbffc83c894303b0e1636628091ad111b971b6453c37b416bce24c6c466a927e8a1c85fbd66cf47176c9e24e27e326877776c
6
+ metadata.gz: 2ba1540435edacfb4fbce29732dba05a906f54748cb34b4ee447869555039435218dcab4c90358104c0570343796d4b0769b8893888885b91c8a1a2f79dcb209
7
+ data.tar.gz: 6a74580eea614d32f70c43c17a0dbcf0a1595185540da305bf91622ec29990c2d1050f06f1996d081b9373cae8d9efac874c22ef12d94d9b351fd3a8519c290b
@@ -2,9 +2,14 @@ class Ec2NetworkInterfaceParser
2
2
  def parse(cfn_model:, resource:)
3
3
  network_interface = resource
4
4
 
5
- network_interface.security_groups = network_interface.groupSet.map do |security_group_reference|
6
- cfn_model.find_security_group_by_group_id(security_group_reference)
5
+ if network_interface.groupSet.is_a? Array
6
+ network_interface.security_groups = network_interface.groupSet.map do |security_group_reference|
7
+ cfn_model.find_security_group_by_group_id(security_group_reference)
8
+ end
9
+ else
10
+ network_interface.security_groups = []
7
11
  end
12
+
8
13
  network_interface
9
14
  end
10
15
  end
@@ -2,9 +2,15 @@ class LoadBalancerParser
2
2
  def parse(cfn_model:, resource:)
3
3
  load_balancer = resource
4
4
 
5
- load_balancer.security_groups = load_balancer.securityGroups.map do |security_group_reference|
6
- cfn_model.find_security_group_by_group_id(security_group_reference)
5
+ if load_balancer.securityGroups.is_a? Array
6
+ load_balancer.security_groups = load_balancer.securityGroups.map do |security_group_reference|
7
+ cfn_model.find_security_group_by_group_id(security_group_reference)
8
+ end
9
+ else
10
+ # er... list of ids or comma separated list. just punt.
11
+ load_balancer.security_groups = []
7
12
  end
13
+
8
14
  load_balancer
9
15
  end
10
16
  end
@@ -7,8 +7,13 @@ class LoadBalancerV2Parser
7
7
  # raise ParserError.new("Load Balancer must have at least two subnets: #{load_balancer.logical_resource_id}")
8
8
  # end
9
9
 
10
- load_balancer.security_groups = load_balancer.securityGroups.map do |security_group_reference|
11
- cfn_model.find_security_group_by_group_id(security_group_reference)
10
+ if load_balancer.securityGroups.is_a? Array
11
+ load_balancer.security_groups = load_balancer.securityGroups.map do |security_group_reference|
12
+ cfn_model.find_security_group_by_group_id(security_group_reference)
13
+ end
14
+ else
15
+ # er... list of ids or comma separated list. just punt.
16
+ load_balancer.security_groups = []
12
17
  end
13
18
  load_balancer
14
19
  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.11
4
+ version: 0.1.12
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-11-22 00:00:00.000000000 Z
11
+ date: 2017-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kwalify