2 min read
Some times we need to generate a quoted comma separated list of strings out of a variable that is list of strings, for example, to generate an IAM policy like this one:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"secretsmanager:GetResourcePolicy",
"secretsmanager:GetSecretValue",
"secretsmanager:DescribeSecret",
"secretsmanager:ListSecretVersionIds"
],
"Resource": [ "arn:aws:secretsmanager:...", "arn:aws:secretsmanager:.." ]
}
]
}
03/11/2021
Read more...