tfoutputs 0.2.2 → 0.2.3
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
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: a167b409bed89d0e8e1f25ce485e5cd8c9f0563c4f16de6f79b3eb3ce236eb36
|
|
4
|
+
data.tar.gz: beb0aaa916a45a45e9d7abd84748fa6eec26a70b511b82d19065f87af663e7bc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5d7c2fbc5a96397a5e3924f4626e01f9afd8f410f7dcc50d58152c3b649e9338b189e7b8051c70862c6fd5c4e67663896096853ac5763232b6eca29921ff4697
|
|
7
|
+
data.tar.gz: 8dd3957346384f9cacf19eeeeb3d694b21e6a62b4ee166d74dcbf2cdfd13a03343c341fda7194d38b07590b9d0a29de41226d5fb58ae23d520197f5dbe6cde45
|
|
@@ -10,11 +10,21 @@ module TfOutputs
|
|
|
10
10
|
@bucket_name = options[:bucket_name]
|
|
11
11
|
@bucket_key = options[:bucket_key]
|
|
12
12
|
@bucket_region = options[:bucket_region]
|
|
13
|
+
@profile = options[:profile] ? options[:profile] : nil
|
|
13
14
|
end
|
|
14
15
|
|
|
15
16
|
def save
|
|
16
17
|
file = Tempfile.new('tf_state')
|
|
17
|
-
|
|
18
|
+
|
|
19
|
+
# Setup the base client config which must always have a bucket region
|
|
20
|
+
client_config = {region: @bucket_region}
|
|
21
|
+
# if a profile was supplied, then add that to the client config
|
|
22
|
+
if !@profile.nil?
|
|
23
|
+
client_config[:profile] = @profile
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# setup s3 client
|
|
27
|
+
s3 = Aws::S3::Client.new(client_config)
|
|
18
28
|
resp = s3.get_object bucket: @bucket_name, key: @bucket_key
|
|
19
29
|
file.write(resp.body.string)
|
|
20
30
|
file.rewind
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tfoutputs
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Edwards
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2018-06-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -152,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
152
152
|
version: '0'
|
|
153
153
|
requirements: []
|
|
154
154
|
rubyforge_project:
|
|
155
|
-
rubygems_version: 2.4
|
|
155
|
+
rubygems_version: 2.7.4
|
|
156
156
|
signing_key:
|
|
157
157
|
specification_version: 4
|
|
158
158
|
summary: Gem for grabbing variables from terraform
|