Commit 9c57957d authored by Matt Wise's avatar Matt Wise
Browse files

unescape json from elastic secret using sed so that jq can parse it

parent 7572671a
Pipeline #72232 passed with stage
in 10 seconds
......@@ -31,7 +31,7 @@
export AWS_COGNITO_USER_POOL_ID=$(aws ssm get-parameter --name /osdu/${RESOURCE_PREFIX}/cognito-user-pool-id --query Parameter.Value --output text --region $AWS_REGION);
export ELASTIC_HOST=$(aws ssm get-parameter --name /osdu/${RESOURCE_PREFIX}/elasticsearch/end-point --query Parameter.Value --output text --region $AWS_REGION);
export ELASTIC_SECRET_STRING=$(aws secretsmanager get-secret-value --secret-id /osdu/${RESOURCE_PREFIX}/elasticsearch/credentials --query SecretString --output json --region $AWS_REGION);
export ELASTIC_SECRET_STRING=$(aws secretsmanager get-secret-value --secret-id /osdu/${RESOURCE_PREFIX}/elasticsearch/credentials --query SecretString --output json --region $AWS_REGION | sed -e 's/\\\"/\"/g' -e 's/^.//g' -e 's/.$//g');
export ELASTIC_USER_NAME=$(echo $ELASTIC_SECRET_STRING | jq -r '.username');
export ELASTIC_PASSWORD=$(echo $ELASTIC_SECRET_STRING | jq -r '.password');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment