I created a secret using cloudformation template and keep it inside a variable.
AUTH_AWS_SECRET_DEV=$(aws secretsmanager get-secret-value --region $AWS_DEFAULT_REGION --secret-id "sample_auth_aws_secret" --output text)
The output of this reference variable I am getting is
arn:aws:secretsmanager:us-east-1:56875858585:secret:sample_auth_aws_secret-yfw3B2 2022-02-23T15:13:14.166000+00:00 sample_auth_aws_secret {"clientId":"sample123","secret":"wjwjwjwjwjwjwjsjsjsj"} a62a2e90-c2dc-4936-82a1-014c72ac62e5 VERSIONSTAGES AWSCURRENT
I need to run aws create secret commands using bash scripts so that it will create the same secrets in aws another account.
The command example as per the aws doc is
aws secretsmanager create-secret \
--name sample_auth_aws_secret \
--description "My test secret created with the CLI." \
--secret-string "{\"clientId\":\"sample123\",\"secret\":\"wjwjwjwjwjwjwjsjsjsj\"}"
How can I take these required values from that reference variable dynamically in bash script?

