I write a policy that allows specific actions on secrets starts with the word project1
. How can I add another condition for example project2
to this policy?
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"secretsmanager:*"
],
"Effect": "Allow",
"Resource": "*",
"Condition": {
"StringLike": {
"secretsmanager:Name": "project1-*"
}
}
},
{
"Action": [
"secretsmanager:GetSecretValue",
"secretsmanager:DescribeSecret",
"secretsmanager:GetResourcePolicy",
"secretsmanager:DeleteSecret",
"secretsmanager:PutSecretValue"
],
"Effect": "Allow",
"Resource": "*",
"Condition": {
"StringLike": {
"secretsmanager:SecretId": "arn:aws:secretsmanager:${aws_region}:${aws_account_id}:secret:project1-*"
}
}
}
]
}