Skip to content
This repository was archived by the owner on Nov 7, 2019. It is now read-only.

Commit 0067efc

Browse files
authored
Merge pull request #77 from tantona/tantonat/add-aws-service-operator-iam-role
iam role to be assumed by the aws-service-operator
2 parents 1f2e700 + 53d69ae commit 0067efc

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
AWSTemplateFormatVersion: "2010-09-09"
2+
Description: "Role for aws-service-operator"
3+
4+
Parameters:
5+
WorkerArn:
6+
Type: String
7+
Description: The arn of the worker nodes used to assume this role
8+
9+
Resources:
10+
AWSServiceOperatorRole:
11+
Type: AWS::IAM::Role
12+
Properties:
13+
RoleName: aws-service-operator
14+
AssumeRolePolicyDocument: !Sub
15+
- |
16+
{
17+
"Version": "2012-10-17",
18+
"Statement": [
19+
{
20+
"Effect": "Allow",
21+
"Principal": {
22+
"Service": "ec2.amazonaws.com"
23+
},
24+
"Action": "sts:AssumeRole"
25+
},
26+
{
27+
"Effect": "Allow",
28+
"Principal": {
29+
"AWS": "${WorkerArn}"
30+
},
31+
"Action": "sts:AssumeRole"
32+
}
33+
]
34+
}
35+
- WorkerArn: !Ref WorkerArn
36+
Policies:
37+
- PolicyName: aws-service-operator
38+
PolicyDocument: |
39+
{
40+
"Version": "2012-10-17",
41+
"Statement": [
42+
{
43+
"Effect": "Allow",
44+
"Action": [
45+
"sqs:*",
46+
"sns:*",
47+
"cloudformation:*",
48+
"ecr:*",
49+
"dynamodb:*",
50+
"s3:*"
51+
],
52+
"Resource": "*"
53+
}
54+
]
55+
}

0 commit comments

Comments
 (0)