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.
Idawscc.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.

For more information, see AWS::EKS::AccessEntry.

Methods

NameResourceAccessible byRequired Params
create_resourceaccess_entriesINSERTPrincipalArn, ClusterName, region
delete_resourceaccess_entriesDELETEIdentifier, region
update_resourceaccess_entriesUPDATEIdentifier, PatchDocument, region
list_resourcesaccess_entries_list_onlySELECTregion
get_resourceaccess_entriesSELECTIdentifier, region

SELECT examples

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 awscc.eks.access_entries
WHERE
region = 'us-east-1' AND
Identifier = '{{ principal_arn }}|{{ cluster_name }}';

INSERT example

Use the following StackQL query and manifest file to create a new access_entry resource, using stack-deploy.

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

UPDATE example

Use the following StackQL query and manifest file to update a access_entry resource, using stack-deploy.

/*+ update */
UPDATE awscc.eks.access_entries
SET PatchDocument = string('{{ {
"Username": username,
"Tags": tags,
"KubernetesGroups": kubernetes_groups,
"AccessPolicies": access_policies
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ principal_arn }}|{{ cluster_name }}';

DELETE example

/*+ delete */
DELETE FROM awscc.eks.access_entries
WHERE
Identifier = '{{ principal_arn }}|{{ cluster_name }}' AND
region = 'us-east-1';

Permissions

To operate on the access_entries resource, the following permissions are required:

eks:CreateAccessEntry,
eks:DescribeAccessEntry,
eks:AssociateAccessPolicy,
eks:TagResource,
eks:ListAssociatedAccessPolicies