-
Notifications
You must be signed in to change notification settings - Fork 0
/
aws-visibility-integration-setup-template.yaml
56 lines (53 loc) · 1.86 KB
/
aws-visibility-integration-setup-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
AWSTemplateFormatVersion: '2010-09-09'
Description: Enables Otterize's AWS Visibility Integration - creates a read-only role assumable by Otterize
Metadata:
Source: https://github.com/otterize/setup/aws-visibility-integration-setup-template.yaml
Parameters:
ExternalId:
Type: String
Description: DO NOT MODIFY! - A unique ID Otterize has to provide on role assumption for additional security
Resources:
OtterizeVisibilityIntegrationRole:
Type: 'AWS::IAM::Role'
Properties:
RoleName: OtterizeVisibilityCollectorRole
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Principal:
AWS: arn:aws:iam::353146681200:root
Action: sts:AssumeRole
Condition:
StringEquals:
sts:ExternalId: !Ref ExternalId
- Effect: Allow
Principal:
AWS: arn:aws:iam::353146681200:root
Action:
- sts:SetSourceIdentity
- sts:TagSession
Path: "/"
ManagedPolicyArns:
# ViewOnlyAccess is considered much more secure than ReadOnlyAccess, as it doesn't allow reading actual data (such as S3 objects)
- arn:aws:iam::aws:policy/job-function/ViewOnlyAccess
- arn:aws:iam::aws:policy/AmazonEC2ReadOnlyAccess
Policies:
- PolicyName: 'EksViewOnlyAccess'
PolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: 'Allow'
Action:
- 'eks:ListClusters'
- 'eks:DescribeCluster'
Resource: '*'
Tags:
- Key: "otterize/system"
Value: "true"
Outputs:
RoleArn:
Description: The ARN of the read-only role
Value: !GetAtt OtterizeVisibilityIntegrationRole.Arn
Export:
Name: OtterizeVisibilityIntegrationRoleArn