access_entries
Creates, updates, deletes or gets an access_entry
resource or lists access_entries
in a region
Overview
Name | access_entries |
Type | Resource |
Description | An object representing an Amazon EKS AccessEntry. |
Id | aws.eks.access_entries |
Fields
Name | Datatype | Description |
---|---|---|
cluster_name | string | The cluster that the access entry is created for. |
principal_arn | string | The principal ARN that the access entry is created for. |
username | string | The Kubernetes user that the access entry is associated with. |
tags | array | An array of key-value pairs to apply to this resource. |
access_entry_arn | string | The ARN of the access entry. |
kubernetes_groups | array | The Kubernetes groups that the access entry is associated with. |
access_policies | array | An array of access policies that are associated with the access entry. |
type | string | The node type to associate with the access entry. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | PrincipalArn, ClusterName, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all access_entries
in a region.
SELECT
region,
cluster_name,
principal_arn,
username,
tags,
access_entry_arn,
kubernetes_groups,
access_policies,
type
FROM aws.eks.access_entries
WHERE region = 'us-east-1';
Gets all properties from an individual access_entry
.
SELECT
region,
cluster_name,
principal_arn,
username,
tags,
access_entry_arn,
kubernetes_groups,
access_policies,
type
FROM aws.eks.access_entries
WHERE region = 'us-east-1' AND data__Identifier = '<PrincipalArn>|<ClusterName>';
INSERT
example
Use the following StackQL query and manifest file to create a new access_entry
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.eks.access_entries (
ClusterName,
PrincipalArn,
region
)
SELECT
'{{ ClusterName }}',
'{{ PrincipalArn }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.eks.access_entries (
ClusterName,
PrincipalArn,
Username,
Tags,
KubernetesGroups,
AccessPolicies,
Type,
region
)
SELECT
'{{ ClusterName }}',
'{{ PrincipalArn }}',
'{{ Username }}',
'{{ Tags }}',
'{{ KubernetesGroups }}',
'{{ AccessPolicies }}',
'{{ Type }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: access_entry
props:
- name: ClusterName
value: '{{ ClusterName }}'
- name: PrincipalArn
value: '{{ PrincipalArn }}'
- name: Username
value: '{{ Username }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: KubernetesGroups
value:
- '{{ KubernetesGroups[0] }}'
- name: AccessPolicies
value:
- PolicyArn: '{{ PolicyArn }}'
AccessScope:
Type: '{{ Type }}'
Namespaces:
- '{{ Namespaces[0] }}'
- name: Type
value: '{{ Type }}'
DELETE
example
/*+ delete */
DELETE FROM aws.eks.access_entries
WHERE data__Identifier = '<PrincipalArn|ClusterName>'
AND region = 'us-east-1';
Permissions
To operate on the access_entries
resource, the following permissions are required:
Create
eks:CreateAccessEntry,
eks:DescribeAccessEntry,
eks:AssociateAccessPolicy,
eks:TagResource,
eks:ListAssociatedAccessPolicies
Read
eks:DescribeAccessEntry,
eks:ListAssociatedAccessPolicies
Update
eks:DescribeAccessEntry,
eks:ListAssociatedAccessPolicies,
eks:UpdateAccessEntry,
eks:AssociateAccessPolicy,
eks:DisassociateAccessPolicy,
eks:TagResource,
eks:UntagResource
Delete
eks:DeleteAccessEntry,
eks:DescribeAccessEntry
List
eks:ListAccessEntries