forked from maintux/quickstart-kubernetes-resource-provider
-
Notifications
You must be signed in to change notification settings - Fork 0
/
execution-role.template.yaml
62 lines (61 loc) · 3.97 KB
/
execution-role.template.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
AWSTemplateFormatVersion: "2010-09-09"
Resources:
ExecutionRole:
Type: AWS::IAM::Role
Properties:
MaxSessionDuration: 8400
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Principal:
Service:
- "lambda.amazonaws.com" # required for EKS clusters with Public Endpoint disabled
- "resources.cloudformation.amazonaws.com"
Action: sts:AssumeRole
Path: "/"
Policies:
- PolicyName: ResourceTypePolicy
PolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Action:
- "secretsmanager:GetSecretValue" # required for deploying helm charts into non-EKS kubernetes clusters
- "kms:Decrypt"
- "eks:DescribeCluster"
- "s3:GetObject"
- "sts:AssumeRole"
- "sts:GetCallerIdentity"
- "iam:PassRole" # required for EKS clusters with Public Endpoint disabled
- "ec2:CreateNetworkInterface" # required for EKS clusters with Public Endpoint disabled
- "ec2:DescribeNetworkInterfaces" # required for EKS clusters with Public Endpoint disabled
- "ec2:DeleteNetworkInterface" # required for EKS clusters with Public Endpoint disabled
- "ec2:DescribeVpcs" # required for EKS clusters with Public Endpoint disabled
- "ec2:DescribeSubnets" # required for EKS clusters with Public Endpoint disabled
- "ec2:DescribeRouteTables" # required for EKS clusters with Public Endpoint disabled
- "ec2:DescribeSecurityGroups" # required for EKS clusters with Public Endpoint disabled
- "logs:CreateLogGroup" # required for EKS clusters with Public Endpoint disabled
- "logs:CreateLogStream" # required for EKS clusters with Public Endpoint disabled
- "logs:PutLogEvents" # required for EKS clusters with Public Endpoint disabled
- "lambda:UpdateFunctionConfiguration" # required for EKS clusters with Public Endpoint disabled
- "lambda:GetFunctionConfiguration" # required for EKS clusters with Public Endpoint disabled
- "lambda:DeleteFunction" # required for EKS clusters with Public Endpoint disabled
- "lambda:GetFunction" # required for EKS clusters with Public Endpoint disabled
- "lambda:InvokeFunction" # required for EKS clusters with Public Endpoint disabled
- "lambda:CreateFunction" # required for EKS clusters with Public Endpoint disabled
- "lambda:UpdateFunctionCode" # required for EKS clusters with Public Endpoint disabled
- "logs:CreateLogGroup" # required if this role is also used for Resource type logging
- "logs:CreateLogStream" # required if this role is also used for Resource type logging
- "logs:DescribeLogGroups" # required if this role is also used for Resource type logging
- "logs:DescribeLogStreams" # required if this role is also used for Resource type logging
- "logs:PutLogEvents" # required if this role is also used for Resource type logging
- "cloudwatch:ListMetrics" # required if this role is also used for Resource type logging
- "cloudwatch:PutMetricData" # required if this role is also used for Resource type logging
- "ssm:PutParameter" # ssm parameters are used by the ::Get resource to track requests
- "ssm:GetParameter" # ssm parameters are used by the ::Get resource to track requests
- "ssm:DeleteParameter" # ssm parameters are used by the ::Get resource to track requests
Resource: "*"
Outputs:
ExecutionRoleArn:
Value: !GetAtt ExecutionRole.Arn