Skip to main content

access_entries

Creates, updates, deletes or gets an access_entry resource or lists access_entries in a region

Overview

Nameaccess_entries
TypeResource
DescriptionAn object representing an Amazon EKS AccessEntry.
Idaws.eks.access_entries

Fields

NameDatatypeDescription
cluster_namestringThe cluster that the access entry is created for.
principal_arnstringThe principal ARN that the access entry is created for.
usernamestringThe Kubernetes user that the access entry is associated with.
tagsarrayAn array of key-value pairs to apply to this resource.
access_entry_arnstringThe ARN of the access entry.
kubernetes_groupsarrayThe Kubernetes groups that the access entry is associated with.
access_policiesarrayAn array of access policies that are associated with the access entry.
typestringThe node type to associate with the access entry.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTPrincipalArn, ClusterName, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__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.

/*+ create */
INSERT INTO aws.eks.access_entries (
ClusterName,
PrincipalArn,
region
)
SELECT
'{{ ClusterName }}',
'{{ PrincipalArn }}',
'{{ region }}';

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