Sha256: 38137ceea9ab7a072d6012c10957f45380d092f6969d7276afc97348b76e5071

Contents?: true

Size: 760 Bytes

Versions: 4

Compression:

Stored size: 760 Bytes

Contents

module QasDockGem
        class AwsServices
            def credentials_aws(access_key_id, secret_access_key_id, region)
                {
                    access_key_id: access_key_id,
                    secret_access_key: secret_access_key_id,
                    region: region
                }
            end
        
            def init_secrets_manager(credentials)
                require "aws-sdk-secretsmanager"
                Aws::SecretsManager::Client.new(credentials)
            end
        
            def get_sm_secret_value(credentials, secret_name)
                secret = init_secrets_manager(credentials).get_secret_value(secret_id: "#{secret_name}")
                JSON.parse(secret.secret_string)
            end
        end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
qas_dock_gem-0.1.29 lib/qas_dock_gem/services/aws_services.rb
qas_dock_gem-0.1.28 lib/qas_dock_gem/services/aws_services.rb
qas_dock_gem-0.1.27 lib/qas_dock_gem/services/aws_services.rb
qas_dock_gem-0.1.26 lib/qas_dock_gem/services/aws_services.rb