Skip to content

Commit f3bbfc0

Browse files
committed
[AD] Fix a bug that was preventing the script 'update_directory_service_password.sh' from updating the AD password due to lack of permissions.
1 parent f4ef483 commit f3bbfc0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

cookbooks/aws-parallelcluster-environment/templates/directory_service/update_directory_service_password.sh.erb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@ echo "[INFO] Reading password from AWS: ${SECRET_ARN}"
2727
service=$(echo "${SECRET_ARN}" | cut -d ':' -f 3)
2828
resource=$(echo "${SECRET_ARN}" | cut -d ':' -f 6-)
2929
if [ "$service" == "secretsmanager" ]; then
30-
secret_name=$(echo "$resource" | cut -d ':' -f 2)
31-
echo "[INFO] Reading password as a secret from AWS Secrets Manager: ${secret_name}"
32-
password_from_secret_store=$(aws secretsmanager get-secret-value --secret-id "${secret_name}" --region "${REGION}" --query "SecretString" --output text)
30+
echo "[INFO] Reading password as a secret from AWS Secrets Manager: ${SECRET_ARN}"
31+
password_from_secret_store=$(aws secretsmanager get-secret-value --secret-id "${SECRET_ARN}" --region "${REGION}" --query "SecretString" --output text)
3332
elif [ "$service" == "ssm" ]; then
3433
parameter_name=$(echo "$resource" | cut -d '/' -f 2)
3534
echo "[INFO] Reading password as a parameter from AWS SSM: ${SECRET_ARN}"

0 commit comments

Comments
 (0)