diff options
-rw-r--r-- | lib/chef/secret_fetcher/aws_secrets_manager.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/chef/secret_fetcher/aws_secrets_manager.rb b/lib/chef/secret_fetcher/aws_secrets_manager.rb index 0dfb99b023..f5508cf59b 100644 --- a/lib/chef/secret_fetcher/aws_secrets_manager.rb +++ b/lib/chef/secret_fetcher/aws_secrets_manager.rb @@ -50,7 +50,9 @@ class Chef # @param identifier [String] the secret_id # @return Aws::SecretsManager::Types::GetSecretValueResponse def do_fetch(identifier) - client.get_secret_value(secret_id: identifier) + result = client.get_secret_value(secret_id: identifier) + # These fields are mutually exclusive + result.secret_string || result.secret_binary end def client |