cloudformation-ruby-dsl 1.4.3 → 1.4.5
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: deac34a448639ee067b89c896ebf7dfc468e2b8b
|
4
|
+
data.tar.gz: e97d281442a58b6afe721f9b4f080bc2da13d739
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: adeb8b93a2549348a4fddea6947eec68d684ce73e82e570bd17093f7da21f958a4cbc3bcc55baa7792a53977203395568a4240e2b4c8862bdc61c7c4473b29f3
|
7
|
+
data.tar.gz: d687713a78d7f47cff160da9d3613a2994bcc9bc803e5202b0db5ac3b4a786b19066f464d29b074d83daccd715e7d2bab79c2777d5d21a414ab11c65cea2a8db
|
data/examples/simple_template.rb
CHANGED
@@ -3,8 +3,19 @@ require 'bundler/setup'
|
|
3
3
|
require 'cloudformation-ruby-dsl/cfntemplate'
|
4
4
|
|
5
5
|
tmpl = template do
|
6
|
-
@stack_name =
|
7
|
-
|
6
|
+
@stack_name = 'hello-bucket-example'
|
7
|
+
|
8
|
+
parameter 'Label',
|
9
|
+
:Description => 'The label to apply to the bucket.',
|
10
|
+
:Type => 'String',
|
11
|
+
:Default => 'cfnrdsl',
|
12
|
+
:UsePreviousValue => true
|
13
|
+
|
14
|
+
resource "HelloBucket",
|
15
|
+
:Type => 'AWS::S3::Bucket',
|
16
|
+
:Properties => {
|
17
|
+
:BucketName => ref('Label')
|
18
|
+
}
|
8
19
|
end
|
9
20
|
|
10
21
|
tmpl.exec!
|
@@ -286,7 +286,11 @@ template.rb create --stack-name my_stack --parameters "BucketName=bucket-s3-stat
|
|
286
286
|
|
287
287
|
# Sort the parameter strings alphabetically to make them easily comparable
|
288
288
|
old_parameters_string = old_parameters.sort.map { |key, value| %Q(PARAMETER "#{key}=#{value}"\n) }.join
|
289
|
-
parameters_string = template.parameters.sort.map
|
289
|
+
parameters_string = template.parameters.sort.map do |key, value|
|
290
|
+
value = old_parameters[key] if value.empty? && value.use_previous_value && !old_parameters[key].to_s.empty?
|
291
|
+
value = value.default if value.empty? && !value.default.to_s.empty?
|
292
|
+
"PARAMETER \"#{key}=#{value}\"\n"
|
293
|
+
end.join
|
290
294
|
|
291
295
|
# set default diff options
|
292
296
|
Diffy::Diff.default_options.merge!(
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloudformation-ruby-dsl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shawn Smith
|
@@ -15,7 +15,7 @@ authors:
|
|
15
15
|
autorequire:
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
|
-
date: 2017-
|
18
|
+
date: 2017-03-16 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: detabulator
|