Enforce JSON output format for aws command

This commit is contained in:
Ali Ismayilov
2025-04-02 18:12:14 +02:00
parent 8fe2f92164
commit 0b28a54518
2 changed files with 6 additions and 5 deletions

View File

@@ -26,6 +26,7 @@ class Kamal::Secrets::Adapters::AwsSecretsManager < Kamal::Secrets::Adapters::Ba
def get_from_secrets_manager(secrets, account: nil)
args = [ "aws", "secretsmanager", "batch-get-secret-value", "--secret-id-list" ] + secrets.map(&:shellescape)
args += [ "--profile", account.shellescape ] if account
args += [ "--output", "json" ]
cmd = args.join(" ")
`#{cmd}`.tap do |secrets|