Advertisement
Guest User

Untitled

a guest
Apr 19th, 2019
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. ---
  2. AWSTemplateFormatVersion: 2010-09-09
  3. Description: AWS Templates - Default EKS Cluster
  4.  
  5. Parameters:
  6.  
  7. PublicSubnet1Id:
  8. Type: String
  9. Default: subnet-00000000000000000
  10. PublicSubnet2Id:
  11. Type: String
  12. Default: subnet-00000000000000000
  13.  
  14. Resources:
  15.  
  16. EksServiceIamRole:
  17. Type: AWS::IAM::Role
  18. Properties:
  19. RoleName: 'TestCase1ClusterRole'
  20. AssumeRolePolicyDocument:
  21. Version: 2012-10-17
  22. Statement:
  23. - Effect: Allow
  24. Principal:
  25. Service: eks.amazonaws.com
  26. Action: sts:AssumeRole
  27. ManagedPolicyArns:
  28. - arn:aws:iam::aws:policy/AmazonEKSServicePolicy
  29. - arn:aws:iam::aws:policy/AmazonEKSClusterPolicy
  30. Policies:
  31. - PolicyName: EksEC2
  32. PolicyDocument:
  33. Version: 2012-10-17
  34. Statement:
  35. - Sid: AllowEC2Describe
  36. Effect: Allow
  37. Action:
  38. - ec2:DescribeAccountAttributes
  39. - ec2:DescribeInternetGateways
  40. Resource: '*'
  41.  
  42. EksCluster:
  43. Type: AWS::EKS::Cluster
  44. Properties:
  45. Name: 'TestCase1Cluster'
  46. ResourcesVpcConfig:
  47. SubnetIds:
  48. - !Ref PublicSubnet1Id
  49. - !Ref PublicSubnet2Id
  50. RoleArn: !GetAtt EksServiceIamRole.Arn
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement