

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# AWS.Compute.EKS.AuthRole
<a name="node-eks-authrole"></a>

AuthRole 可讓您將 IAM 角色新增至 Amazon EKS 叢集，`aws-auth``ConfigMap`讓使用者可以使用 IAM 角色存取 Amazon EKS 叢集。

## 語法
<a name="node-eks-authrole-syntax"></a>

```
tosca.nodes.AWS.Compute.EKS.AuthRole:
  properties:
    role\$1mappings: List
      arn: String
      groups: List  
  requirements:
    clusters: List
```

## 屬性
<a name="node-eks-authrole-properties"></a>

 `role_mappings`    
定義需要新增至 Amazon EKS 叢集 之 IAM 角色的映射清單`aws-auth``ConfigMap`。    
 `arn`    
IAM 角色的 ARN。  
必要：是  
類型：字串  
 `groups`    
要指派給 中定義之角色的 Kubernetes 群組`arn`。  
必要：否  
類型：清單

## 要求
<a name="node-eks-authrole-requirements"></a>

 `clusters`    
[AWS.Compute.EKS](node-eks.md) 節點。  
必要：是  
類型：清單

## 範例
<a name="node-eks-authrole-example"></a>

```
EKSAuthMapRoles:
    type: tosca.nodes.AWS.Compute.EKS.AuthRole
    properties:
        role_mappings:
        - arn: arn:aws:iam::${AWS::TNB::AccountId}:role/TNBHookRole1
          groups:
          - system:nodes
          - system:bootstrappers
        - arn: arn:aws:iam::${AWS::TNB::AccountId}:role/TNBHookRole2
          groups:
          - system:nodes
          - system:bootstrappers
    requirements:
         clusters: 
         - Free5GCEKS1
         - Free5GCEKS2
```