cfndsl 0.7.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/cfndsl/aws/types.yaml +18 -0
- data/lib/cfndsl/conditions.rb +2 -4
- data/lib/cfndsl/creation_policy.rb +2 -4
- data/lib/cfndsl/json_serialisable_object.rb +12 -0
- data/lib/cfndsl/jsonable.rb +13 -4
- data/lib/cfndsl/mappings.rb +2 -4
- data/lib/cfndsl/metadata.rb +2 -4
- data/lib/cfndsl/properties.rb +3 -4
- data/lib/cfndsl/update_policy.rb +3 -4
- data/lib/cfndsl/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YWZmZjY5YzJjYTMwYzgyMGI4ODViNGViNTNiNjUxMWYwMzZmZTI3Nw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YjM0NDk0NzYxY2IzODc4NDdhMDJjYWJkMzUyZWU1OWJiOTJkMTc4Yw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MzM4Y2YwNzczMWYxNTA5NWRmYzI4ODFkMTNjOWNmMjkzNWY4M2MzZjllMmU4
|
10
|
+
ZjYwZTMwODE4YmFkODZlYjJmOWU5OWY0Njc5OThmZjkyZmIyNjQ2OTY2ZjY3
|
11
|
+
YjA2MDM5M2MyYjI5ZWI5NzM0Mzc4ODE1OWIwMGM4OGVlMjNiMzc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YjgwNzk4MmU5MTAyOWIxNTc4OGE1YzU1MzVmMGEwYzNjZGVlMWRiNTI5MDdm
|
14
|
+
MjhjOTJmMjc3YzhjNGExMWMyN2IyZDA5MWNiMWRhZTIyMzljZDg0NTk0NzAw
|
15
|
+
MWM2MDZlN2E2ZmEwMDAzODNkMTdkY2MzM2IzY2FlMTkzZTc1NjU=
|
data/lib/cfndsl/aws/types.yaml
CHANGED
@@ -482,6 +482,15 @@ Resources:
|
|
482
482
|
ElasticsearchClusterConfig: ElasticsearchClusterConfig
|
483
483
|
SnapshotOptions: SnapshotOptions
|
484
484
|
Tags: [ EC2Tag ]
|
485
|
+
"AWS::Events::Rule" :
|
486
|
+
Properties:
|
487
|
+
Description: String
|
488
|
+
EventPattern: JSON
|
489
|
+
Name: String
|
490
|
+
RoleArn: String
|
491
|
+
SchduleExpression: String
|
492
|
+
State: String
|
493
|
+
Targets: [ EventsRuleTarget ]
|
485
494
|
"AWS::IAM::AccessKey" :
|
486
495
|
Properties:
|
487
496
|
Serial: Integer
|
@@ -751,6 +760,7 @@ Resources:
|
|
751
760
|
"AWS::Route53::HealthCheck" :
|
752
761
|
Properties:
|
753
762
|
HealthCheckConfig: Route53HealthCheckConfig
|
763
|
+
HealthCheckTags: [ Route53HealthCheckTags ]
|
754
764
|
"AWS::Route53::RecordSet" :
|
755
765
|
Properties:
|
756
766
|
HostedZoneId: String
|
@@ -1085,6 +1095,9 @@ Types:
|
|
1085
1095
|
ResourcePath: String
|
1086
1096
|
SearchString: String
|
1087
1097
|
Type: String
|
1098
|
+
Route53HealthCheckTags:
|
1099
|
+
Key: String
|
1100
|
+
Value: String
|
1088
1101
|
VpcSettings:
|
1089
1102
|
SubnetIds: [ String ]
|
1090
1103
|
VpcId: String
|
@@ -1212,3 +1225,8 @@ Types:
|
|
1212
1225
|
VpcConfig:
|
1213
1226
|
SecurityGroupIds: [ String ]
|
1214
1227
|
SubnetIds: [ String ]
|
1228
|
+
EventsRuleTarget:
|
1229
|
+
Arn: String
|
1230
|
+
Id: String
|
1231
|
+
Input: String
|
1232
|
+
InputPath: String
|
data/lib/cfndsl/conditions.rb
CHANGED
@@ -6,12 +6,10 @@ module CfnDsl
|
|
6
6
|
# Usage:
|
7
7
|
# Condition :ConditionName, FnEqual(Ref(:ParameterName), 'helloworld')
|
8
8
|
class ConditionDefinition < JSONable
|
9
|
+
include JSONSerialisableObject
|
10
|
+
|
9
11
|
def initialize(value)
|
10
12
|
@value = value
|
11
13
|
end
|
12
|
-
|
13
|
-
def to_json(*a)
|
14
|
-
@value.to_json(*a)
|
15
|
-
end
|
16
14
|
end
|
17
15
|
end
|
@@ -8,14 +8,12 @@ module CfnDsl
|
|
8
8
|
# CreationPolicy('ResourceSignal', { 'Count' => 1, 'Timeout' => 'PT10M' })
|
9
9
|
# }
|
10
10
|
class CreationPolicyDefinition < JSONable
|
11
|
+
include JSONSerialisableObject
|
12
|
+
|
11
13
|
attr_reader :value
|
12
14
|
|
13
15
|
def initialize(value)
|
14
16
|
@value = value
|
15
17
|
end
|
16
|
-
|
17
|
-
def to_json(*a)
|
18
|
-
@value.to_json(*a)
|
19
|
-
end
|
20
18
|
end
|
21
19
|
end
|
data/lib/cfndsl/jsonable.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'cfndsl/errors'
|
2
2
|
require 'cfndsl/ref_check'
|
3
|
+
require 'cfndsl/json_serialisable_object'
|
3
4
|
|
4
5
|
module CfnDsl
|
5
6
|
# These functions are available anywhere inside
|
@@ -134,7 +135,7 @@ module CfnDsl
|
|
134
135
|
# variables that begin with a single underscore are elided.
|
135
136
|
# Instance variables that begin with two underscores have one of
|
136
137
|
# them removed.
|
137
|
-
def
|
138
|
+
def as_json(_options = {})
|
138
139
|
hash = {}
|
139
140
|
instance_variables.each do |var|
|
140
141
|
name = var[1..-1]
|
@@ -149,7 +150,11 @@ module CfnDsl
|
|
149
150
|
|
150
151
|
hash[name] = instance_variable_get(var) if name
|
151
152
|
end
|
152
|
-
hash
|
153
|
+
hash
|
154
|
+
end
|
155
|
+
|
156
|
+
def to_json(*a)
|
157
|
+
as_json.to_json(*a)
|
153
158
|
end
|
154
159
|
|
155
160
|
def ref_children
|
@@ -186,10 +191,14 @@ module CfnDsl
|
|
186
191
|
@_refs = refs
|
187
192
|
end
|
188
193
|
|
189
|
-
def
|
194
|
+
def as_json(_options = {})
|
190
195
|
hash = {}
|
191
196
|
hash["Fn::#{@function}"] = @argument
|
192
|
-
hash
|
197
|
+
hash
|
198
|
+
end
|
199
|
+
|
200
|
+
def to_json(*a)
|
201
|
+
as_json.to_json(*a)
|
193
202
|
end
|
194
203
|
|
195
204
|
def references
|
data/lib/cfndsl/mappings.rb
CHANGED
@@ -12,12 +12,10 @@ module CfnDsl
|
|
12
12
|
# "ap-northeast-1" => { "32" => "ami-9c03a89d", "64" => "ami-a003a8a1" }
|
13
13
|
# })
|
14
14
|
class MappingDefinition < JSONable
|
15
|
+
include JSONSerialisableObject
|
16
|
+
|
15
17
|
def initialize(value)
|
16
18
|
@value = value
|
17
19
|
end
|
18
|
-
|
19
|
-
def to_json(*a)
|
20
|
-
@value.to_json(*a)
|
21
|
-
end
|
22
20
|
end
|
23
21
|
end
|
data/lib/cfndsl/metadata.rb
CHANGED
@@ -3,14 +3,12 @@ require 'cfndsl/jsonable'
|
|
3
3
|
module CfnDsl
|
4
4
|
# Handles Metadata objects
|
5
5
|
class MetadataDefinition < JSONable
|
6
|
+
include JSONSerialisableObject
|
7
|
+
|
6
8
|
attr_reader :value
|
7
9
|
|
8
10
|
def initialize(value)
|
9
11
|
@value = value
|
10
12
|
end
|
11
|
-
|
12
|
-
def to_json(*a)
|
13
|
-
@value.to_json(*a)
|
14
|
-
end
|
15
13
|
end
|
16
14
|
end
|
data/lib/cfndsl/properties.rb
CHANGED
data/lib/cfndsl/update_policy.rb
CHANGED
@@ -13,13 +13,12 @@ module CfnDsl
|
|
13
13
|
# }
|
14
14
|
#
|
15
15
|
class UpdatePolicyDefinition < JSONable
|
16
|
+
include JSONSerialisableObject
|
17
|
+
|
16
18
|
attr_reader :value
|
19
|
+
|
17
20
|
def initialize(value)
|
18
21
|
@value = value
|
19
22
|
end
|
20
|
-
|
21
|
-
def to_json(*a)
|
22
|
-
@value.to_json(*a)
|
23
|
-
end
|
24
23
|
end
|
25
24
|
end
|
data/lib/cfndsl/version.rb
CHANGED
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.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Jack
|
@@ -52,6 +52,7 @@ files:
|
|
52
52
|
- lib/cfndsl/errors.rb
|
53
53
|
- lib/cfndsl/external_parameters.rb
|
54
54
|
- lib/cfndsl/generate_types.rb
|
55
|
+
- lib/cfndsl/json_serialisable_object.rb
|
55
56
|
- lib/cfndsl/jsonable.rb
|
56
57
|
- lib/cfndsl/mappings.rb
|
57
58
|
- lib/cfndsl/metadata.rb
|