cfndsl 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NjQxMWU0YTZhNjg1ZGRlNzYwYTZhZWJjOWJhMDkwYmYxN2U4MWFmOQ==
4
+ YjUyZmQ3NTFiZGNjN2YyODBhMGMwZmVkNWU1MDI1MzYzMTg2YzRlNA==
5
5
  data.tar.gz: !binary |-
6
- ZTk2MjdlMGI3YWUzZjFkMTYzZTYwZTA1ZjNlZTJjNjMyMDY5YWM5OQ==
6
+ MDQyZmE0ZjVmY2M5YmE0YzZmNTQwNTIzNTE3ZmI1NDE5Y2M4ZGE5ZQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YWQ1MWMzNGYyN2RjNmM1OGM4YjkxMTcxODJiMTBkMWIzZDhlYTUzOGJjZmMw
10
- MThmZmI4OTQ5YTQ3MjQ5M2JiMjZlNjU3NjMzYmMyZTYxYzc4M2ViODI5ZDFi
11
- MWYzNzRjNzMzYjNiODk1ZGRkMDg1OWM5MTkzNzgwYTU1Y2FmMzY=
9
+ ZThkYjJiNGI5YjE3YTQzNmQ1MzMxNDQ3YzYzMWRhZGRmNTliMmJkZTA2YTMx
10
+ ZTI1NjcxYWJkZWYxOTI4ZWU0NjVhMzc3NThiOWQzODZlMzdlZjI3NWM5Njg0
11
+ YWM0YzFiNzRmOGYyNzUwOGI2Y2QzNGE4MDA1ZWU2MmRjZGVjN2E=
12
12
  data.tar.gz: !binary |-
13
- YmRmZGIxYWY0ZjFlMTI4ZGJlN2Y3ZDY1MGRmYzliZDI3MDIwZDBhYTY3ZTQx
14
- NWRkZTkxNzY4MGRjMjcxMDI2NjA5MmIxNmQ5MzIwN2ZlMGEwNWM2NWQ0Njc3
15
- ODcxNTM4YTRkN2QxY2JkNmQ1MzlkZWRkNTMxMjQ2YjgxMDQwM2U=
13
+ Y2E0YWUyOWMzNTM2ODkwODE1ZWMxN2YwZjQ0MzgzNTlkNzI3NjRiNTc2Y2Jm
14
+ YzRiNDhhZjgzMjIwOWJjNDZmZGE5MjUwY2NiMDZmZTFmYTFjMDNkNzNiOWI1
15
+ YmJiZTM1MDNiYmRlZjJmYTM1OWY4MjUyNTllZDg0NWRiZTU4MGE=
@@ -33,6 +33,15 @@ Resources:
33
33
  SecurityGroups: [ String ]
34
34
  SpotPrice: String
35
35
  UserData: String
36
+ "AWS::AutoScaling::LifecycleHook" :
37
+ Properties:
38
+ AutoScalingGroupName : String
39
+ DefaultResult : String
40
+ HeartbeatTimeout : Integer
41
+ LifecycleTransition : String
42
+ NotificationMetadata : String
43
+ NotificationTargetARN : String
44
+ RoleARN : String
36
45
  "AWS::AutoScaling::ScalingPolicy" :
37
46
  Properties:
38
47
  AdjustmentType: String
@@ -284,6 +293,37 @@ Resources:
284
293
  InternetGatewayId: String
285
294
  VpcId: String
286
295
  VpnGatewayId: String
296
+ "AWS::EC2::VPCPeeringConnection" :
297
+ Properties:
298
+ PeerVpcId : String
299
+ Tags : [ EC2Tag ]
300
+ VpcId : String
301
+ "AWS::EC2::VPNGateway" :
302
+ Properties:
303
+ Type : String
304
+ Tags : [ EC2Tag ]
305
+ "AWS::EC2::VPNGatewayConnection" :
306
+ Properties:
307
+ Type : String
308
+ CustomerGatewayId : String
309
+ StaticRoutesOnly : Boolean
310
+ Tags : [ EC2Tag ]
311
+ VpnGatewayId : String
312
+ "AWS::EC2::VPNConnection" :
313
+ Properties:
314
+ Type : String
315
+ CustomerGatewayId : String
316
+ StaticRoutesOnly : Boolean
317
+ Tags : [ EC2Tag ]
318
+ VpnGatewayId : String
319
+ "AWS::EC2::VPNConnectionRoute" :
320
+ Properties:
321
+ DestinationCidrBlock : String
322
+ VpnConnectionId : String
323
+ "AWS::EC2::VPNGatewayRoutePropagation" :
324
+ Properties:
325
+ RouteTableIds : [ String ]
326
+ VpnGatewayId : String
287
327
  "AWS::ElastiCache::CacheCluster" :
288
328
  Properties:
289
329
  AutoMinorVersionUpgrade: Boolean
@@ -1,3 +1,3 @@
1
1
  module CfnDsl
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
@@ -0,0 +1,97 @@
1
+ require 'cfndsl'
2
+
3
+ CloudFormation {
4
+ Description "Creates an AWS VPC with a couple of subnets."
5
+
6
+ Parameter("VPNAddress") {
7
+ Type "String"
8
+ Description "IP Address range for your existing infrastructure"
9
+ MinLength "9"
10
+ MaxLength "18"
11
+ AllowedPattern "(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})/(\\d{1,2})"
12
+ ConstraintDescription "must be a valid IP CIDR range of the form x.x.x.x/x."
13
+ }
14
+
15
+ Parameter("RouterIPAddress") {
16
+ Type "String"
17
+ Description "IP Address of your VPN device"
18
+ MinLength "7"
19
+ MaxLength "15"
20
+ AllowedPattern "(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})"
21
+ ConstraintDescription "must be a valid IP address of the form x.x.x.x"
22
+ }
23
+
24
+ VPC(:VPC) {
25
+ EnableDnsSupport true
26
+ EnableDnsHostnames true
27
+ CidrBlock "10.1.0.0/16"
28
+ addTag("Name", "Test VPC")
29
+ }
30
+
31
+ InternetGateway(:InternetGateway) {
32
+ addTag("Name", "Test VPC Gateway")
33
+ }
34
+
35
+ VPCGatewayAttachment(:GatewayToInternet) {
36
+ VpcId Ref(:VPC)
37
+ InternetGatewayId Ref(:InternetGateway)
38
+ }
39
+
40
+ 10.times do |i|
41
+ subnet = "subnet#{i}"
42
+ route_table = subnet + "RouteTable"
43
+ route_table_assoc = route_table + "Assoc"
44
+
45
+ Subnet(subnet) {
46
+ VpcId Ref(:VPC)
47
+ CidrBlock "10.1.#{i}.0/24"
48
+ addTag("Name", "test vpc #{subnet}")
49
+ }
50
+
51
+ RouteTable(route_table) {
52
+ VpcId Ref(:VPC)
53
+ addTag("Name", route_table)
54
+ }
55
+
56
+ SubnetRouteTableAssociation(route_table_assoc) {
57
+ SubnetId Ref(subnet)
58
+ RouteTableId Ref(route_table)
59
+ }
60
+
61
+ Route(subnet + "GatewayRoute" ) {
62
+ DependsOn :GatewayToInternet
63
+ RouteTableId Ref(route_table)
64
+ DestinationCidrBlock "0.0.0.0/0"
65
+ GatewayId Ref(:InternetGateway)
66
+ }
67
+ end
68
+
69
+ VPNGateway(:VirtualPrivateNetworkGateway) {
70
+ Type "ipsec.1"
71
+ addTag("Name", "Test VPN Gateway")
72
+ }
73
+
74
+ VPCGatewayAttachment(:VPNGatewayAttachment) {
75
+ VpcId Ref(:VPC)
76
+ VpnGatewayId Ref(:VirtualPrivateNetworkGateway)
77
+ }
78
+
79
+ CustomerGateway(:CustomerVPNGateway) {
80
+ Type "ipsec.1"
81
+ BgpAsn "65000"
82
+ IpAddress Ref("RouterIPAddress")
83
+ addTag("Name", "Test Customer VPN Gateway")
84
+ }
85
+
86
+ VPNConnection(:VPNConnection) {
87
+ Type "ipsec.1"
88
+ StaticRoutesOnly "true"
89
+ CustomerGatewayId Ref(:CustomerVPNGateway)
90
+ VpnGatewayId Ref(:VirtualPrivateNetworkGateway)
91
+ }
92
+
93
+ VPNConnectionRoute(:VPNConnectionRoute) {
94
+ VpnConnectionId Ref(:VPNConnection)
95
+ DestinationCidrBlock Ref("VPNAddress")
96
+ }
97
+ }
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.2.2
4
+ version: 0.2.3
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: 2015-08-10 00:00:00.000000000 Z
12
+ date: 2015-08-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -72,6 +72,7 @@ files:
72
72
  - sample/t1.rb
73
73
  - sample/t1.yaml
74
74
  - sample/vpc-example.rb
75
+ - sample/vpc-with-vpn-example.rb
75
76
  - spec/cfndsl_spec.rb
76
77
  - spec/fixtures/heattest.rb
77
78
  - spec/fixtures/test.rb