Skip to content

Commit

Permalink
Get parameter value with decryption
Browse files Browse the repository at this point in the history
  • Loading branch information
Nigel Gibbs authored and mpucholblasco committed Apr 26, 2018
1 parent 976a32b commit ef99ee7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/hiera/backend/aws_parameter_store_backend.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ def read_parameters_from_aws_parameter_store()
})
resp.parameters.each do |parameter|
Hiera.debug("Found paramenter: #{parameter}")
Aws_parameter_store_backend.add_parameter_to_hash(parameter.name[prefix.length..-1], "test_value", parameters)
presp = client.get_parameter({
name: parameter.name,
with_decryption: true,
})
Aws_parameter_store_backend.add_parameter_to_hash(parameter.name[prefix.length..-1], presp.parameter.value, parameters)
end
next_token = resp.next_token
break unless next_token
Expand Down

0 comments on commit ef99ee7

Please sign in to comment.