uc3-dmp-api-core 0.0.18 → 0.0.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/uc3-dmp-api-core/ssm_reader.rb +3 -3
- data/lib/uc3-dmp-api-core/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ce7df10e928100fae5b672089be84d873cf758ecac695c9c571abb0ab02a407
|
4
|
+
data.tar.gz: 93dc08eb6b46eefbe86c236edcd273679eadffad2e7283f59016d2ffbbc25ee6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f312834841be19dd00700c2be8b9627f8c68321a8264733af87a87bec0e2863b857591c51e5489a26aabdbfbf236213d79511ac1d3294c87abf28d4876655de
|
7
|
+
data.tar.gz: 15c9bd557334bbaf9338ec1e2fd2904522f728d30ffeac6a2c6d498fce5620ce22fc92ebb11eac2e9e8b3e620d4632ff898f973c02be5a1d66c14aefd1be8159
|
@@ -29,7 +29,7 @@ module Uc3DmpApiCore
|
|
29
29
|
# Swap in the provenance name if applicable
|
30
30
|
key_vals[:provenance] = provenance_name unless provenance_name.nil? ||
|
31
31
|
!full_key.include?('%{provenance}')
|
32
|
-
fetch_value(key: format(full_key, key_vals))
|
32
|
+
fetch_value(key: format(full_key, key_vals, logger: logger))
|
33
33
|
rescue Aws::Errors::ServiceError => e
|
34
34
|
puts "Fatal error in #{SOURCE} - #{e.message}" if logger.nil?
|
35
35
|
logger.error(message: "Looking for SSM Key: #{key} - #{e.message}", details: e.backtrace) unless logger.nil?
|
@@ -38,9 +38,9 @@ module Uc3DmpApiCore
|
|
38
38
|
# rubocop:enable Metrics/AbcSize
|
39
39
|
|
40
40
|
# Call SSM to get the value for the specified key
|
41
|
-
def fetch_value(key:, logger:)
|
41
|
+
def fetch_value(key:, logger: nil)
|
42
42
|
resp = Aws::SSM::Client.new.get_parameter(name: key, with_decryption: true)
|
43
|
-
logger.debug(message: "Searching for SSM Key: #{key}, Found: '#{resp&.parameter&.value}'")
|
43
|
+
logger.debug(message: "Searching for SSM Key: #{key}, Found: '#{resp&.parameter&.value}'") unless logger.nil?
|
44
44
|
resp.nil? || resp.parameter.nil? ? nil : resp.parameter.value
|
45
45
|
end
|
46
46
|
|