draw_cloud 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +22 -0
- data/lib/draw_cloud.rb +75 -0
- data/lib/draw_cloud/as_group.rb +104 -0
- data/lib/draw_cloud/as_group.rb~ +54 -0
- data/lib/draw_cloud/as_launch_configuration.rb +71 -0
- data/lib/draw_cloud/as_launch_configuration.rb~ +50 -0
- data/lib/draw_cloud/base.rb +264 -0
- data/lib/draw_cloud/base64_func.rb +30 -0
- data/lib/draw_cloud/configuration.rb +61 -0
- data/lib/draw_cloud/configuration.rb~ +64 -0
- data/lib/draw_cloud/ec2_instance.rb +141 -0
- data/lib/draw_cloud/ec2_instance.rb~ +78 -0
- data/lib/draw_cloud/ec2_instance_template.rb +29 -0
- data/lib/draw_cloud/ec2_instance_template.rb~ +36 -0
- data/lib/draw_cloud/elastic_ip.rb +97 -0
- data/lib/draw_cloud/elastic_ip.rb~ +19 -0
- data/lib/draw_cloud/get_att_func.rb +31 -0
- data/lib/draw_cloud/get_att_func.rb~ +19 -0
- data/lib/draw_cloud/iam_access_key.rb +53 -0
- data/lib/draw_cloud/iam_access_key.rb~ +43 -0
- data/lib/draw_cloud/iam_policy.rb +71 -0
- data/lib/draw_cloud/iam_policy.rb~ +41 -0
- data/lib/draw_cloud/iam_user.rb +53 -0
- data/lib/draw_cloud/iam_user.rb~ +44 -0
- data/lib/draw_cloud/internet_gateway.rb +66 -0
- data/lib/draw_cloud/join_func.rb +31 -0
- data/lib/draw_cloud/join_func.rb~ +24 -0
- data/lib/draw_cloud/locations.rb +25 -0
- data/lib/draw_cloud/locations.rb~ +53 -0
- data/lib/draw_cloud/map.rb +65 -0
- data/lib/draw_cloud/network_acl.rb +91 -0
- data/lib/draw_cloud/network_acl.rb~ +36 -0
- data/lib/draw_cloud/network_acl_entry.rb +110 -0
- data/lib/draw_cloud/network_acl_entry.rb~ +36 -0
- data/lib/draw_cloud/network_interface.rb +71 -0
- data/lib/draw_cloud/network_interface.rb~ +46 -0
- data/lib/draw_cloud/output.rb +38 -0
- data/lib/draw_cloud/output.rb~ +39 -0
- data/lib/draw_cloud/parameter.rb +58 -0
- data/lib/draw_cloud/parameter.rb~ +30 -0
- data/lib/draw_cloud/rds_instance.rb +117 -0
- data/lib/draw_cloud/rds_security_group.rb +57 -0
- data/lib/draw_cloud/route_table.rb +56 -0
- data/lib/draw_cloud/route_table_entry.rb +59 -0
- data/lib/draw_cloud/route_table_entry.rb~ +33 -0
- data/lib/draw_cloud/s3_bucket.rb~ +41 -0
- data/lib/draw_cloud/security_group.rb +85 -0
- data/lib/draw_cloud/security_group.rb~ +71 -0
- data/lib/draw_cloud/service.rb~ +75 -0
- data/lib/draw_cloud/simple_ref.rb +30 -0
- data/lib/draw_cloud/simple_ref.rb~ +17 -0
- data/lib/draw_cloud/sns_topic.rb +58 -0
- data/lib/draw_cloud/sns_topic.rb~ +39 -0
- data/lib/draw_cloud/subnet.rb +104 -0
- data/lib/draw_cloud/subnet.rb~ +56 -0
- data/lib/draw_cloud/utilities.rb +65 -0
- data/lib/draw_cloud/version.rb +3 -0
- data/lib/draw_cloud/vpc.rb +57 -0
- data/lib/draw_cloud/vpc.rb~ +55 -0
- data/lib/draw_cloud/wait_handle.rb +78 -0
- data/lib/draw_cloud/wait_handle.rb~ +10 -0
- metadata +195 -0
@@ -0,0 +1,78 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
#
|
3
|
+
# Copyright:: Copyright (c) 2012, SweetSpot Diabetes Care, Inc.
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License"); you
|
6
|
+
# may not use this work except in compliance with the License. You may
|
7
|
+
# obtain a copy of the License in the LICENSE file, or at:
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
14
|
+
# implied. See the License for the specific language governing
|
15
|
+
# permissions and limitations under the License.
|
16
|
+
|
17
|
+
#
|
18
|
+
|
19
|
+
module DrawCloud
|
20
|
+
class WaitHandle < Base
|
21
|
+
class WaitCondition
|
22
|
+
attr_accessor(:handle, :timeout, :count, :depends_on)
|
23
|
+
def initialize(handle, timeout, count, depends_on)
|
24
|
+
@handle = handle
|
25
|
+
@timeout = timeout
|
26
|
+
@count = count
|
27
|
+
@depends_on = depends_on
|
28
|
+
end
|
29
|
+
|
30
|
+
def resource_name
|
31
|
+
DrawCloud.resource_name(handle) + "Condition"
|
32
|
+
end
|
33
|
+
|
34
|
+
def to_h
|
35
|
+
h = {
|
36
|
+
"Type" => "AWS::CloudFormation::WaitCondition",
|
37
|
+
"Properties" => {
|
38
|
+
"Handle" => DrawCloud.ref(handle),
|
39
|
+
"Timeout" => timeout
|
40
|
+
}
|
41
|
+
}
|
42
|
+
h["DependsOn"] = DrawCloud.resource_name(depends_on) if depends_on
|
43
|
+
h["Properties"]["Count"] = count unless count.nil?
|
44
|
+
h
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
attr_accessor(:name, :timeout, :count)
|
49
|
+
def initialize(name, timeout=nil, options, &block)
|
50
|
+
@name = name
|
51
|
+
@timeout = timeout
|
52
|
+
super(options, &block)
|
53
|
+
end
|
54
|
+
|
55
|
+
def [](attribute)
|
56
|
+
fngetatt(condition, attribute)
|
57
|
+
end
|
58
|
+
|
59
|
+
def resource_name
|
60
|
+
resource_style(name) + "WaitHandle"
|
61
|
+
end
|
62
|
+
|
63
|
+
def condition
|
64
|
+
WaitCondition.new(self, timeout, count, depends_on)
|
65
|
+
end
|
66
|
+
|
67
|
+
def load_into_config(config)
|
68
|
+
config.cf_add_resource resource_name, self
|
69
|
+
config.cf_add_resource condition.resource_name, condition
|
70
|
+
super(config)
|
71
|
+
end
|
72
|
+
|
73
|
+
def to_h
|
74
|
+
# this class is a bit special - standard properties are added manually
|
75
|
+
{"Type" => "AWS::CloudFormation::WaitConditionHandle"}
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
metadata
ADDED
@@ -0,0 +1,195 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: draw_cloud
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- SweetSpot Diabetes
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-07-09 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: deep_merge
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: activesupport
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rake
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: rspec
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: simplecov
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
description: ! "drawcloud\n=========\n\nDraw AWS CloudFormation configurations in
|
95
|
+
Ruby\n\n\nCopyright and License\n=====================\n \nCopyright 2013 SweetSpot
|
96
|
+
Diabetes Care, Inc.\n \nLicensed under the Apache License, Version 2.0 (the \"License\");
|
97
|
+
you\nmay not use this work except in compliance with the License. You may\nobtain
|
98
|
+
a copy of the License in the LICENSE file, or at:\n \nhttp://www.apache.org/licenses/LICENSE-2.0\n
|
99
|
+
\nUnless required by applicable law or agreed to in writing, software\ndistributed
|
100
|
+
under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS
|
101
|
+
OF ANY KIND, either express or\nimplied. See the License for the specific language
|
102
|
+
governing\npermissions and limitations under the License.\n"
|
103
|
+
email:
|
104
|
+
- support@sweetspotdiabetes.com
|
105
|
+
executables: []
|
106
|
+
extensions: []
|
107
|
+
extra_rdoc_files: []
|
108
|
+
files:
|
109
|
+
- README.md
|
110
|
+
- lib/draw_cloud/as_group.rb
|
111
|
+
- lib/draw_cloud/as_group.rb~
|
112
|
+
- lib/draw_cloud/as_launch_configuration.rb
|
113
|
+
- lib/draw_cloud/as_launch_configuration.rb~
|
114
|
+
- lib/draw_cloud/base.rb
|
115
|
+
- lib/draw_cloud/base64_func.rb
|
116
|
+
- lib/draw_cloud/configuration.rb
|
117
|
+
- lib/draw_cloud/configuration.rb~
|
118
|
+
- lib/draw_cloud/ec2_instance.rb
|
119
|
+
- lib/draw_cloud/ec2_instance.rb~
|
120
|
+
- lib/draw_cloud/ec2_instance_template.rb
|
121
|
+
- lib/draw_cloud/ec2_instance_template.rb~
|
122
|
+
- lib/draw_cloud/elastic_ip.rb
|
123
|
+
- lib/draw_cloud/elastic_ip.rb~
|
124
|
+
- lib/draw_cloud/get_att_func.rb
|
125
|
+
- lib/draw_cloud/get_att_func.rb~
|
126
|
+
- lib/draw_cloud/iam_access_key.rb
|
127
|
+
- lib/draw_cloud/iam_access_key.rb~
|
128
|
+
- lib/draw_cloud/iam_policy.rb
|
129
|
+
- lib/draw_cloud/iam_policy.rb~
|
130
|
+
- lib/draw_cloud/iam_user.rb
|
131
|
+
- lib/draw_cloud/iam_user.rb~
|
132
|
+
- lib/draw_cloud/internet_gateway.rb
|
133
|
+
- lib/draw_cloud/join_func.rb
|
134
|
+
- lib/draw_cloud/join_func.rb~
|
135
|
+
- lib/draw_cloud/locations.rb
|
136
|
+
- lib/draw_cloud/locations.rb~
|
137
|
+
- lib/draw_cloud/map.rb
|
138
|
+
- lib/draw_cloud/network_acl.rb
|
139
|
+
- lib/draw_cloud/network_acl.rb~
|
140
|
+
- lib/draw_cloud/network_acl_entry.rb
|
141
|
+
- lib/draw_cloud/network_acl_entry.rb~
|
142
|
+
- lib/draw_cloud/network_interface.rb
|
143
|
+
- lib/draw_cloud/network_interface.rb~
|
144
|
+
- lib/draw_cloud/output.rb
|
145
|
+
- lib/draw_cloud/output.rb~
|
146
|
+
- lib/draw_cloud/parameter.rb
|
147
|
+
- lib/draw_cloud/parameter.rb~
|
148
|
+
- lib/draw_cloud/rds_instance.rb
|
149
|
+
- lib/draw_cloud/rds_security_group.rb
|
150
|
+
- lib/draw_cloud/route_table.rb
|
151
|
+
- lib/draw_cloud/route_table_entry.rb
|
152
|
+
- lib/draw_cloud/route_table_entry.rb~
|
153
|
+
- lib/draw_cloud/s3_bucket.rb~
|
154
|
+
- lib/draw_cloud/security_group.rb
|
155
|
+
- lib/draw_cloud/security_group.rb~
|
156
|
+
- lib/draw_cloud/service.rb~
|
157
|
+
- lib/draw_cloud/simple_ref.rb
|
158
|
+
- lib/draw_cloud/simple_ref.rb~
|
159
|
+
- lib/draw_cloud/sns_topic.rb
|
160
|
+
- lib/draw_cloud/sns_topic.rb~
|
161
|
+
- lib/draw_cloud/subnet.rb
|
162
|
+
- lib/draw_cloud/subnet.rb~
|
163
|
+
- lib/draw_cloud/utilities.rb
|
164
|
+
- lib/draw_cloud/version.rb
|
165
|
+
- lib/draw_cloud/vpc.rb
|
166
|
+
- lib/draw_cloud/vpc.rb~
|
167
|
+
- lib/draw_cloud/wait_handle.rb
|
168
|
+
- lib/draw_cloud/wait_handle.rb~
|
169
|
+
- lib/draw_cloud.rb
|
170
|
+
homepage: https://github.com/sweetspot/draw_cloud
|
171
|
+
licenses:
|
172
|
+
- APL 2.0
|
173
|
+
post_install_message:
|
174
|
+
rdoc_options: []
|
175
|
+
require_paths:
|
176
|
+
- lib
|
177
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
178
|
+
none: false
|
179
|
+
requirements:
|
180
|
+
- - ! '>='
|
181
|
+
- !ruby/object:Gem::Version
|
182
|
+
version: 1.9.2
|
183
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
184
|
+
none: false
|
185
|
+
requirements:
|
186
|
+
- - ! '>='
|
187
|
+
- !ruby/object:Gem::Version
|
188
|
+
version: 1.3.6
|
189
|
+
requirements: []
|
190
|
+
rubyforge_project:
|
191
|
+
rubygems_version: 1.8.23
|
192
|
+
signing_key:
|
193
|
+
specification_version: 3
|
194
|
+
summary: Create AWS CloudFormation configurations using a Ruby DSL
|
195
|
+
test_files: []
|