cloudformation-tool 1.5.12 → 1.5.14
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9db3672b97a22828e57d6c906a78831153a620bca1632f9f9748f72e27c9db7
|
4
|
+
data.tar.gz: ad0eca7cc6ae46eaf3b0a55c57fd8e85695a27b8c97f71e55492e0a95bd208d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0452d98f9e5426f6924cc8caf53430b8936fc9ac38187abda7ff9d780cf921330f0f85b592cab7be9b26918e3f54585892e61548e747721dfc46973ec64e04aa
|
7
|
+
data.tar.gz: 6d50f5dd121f968799fd5754a6f54726cd0c64925ce9bd79a27f4360ee710c65a914fc36f3d740536664c4ffc1c1a03b5f055c21848deb2e976900c3f2060dc1
|
@@ -41,7 +41,7 @@ module CloudFormationTool
|
|
41
41
|
resp = awscf.update_stack({
|
42
42
|
stack_name: @name,
|
43
43
|
template_url: url,
|
44
|
-
capabilities: %w(CAPABILITY_IAM CAPABILITY_NAMED_IAM),
|
44
|
+
capabilities: %w(CAPABILITY_IAM CAPABILITY_NAMED_IAM CAPABILITY_AUTO_EXPAND),
|
45
45
|
parameters: params.collect do |k,v|
|
46
46
|
{
|
47
47
|
parameter_key: k.to_s,
|
@@ -63,7 +63,7 @@ module CloudFormationTool
|
|
63
63
|
resp = awscf.create_stack({
|
64
64
|
stack_name: @name,
|
65
65
|
template_url: url,
|
66
|
-
capabilities: %w(CAPABILITY_IAM CAPABILITY_NAMED_IAM),
|
66
|
+
capabilities: %w(CAPABILITY_IAM CAPABILITY_NAMED_IAM CAPABILITY_AUTO_EXPAND),
|
67
67
|
on_failure: "DO_NOTHING", ##"ROLLBACK",
|
68
68
|
parameters: params.collect do |k,v|
|
69
69
|
{
|
@@ -301,4 +301,4 @@ module CloudFormationTool
|
|
301
301
|
end
|
302
302
|
|
303
303
|
end
|
304
|
-
end
|
304
|
+
end
|
@@ -121,17 +121,34 @@ module CloudFormationTool
|
|
121
121
|
end
|
122
122
|
end
|
123
123
|
else
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
124
|
+
case catdata
|
125
|
+
when Hash
|
126
|
+
# warn against duplicate entities, resources or outputs
|
127
|
+
(@data[category] ||= {}).keys.each do |key|
|
128
|
+
if catdata.has_key? key
|
129
|
+
raise CloudFormationTool::Errors::AppError, "Error compiling #{path} - duplicate '#{category}' item: #{key}"
|
130
|
+
end
|
131
|
+
end
|
132
|
+
catdata = fixrefs(catdata, rewrites)
|
133
|
+
# add included properties
|
134
|
+
@data[category].merge! catdata
|
135
|
+
when Array
|
136
|
+
if @data[category].nil?
|
137
|
+
@data[category] = catdata
|
138
|
+
elsif @data[category].is_a? Array
|
139
|
+
@data[category] += catdata
|
140
|
+
else
|
141
|
+
raise CloudFormationTool::Errors::AppError, "Error compiling #{path} - conflicting types for '#{category}'"
|
142
|
+
end
|
143
|
+
else
|
144
|
+
if @data[category].nil?
|
145
|
+
@data[category] = catdata
|
146
|
+
else
|
147
|
+
raise CloudFormationTool::Errors::AppError, "Error compiling #{path} - I do not know how to merge non-list non-dictionary '#{category}'!"
|
148
|
+
end
|
129
149
|
end
|
130
|
-
catdata = fixrefs(catdata, rewrites)
|
131
150
|
end
|
132
151
|
|
133
|
-
# add included properties
|
134
|
-
@data[category].merge! catdata
|
135
152
|
end
|
136
153
|
end
|
137
154
|
end
|
data/lib/cloud_formation_tool.rb
CHANGED
@@ -135,8 +135,16 @@ module CloudFormationTool
|
|
135
135
|
def s3_bucket_name(region)
|
136
136
|
name = nil
|
137
137
|
# see if we already have a cf-templates bucket for this region
|
138
|
-
bucket = awss3.list_buckets.buckets.select do |b|
|
139
|
-
|
138
|
+
bucket = awss3(region).list_buckets.buckets.select do |b|
|
139
|
+
b.name =~ /cf-templates-(\w+)-#{region}/
|
140
|
+
end.select do |b|
|
141
|
+
# S3 started showing us buckets that were deleted, and can't actually be accessible, so filter those
|
142
|
+
begin
|
143
|
+
Aws::S3::Bucket.new(b.name, client: awss3(region)).objects.first
|
144
|
+
true
|
145
|
+
rescue Aws::S3::Errors::NoSuchBucket => e
|
146
|
+
false
|
147
|
+
end
|
140
148
|
end.first
|
141
149
|
|
142
150
|
# otherwise try to create one
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloudformation-tool
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oded Arbel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|