cfndsl 0.11.11 → 0.11.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 +4 -4
- data/lib/cfndsl/aws/types.yaml +35 -0
- data/lib/cfndsl/generate_types.rb +1 -1
- data/lib/cfndsl/jsonable.rb +5 -0
- data/lib/cfndsl/types.rb +2 -1
- data/lib/cfndsl/version.rb +1 -1
- data/spec/cfndsl_spec.rb +5 -0
- 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: 39c0a723b14a76e495e1e0aa7e7af38c9a34aee9
|
4
|
+
data.tar.gz: 32b0b32b2ad45d53168e0606b8e51f278549323e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d471b2921db35d11f539c749bf48e7a1c5321a3fe8ad3ed2ed7f3e1ef17c170db46054f2b2a37e6470b6d7489b2a7f3cf6c06dc796faf26d47e54ba6d8406f73
|
7
|
+
data.tar.gz: bbb8988b364b7029280d9091e7d9aa653e29f8fe9bcd32a3a885aeb3c074bbb6afb567d0dd946f30314be5ae7cc1c6a2dc3322460483cc3f36947f6368961068
|
data/lib/cfndsl/aws/types.yaml
CHANGED
@@ -1108,6 +1108,9 @@ Resources:
|
|
1108
1108
|
EventSourceArn: String
|
1109
1109
|
FunctionName: String
|
1110
1110
|
StartingPosition: String
|
1111
|
+
"AWS::EC2::SpotFleet" :
|
1112
|
+
Properties:
|
1113
|
+
SpotFleetRequestConfigData: SpotFleetRequestConfigData
|
1111
1114
|
|
1112
1115
|
Types:
|
1113
1116
|
String: String
|
@@ -1115,6 +1118,36 @@ Types:
|
|
1115
1118
|
JSON: JSON
|
1116
1119
|
Integer: Integer
|
1117
1120
|
Number: Number
|
1121
|
+
Placement:
|
1122
|
+
AvailabilityZone: String
|
1123
|
+
GroupName: String
|
1124
|
+
LaunchSpecifications:
|
1125
|
+
BlockDeviceMappings: [ BlockDeviceMapping ]
|
1126
|
+
EbsOptimized: Boolean
|
1127
|
+
IamInstanceProfile: String
|
1128
|
+
ImageId: String
|
1129
|
+
InstanceType: String
|
1130
|
+
KernelId: String
|
1131
|
+
KeyName: String
|
1132
|
+
Monitoring: Boolean
|
1133
|
+
NetworkInterfaces: [ NetworkInterfaceType ]
|
1134
|
+
Placement: Placement
|
1135
|
+
RamdiskId: String
|
1136
|
+
SecurityGroups: [ String ]
|
1137
|
+
SpotPrice: String
|
1138
|
+
SubnetId: String
|
1139
|
+
UserData: String
|
1140
|
+
WeightedCapacity: Number
|
1141
|
+
SpotFleetRequestConfigData:
|
1142
|
+
AllocationStrategy: String
|
1143
|
+
ExcessCapacityTerminationPolicy: String
|
1144
|
+
IamFleetRole: String
|
1145
|
+
LaunchSpecifications: LaunchSpecifications
|
1146
|
+
SpotPrice: String
|
1147
|
+
TargetCapacity: Integer
|
1148
|
+
TerminateInstancesWithExpiration: Boolean
|
1149
|
+
ValidFrom: String
|
1150
|
+
ValidUntil: String
|
1118
1151
|
BlockDeviceMapping:
|
1119
1152
|
DeviceName: String
|
1120
1153
|
VirtualName: String
|
@@ -1298,6 +1331,8 @@ Types:
|
|
1298
1331
|
Description: String
|
1299
1332
|
DeviceIndex: String
|
1300
1333
|
GroupSet: [ String ]
|
1334
|
+
Ipv6AddressCount: Integer
|
1335
|
+
Ipv6Addresses: [ String ]
|
1301
1336
|
NetworkInterfaceId: String
|
1302
1337
|
PrivateIpAddress: String
|
1303
1338
|
PrivateIpAddresses: [ PrivateIpAddressSpecification ]
|
@@ -12,7 +12,7 @@ module CfnDsl
|
|
12
12
|
|
13
13
|
# rubocop:disable Metrics/MethodLength, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/CyclomaticComplexity
|
14
14
|
def generate_types(filename)
|
15
|
-
types = YAML.
|
15
|
+
types = YAML.safe_load(File.open(filename))
|
16
16
|
const_set('Types_Internal', types)
|
17
17
|
|
18
18
|
validate_types(types)
|
data/lib/cfndsl/jsonable.rb
CHANGED
@@ -36,6 +36,11 @@ module CfnDsl
|
|
36
36
|
Fn.new('Join', [string, array])
|
37
37
|
end
|
38
38
|
|
39
|
+
# Equivalent to the CloudFormation template built in function Fn::Split
|
40
|
+
def FnSplit(string, array)
|
41
|
+
Fn.new('Split', [string, array])
|
42
|
+
end
|
43
|
+
|
39
44
|
# Equivalent to the CloudFormation template built in function Fn::And
|
40
45
|
def FnAnd(array)
|
41
46
|
if !array || array.count < 2 || array.count > 10
|
data/lib/cfndsl/types.rb
CHANGED
@@ -5,11 +5,12 @@ require 'cfndsl/names'
|
|
5
5
|
require 'cfndsl/types'
|
6
6
|
|
7
7
|
module CfnDsl
|
8
|
+
# Types helper
|
8
9
|
# rubocop:disable Metrics/ModuleLength
|
9
10
|
module Types
|
10
11
|
# rubocop:disable Metrics/MethodLength, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/CyclomaticComplexity
|
11
12
|
def self.included(type_def)
|
12
|
-
types_list = YAML.
|
13
|
+
types_list = YAML.safe_load(File.open("#{File.dirname(__FILE__)}/#{type_def::TYPE_PREFIX}/types.yaml"))
|
13
14
|
type_def.const_set('Types_Internal', types_list)
|
14
15
|
|
15
16
|
# Do a little sanity checking - all of the types referenced in Resources
|
data/lib/cfndsl/version.rb
CHANGED
data/spec/cfndsl_spec.rb
CHANGED
@@ -132,6 +132,11 @@ describe CfnDsl::CloudFormationTemplate do
|
|
132
132
|
expect(func.to_json).to eq('{"Fn::Join":["A",["B","C"]]}')
|
133
133
|
end
|
134
134
|
|
135
|
+
it 'FnSplit' do
|
136
|
+
func = subject.FnSplit('|', 'a|b|c')
|
137
|
+
expect(func.to_json).to eq('{"Fn::Split":["|","a|b|c"]}')
|
138
|
+
end
|
139
|
+
|
135
140
|
it 'Ref' do
|
136
141
|
ref = subject.Ref 'X'
|
137
142
|
expect(ref.to_json).to eq('{"Ref":"X"}')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cfndsl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Jack
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-01-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|