-
Notifications
You must be signed in to change notification settings - Fork 0
/
ecs-taskdef-tests.yaml
91 lines (91 loc) · 2.85 KB
/
ecs-taskdef-tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
---
- input:
Resources: {}
expectations:
rules:
all_ecs_tasks_must_have_task_end_execution_roles: SKIP
check_ecs_task_role_refs_are_local: SKIP
check_ecs_execution_role_refs_are_local: SKIP
check_ecs_task_role_refs_are_shared: SKIP
check_ecs_execution_role_refs_are_shared: SKIP
- input:
Resources:
ecsTask:
Type: 'AWS::ECS::TaskDefinition'
Properties:
TaskRoleArn: 'aws:arn'
expectations:
rules:
all_ecs_tasks_must_have_task_end_execution_roles: FAIL
check_ecs_task_role_refs_are_local: SKIP
check_ecs_execution_role_refs_are_local: SKIP
check_ecs_task_role_refs_are_shared: SKIP
check_ecs_execution_role_refs_are_shared: SKIP
- input:
Resources:
ecsTask:
Type: 'AWS::ECS::TaskDefinition'
Properties:
TaskRoleArn: 'aws:arn'
ExecutionRoleArn: 'aws:arn2'
expectations:
rules:
all_ecs_tasks_must_have_task_end_execution_roles: PASS
check_ecs_task_role_refs_are_local: SKIP
check_ecs_execution_role_refs_are_local: SKIP
check_ecs_task_role_refs_are_shared: FAIL
check_ecs_execution_role_refs_are_shared: FAIL
- input:
Resources:
ecsTask:
Type: 'AWS::ECS::TaskDefinition'
Metadata:
SharedExectionRole: allowed
Properties:
TaskRoleArn: 'aws:arn'
ExecutionRoleArn: 'aws:arn2'
expectations:
rules:
all_ecs_tasks_must_have_task_end_execution_roles: PASS
check_ecs_task_role_refs_are_local: SKIP
check_ecs_execution_role_refs_are_local: SKIP
check_ecs_task_role_refs_are_shared: PASS
check_ecs_execution_role_refs_are_shared: PASS
- input:
Resources:
ecsTask:
Type: 'AWS::ECS::TaskDefinition'
Metadata:
SharedExectionRole: allowed
Properties:
TaskRoleArn:
'Fn::GetAtt': [iam, Arn]
ExecutionRoleArn: 'aws:arn2'
expectations:
rules:
all_ecs_tasks_must_have_task_end_execution_roles: PASS
check_ecs_task_role_refs_are_local: FAIL
check_ecs_execution_role_refs_are_local: SKIP
check_ecs_task_role_refs_are_shared: SKIP
check_ecs_execution_role_refs_are_shared: PASS
- input:
Resources:
ecsTask:
Type: 'AWS::ECS::TaskDefinition'
Metadata:
SharedExectionRole: allowed
Properties:
TaskRoleArn:
'Fn::GetAtt': [iamRole, Arn]
ExecutionRoleArn: 'aws:arn2'
iamRole:
Type: 'AWS::IAM::Role'
Properties:
PermissionsBoundary: 'aws:arn3'
expectations:
rules:
all_ecs_tasks_must_have_task_end_execution_roles: PASS
check_ecs_task_role_refs_are_local: PASS
check_ecs_execution_role_refs_are_local: SKIP
check_ecs_task_role_refs_are_shared: SKIP
check_ecs_execution_role_refs_are_shared: PASS