97 lines
2.2 KiB
JSON
97 lines
2.2 KiB
JSON
{
|
|
"Version": "2012-10-17",
|
|
"Statement": [
|
|
{
|
|
"Sid": "RegisterOwnTaskDefinitions",
|
|
"Effect": "Allow",
|
|
"Action": [
|
|
"ecs:RegisterTaskDefinition"
|
|
],
|
|
"Resource": [
|
|
"arn:aws:ecs:*:*:task-definition/triple-c-*"
|
|
],
|
|
"Condition": {
|
|
"StringEquals": {
|
|
"aws:RequestTag/triple-c:owner": "${aws:userid}"
|
|
},
|
|
"ForAllValues:StringEquals": {
|
|
"aws:TagKeys": [
|
|
"triple-c:owner",
|
|
"triple-c:project",
|
|
"triple-c:environment"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Sid": "TagOwnTaskDefinitionsAtRegister",
|
|
"Effect": "Allow",
|
|
"Action": [
|
|
"ecs:TagResource"
|
|
],
|
|
"Resource": [
|
|
"arn:aws:ecs:*:*:task-definition/triple-c-*"
|
|
],
|
|
"Condition": {
|
|
"StringEquals": {
|
|
"ecs:CreateAction": "RegisterTaskDefinition",
|
|
"aws:RequestTag/triple-c:owner": "${aws:userid}"
|
|
},
|
|
"ForAllValues:StringEquals": {
|
|
"aws:TagKeys": [
|
|
"triple-c:owner",
|
|
"triple-c:project",
|
|
"triple-c:environment"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Sid": "RetireOwnTaskDefinitions",
|
|
"Effect": "Allow",
|
|
"Action": [
|
|
"ecs:DeregisterTaskDefinition",
|
|
"ecs:DeleteTaskDefinitions"
|
|
],
|
|
"Resource": [
|
|
"arn:aws:ecs:*:*:task-definition/triple-c-*"
|
|
],
|
|
"Condition": {
|
|
"StringEquals": {
|
|
"aws:ResourceTag/triple-c:owner": "${aws:userid}"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Sid": "ReadOwnSecrets",
|
|
"Effect": "Allow",
|
|
"Action": [
|
|
"secretsmanager:GetSecretValue"
|
|
],
|
|
"Resource": [
|
|
"arn:aws:secretsmanager:*:*:secret:triple-c/*"
|
|
],
|
|
"Condition": {
|
|
"StringEquals": {
|
|
"aws:ResourceTag/triple-c:owner": "${aws:userid}"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Sid": "NeverReadEnvironmentSecrets",
|
|
"Effect": "Deny",
|
|
"Action": [
|
|
"secretsmanager:GetSecretValue"
|
|
],
|
|
"Resource": [
|
|
"arn:aws:secretsmanager:*:*:secret:triple-c/*"
|
|
],
|
|
"Condition": {
|
|
"Null": {
|
|
"aws:ResourceTag/triple-c:component": "false"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|