fix: fixed awsv4 env var interpolation issue

This commit is contained in:
Anoop M D 2024-02-24 00:47:28 +05:30
parent 064281d438
commit a4b13d5c2a
2 changed files with 13 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@usebruno/cli",
"version": "1.9.1",
"version": "1.9.2",
"license": "MIT",
"main": "src/index.js",
"bin": {

View File

@ -192,6 +192,18 @@ const runSingleRequest = async function (
const axiosInstance = makeAxiosInstance();
if (request.awsv4config) {
// todo: make this happen in prepare-request.js
// interpolate the aws v4 config
request.awsv4config.accessKeyId = interpolateString(request.awsv4config.accessKeyId, interpolationOptions);
request.awsv4config.secretAccessKey = interpolateString(
request.awsv4config.secretAccessKey,
interpolationOptions
);
request.awsv4config.sessionToken = interpolateString(request.awsv4config.sessionToken, interpolationOptions);
request.awsv4config.service = interpolateString(request.awsv4config.service, interpolationOptions);
request.awsv4config.region = interpolateString(request.awsv4config.region, interpolationOptions);
request.awsv4config.profileName = interpolateString(request.awsv4config.profileName, interpolationOptions);
request.awsv4config = await resolveAwsV4Credentials(request);
addAwsV4Interceptor(axiosInstance, request);
delete request.awsv4config;