cloudformation-tool 1.5.11 → 1.5.13
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: 3f75b3fa01c1cfdf40a3122aa51178d591cd94b515dc2665e30693e2f599536a
|
4
|
+
data.tar.gz: 9a40860146bc044646b8427bbb9343e10309fdc0931a8145b5e96f363431f2dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e4c95847703f3fc2cb3e07fb82884fe697e9c9568e90d43a8883613383d0e2f12f1e143354db2bc1da53fe0da8bb01aed34a8d4e9abdb7487c9682bb405ccfb
|
7
|
+
data.tar.gz: d28a83a9a3a5c67fb640560e2e71fd82640b415188aa0098f3eb25fbd51f3eab06c31a4c116f3a876667fd7f549c3058da1ad9ec64840ceebe37faabf383ab02
|
@@ -19,7 +19,11 @@ module CloudFormationTool
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def delete
|
22
|
-
|
22
|
+
begin
|
23
|
+
awscf.delete_stack stack_name: @name
|
24
|
+
rescue Aws::Errors::MissingCredentialsError => e
|
25
|
+
raise CloudFormationTool::Errors::AuthError, e.message
|
26
|
+
end
|
23
27
|
end
|
24
28
|
|
25
29
|
def exist?
|
@@ -37,7 +41,7 @@ module CloudFormationTool
|
|
37
41
|
resp = awscf.update_stack({
|
38
42
|
stack_name: @name,
|
39
43
|
template_url: url,
|
40
|
-
capabilities: %w(CAPABILITY_IAM CAPABILITY_NAMED_IAM),
|
44
|
+
capabilities: %w(CAPABILITY_IAM CAPABILITY_NAMED_IAM CAPABILITY_AUTO_EXPAND),
|
41
45
|
parameters: params.collect do |k,v|
|
42
46
|
{
|
43
47
|
parameter_key: k.to_s,
|
@@ -59,7 +63,7 @@ module CloudFormationTool
|
|
59
63
|
resp = awscf.create_stack({
|
60
64
|
stack_name: @name,
|
61
65
|
template_url: url,
|
62
|
-
capabilities: %w(CAPABILITY_IAM CAPABILITY_NAMED_IAM),
|
66
|
+
capabilities: %w(CAPABILITY_IAM CAPABILITY_NAMED_IAM CAPABILITY_AUTO_EXPAND),
|
63
67
|
on_failure: "DO_NOTHING", ##"ROLLBACK",
|
64
68
|
parameters: params.collect do |k,v|
|
65
69
|
{
|
@@ -297,4 +301,4 @@ module CloudFormationTool
|
|
297
301
|
end
|
298
302
|
|
299
303
|
end
|
300
|
-
end
|
304
|
+
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.13
|
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-08-
|
11
|
+
date: 2023-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|