Amazon Cloudformation EKS cluster role

From wikieduonline
Revision as of 12:57, 11 November 2021 by Welcome (talk | contribs) (Created page with "https://docs.aws.amazon.com/eks/latest/userguide/service_IAM_role.html#create-service-role --- AWSTemplateFormatVersion: '2010-09-09' Description: 'Amazon EKS Cluster Role...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

https://docs.aws.amazon.com/eks/latest/userguide/service_IAM_role.html#create-service-role

---
AWSTemplateFormatVersion: '2010-09-09'
Description: 'Amazon EKS Cluster Role'


Resources: 

  eksClusterRole:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Version: '2012-10-17'
        Statement:
        - Effect: Allow
          Principal:
            Service:
            - eks.amazonaws.com
          Action:
          - sts:AssumeRole
      ManagedPolicyArns:
        - arn:aws:iam::aws:policy/AmazonEKSClusterPolicy

Outputs:

  RoleArn:
    Description: The role that Amazon EKS will use to create AWS resources for Kubernetes clusters
    Value: !GetAtt eksClusterRole.Arn
    Export:
      Name: !Sub "${AWS::StackName}-RoleArn"

Advertising: