forked from CrowdStrike/falcon-integration-gateway
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheks-role.yaml
43 lines (40 loc) · 1.37 KB
/
eks-role.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
AWSTemplateFormatVersion: '2010-09-09'
Description: 'Creates the IAM role for EKS FIG service account'
Parameters:
OIDCIssuerURLWithoutProtocol:
Type: String
Description: OIDC Issuer URL without protocol
AllowedPattern: '^oidc\.eks\.\S+\.amazonaws\.com\/id\/\S+$'
ConstraintDescription: >-
Malformed input-Parameter. Must be a valid OIDC Issuer URL WITHOUT protocol
like: oidc.eks.region-code.amazonaws.com/id/EXAMPLED539D4633E53DE1B716D3041E
FIGPolicyArn:
Type: String
Description: ARN of the FIG Managed Policy
Resources:
FalconFigIAMRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument: !Sub |
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Federated": "arn:${AWS::Partition}:iam::${AWS::AccountId}:oidc-provider/${OIDCIssuerURLWithoutProtocol}"
},
"Action": "sts:AssumeRoleWithWebIdentity",
"Condition": {
"StringEquals": {
"${OIDCIssuerURLWithoutProtocol}:sub": "system:serviceaccount:falcon-integration-gateway:falcon-integration-gateway"
}
}
}
]
}
ManagedPolicyArns:
- !Ref FIGPolicyArn
Outputs:
FalconFigAccessRoleArn:
Value: !GetAtt FalconFigIAMRole.Arn