cfn-model 0.1.4 → 0.1.5
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 +4 -4
- data/lib/cfn-model/parser/ec2_instance_parser.rb +9 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 72d56b09820fe1162cab8076742508761beac8a8
|
|
4
|
+
data.tar.gz: 0ffc66c92af7e17c1e1f2ce5fd20335300c07061
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
6
|
-
|
|
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
|
+
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-
|
|
11
|
+
date: 2017-11-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: kwalify
|